I want to draw a "bounding box" around a skewed rectangle. I thought I could use the cvMinAreaRect2() function but it only handles the rotation, see this image:
Is there any function to solve this? If not, any ideas how to implement it?
Compute both MinAreaRect and ConvexHull. Then, for each of the four points found by MinAreaRect, find the corresponding nearest point in the convex hull.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With