Ask Your Question

Revision history [back]

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;