I'm trying to pixelate (\mosaic) an image by calculate the mean of a (non overlap) sliding window over the image. For this I try to implement a "window size" and a "step" parameters. Assuming my step won't exceed the image border. Means that if my image is a 32X32 dims the window can be 2x2\4x4\8x8\16x16 dims. Here an example
I try to look for some combinations of mean operator\mask\convolution but didn't find anything relevant.
Here some examples of what iI try to look for: Those links gave some parts of my question but iI didn't find out how to combine them in order to implement a sliding window with step skipping.
Numpy Two-Dimensional Moving Average, scipy.org/../scipy.signal.medfilt, mosaic.py on GitHub and Numpy Vectorization of sliding-window operation How to do this sliding window in order to pixelate parts of an image seperatly.