cv::fitEllipse returns wrong result (Bug #1638)
Description
See example:
std::vector<std::vector<cv::Point>> c = ; cv::Mat rgb(10, 10, CV_8UC3); cv::drawContours(rgb, c, -1, cv::Scalar(0, 255, 0)); auto ellipse = cv::fitEllipse(c[0]); std::cout << "Ellipse size: " << ellipse.size.width << " " << ellipse.size.height << std::endl; cv::ellipse(rgb, ellipse, cv::Scalar(0, 0, 255)); cv::imwrite("/tmp/test.png", rgb);
Output:
Ellipse size: 0.632456 0.632456
Associated revisions
switched back to FitEllipse algorithm by Dr. Daniel Weiss; improved its accuracy in some cases. It fixes #1638
History
Updated by Alexander Shishkov almost 13 years ago
- Priority changed from High to Normal
- Target version deleted ()
- Category set to imgproc, video
Updated by Ivan Korolev almost 13 years ago
- Assignee set to Ivan Korolev
Updated by Ivan Korolev almost 13 years ago
- Assignee deleted (
Ivan Korolev)
Updated by Vadim Pisarevsky almost 13 years ago
thanks for the detailed bug report! The problem has been fixed in SVN trunk, r7726
Updated by Vadim Pisarevsky almost 13 years ago
- Status changed from Open to Done
- Assignee set to Vadim Pisarevsky
Updated by Alexander Shishkov almost 13 years ago
- Target version set to 2.4.0