Indices from convexHull not monotonic (Bug #2922)


Added by Kirt Lillywhite almost 12 years ago. Updated over 9 years ago.


Status:Open Start date:2013-03-26
Priority:Normal Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:imgproc, video
Target version:-
Affected version:2.4.4 Operating System:
Difficulty: HW Platform:
Pull request:

Description

From a segmented image I find the contour and then try to find the convexity defects from that contour. The largest convexity defect is wrong. Looking through the opencv code I think the reason is the indices from convexHull are in decreasing order except in one spot. This causes the convexityDefects function to mess up. The attached code shows the problem. I'm using 2.4.4 compiled from source on Archlinux x86-64. During compilation I turned off CUDA and enable QT, everything else is set to the default options.


convex_hull_bug.cpp - Source file showing the bug (1.9 kB) Kirt Lillywhite, 2013-03-26 09:47 pm

mask.png - Image used by source code (2.2 kB) Kirt Lillywhite, 2013-03-26 09:47 pm

mask.png - The file from before was the wrong one. Sorry. (50.8 kB) Kirt Lillywhite, 2013-03-26 09:56 pm


Associated revisions

Revision dcf96b2d
Added by Alexander Alekhin over 10 years ago

Merge pull request #2922 from ilya-lavrenov:mac_fix

History

Updated by Kirt Lillywhite almost 12 years ago

Updated by Maksim Shabunin over 9 years ago

Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4539

Also available in: Atom PDF