I have a bunch of images with labeled polygons marked in red (255,0,0):
I want to extract the bounding box but inside the polygon as shown with the blue rectangle:
OpenCV cv.boundingRect gives me the outer bounding box but how to extract the inner bounding box?
CodePudding user response:
This inscribed rectangle problem is a bit more complex than outer rectangle. A related general case is polygon inside polygon - the polygon containment problem is described in