Ask Your Question

Revision history [back]

Minimal area rectangle for multiple contours

I have a case with several contours

std::vector<std::vector<cv::Point>> contours;

I want to get the smallest area rectangle containing all these contours. I have tried minAreaRect() but it returns an exception (probably because I pass it more than one contour).

What would be the best way of getting the minimal area rectangle when you're dealing with more than one contour?

Minimal area rectangle for multiple contours

I have a case with several contours

std::vector<std::vector<cv::Point>> contours;

I want to get the smallest area rectangle (RotatedRect) containing all these contours. I have tried minAreaRect() but it returns an exception (probably because I pass it more than one contour).

What would be the best way of getting the minimal area rectangle when you're dealing with more than one contour?

Minimal area rectangle for multiple contours

I have a case with several contours

std::vector<std::vector<cv::Point>> contours;

I want to get the smallest area rectangle (RotatedRect) RotatedRect containing all these contours. I have tried minAreaRect() but it returns an exception (probably because I pass it more than one contour).

What would be the best way of getting the minimal area rectangle when you're dealing with more than one contour?

Minimal area rectangle for multiple contours

I have a case with several contours

std::vector<std::vector<cv::Point>> contours;

I want to get the smallest area rectangle RotatedRect containing all these contours. I have tried minAreaRect() but it returns an exception (probably because I pass it more than one contour).

What would be the best way of getting the minimal area rectangle when you're dealing with more than one contour?