I have a set of similar images like the one below. I want to keep the portion of the image that is within the top red 'irregular' rectangle (green arrows represent the space that I want to keep; anything outside I want to crop out. Is there a python opencv code that would do it for me? I've been trying to figure it out using opencv by playing around with thresholds but it's just not doing it for me.
Original image:
The area that I want to keep (the space I want to keep is highlighted by green arrows):
Thank you so much
See Question&Answers more detail:os