I have a image in numpy.arrayand I need to split all the lines into 4 'equal' (disregard odd) groups and 4 groups of cols. I did try this:
for count in range(0, camera.shape[0], camera.shape[0] // 4):
pp.figure()
if count == 0:
pp.imshow(camera[0:camera.shape[0] // 4:, :], cmap='gray')
continue
pp.imshow(camera[count: count * 2:, :], cmap='gray')
# pp.imshow(camera[0:camera.shape[0] // 4:, :], cmap='gray')
pp.show()
The result:
But this approach have a problem with the first loop and the begin:end:step. Some tips ?
I have also made this image to illustrate what I want:
