Ask Your Question

Revision history [back]

Would something like the following work?

Here are the steps for the images below.

  1. convert the image to mono with cvtColor

  2. use threshold with binary_inverse and a zero threshold value

  3. use findContours with list and filter contours by area

From here you can get the remaining contour rectangle and extract/save this roi in the original image to a file.

image description