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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Compute both MinAreaRect and ConvexHull. Then, for each of the four points found by MinAreaRect, find the corresponding nearest point in the convex hull.