How do I get properties from fitEllipse() rotatedrect?
If I use the fitEllipse() function on a blob, how do I get:
length, width, center, orientation
of its returned rotatedrect?
The RotatedRect has the following fields: center, angle and size, where size as width and height fields.
cv::RotatedRect r = cv::fitEllipse(...);
std::cout << "Length: " << r.size.height << ", Width: " << r.size.width
<< ", Center: (" << r.center.x << "," << r.center.y << ")"
<< ", Orientation: " << r.angle << std::endl;
Asked: 2013-07-27 18:38:32 -0600
Seen: 1,434 times
Last updated: Jul 27 '13