DEV Community

Alkeshm29
Alkeshm29

Posted on

How to identify required part of a image, crop and save as new file

Top comments (1)

Collapse
 
alkeshm29 profile image
Alkeshm29

I have tried this, firstly convert the image to binary using threshold. Then i searched for contours using cv2.findContours and after finding them i sorted the contours and drew the biggest

after some research i found a way to cut the contour and save it to a new image.