Extracting patches of a certain size from the image in python efficiently -


I have an image and I want to remove square patch of different sizes from it.

I need a dense patches, that is, I want to patches on every pixel in the image. For example if the image is 100x100 and the patch size is 64 .

The result will be a patch size of 10000 64x64

These are the same patches that we use for filtering operations. for example.

If there is a limit then I would like to mirror the image.

What is the most effective way to remove patch using a python?

Thanks

I think you are looking for something like this:


Comments