Memory efficient extraction of overlapping patches from matrix
问题 short story: This is a follow up question to: Fast Way to slice image into overlapping patches and merge patches to image How must I adapt the code provided in the answer to work not only on images of size x,y, where a pixel is described by a float, but described by a matrix of size 3,3? Further, how to adapt the code so that it returns a generator allowing me to iterate over all patches without having to save all of them in memory? long story: Given an image of shape (x,y), where each pixel