Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fitEllipse #4515

Closed
opencv-pushbot opened this issue Jul 27, 2015 · 1 comment · Fixed by #9923
Closed

fitEllipse #4515

opencv-pushbot opened this issue Jul 27, 2015 · 1 comment · Fixed by #9923

Comments

@opencv-pushbot
Copy link
Contributor

Transferred from http://code.opencv.org/issues/2836

|| Jens Breitenbach on 2013-02-26 14:50
|| Priority: Normal
|| Affected: 2.4.3
|| Category: imgproc, video
|| Tracker: Bug
|| Difficulty: None
|| PR: 
|| Platform: None / None

fitEllipse

Making contour processing in some rare cases (<10%) fitEllipse will cause bad results. Example:

> oMatFloatPoints = (Mat_<float>(12,2) << 327,317,  328,316,  329,315,  330,314,  331,314,  332,314,  333,315,  333,316, 333,317,  333,318, 333,319, 333,320);
> 
> oEliBox = fitEllipse(oMatFloatPoints);

It fails if rp[2] < rp[3]! The bug appears also with much longer contours. See the examples and my proposed fix I attached.

History

@arrybn
Copy link
Contributor

arrybn commented Jul 15, 2016

I created test for this issue in this PR: #6915

arrybn pushed a commit to arrybn/opencv that referenced this issue Jul 15, 2016
arrybn pushed a commit to arrybn/opencv that referenced this issue Jul 15, 2016
arrybn pushed a commit to arrybn/opencv that referenced this issue Jul 15, 2016
arrybn pushed a commit to arrybn/opencv that referenced this issue Jul 15, 2016
arrybn pushed a commit to arrybn/opencv that referenced this issue Jul 18, 2016
arrybn pushed a commit to arrybn/opencv that referenced this issue Jul 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants