I have following images:
I want to extract coordinates of bounding rectangle of largest yellow section. minAreaRect
doesnt help, since it doenst take a perspective, so it is not fitted correctly. There are another examples of masks, I want to transform.
At the end I want to have coordinates of 4 corners of largest shape there.
As you can see mask will not be 100% rectangle, is this even possible in opencv?
I tried to do cannyedge detection, then extract contours as lines (dilate/erode), then I can get contour of yellow area, but still dont know how to extract that corners then, because they are rounded.