How can I crop images, like I\'ve done before in PIL, using OpenCV.
Working example on PIL
im = Image.open(\'0.png\').convert(\'L\') im = im.crop((1
to make it easier for you here is the code that i use :
w, h = image.shape top=10 right=50 down=15 left=80 croped_image = image[top:((w-down)+top), right:((h-left)+right)] plt.imshow(croped_image, cmap="gray") plt.show()