Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Did convexityDefects function behaviour changed between cv2 versions 4.2.0 and 4.3.0?

I was making use of convexityDefects for hand detection/recognition in my project using opencv-contrib-python version cv2 4.2.0.32. I recently updated my cv2 version to the latest one, but my functionality broke.

error: (-5:Bad argument) The convex hull indices are not monotonous, which can be in the case when the input contour contains self-intersections in function 'cv::convexityDefects'

I was able to backtrack and find the version where convexityDefects stopped behaving as I was expecting (as it behaved before). In 4.2.0.34 it still works but from version 4.3.0.36 and on I get the hull indices are not monotonous error.

Do someone knows if the implementation of the convexityDefects function changed across versions and what did it change?

Aditional information:

Thanks!