Given a image in form of 2D numpy array(etc, [H,W]
), I want to slic several matrixes(etc, [N,N] N<H,W
), which locate in different places of the image. Note that, to speed up, this operation should be parallel(This means that you cannot use a for loop to slic one by one as follows code).
for i in range(n):
matrix.append(image[y[i]:y[i]+matrix_h,x[i]:x[i]+matrix_w])