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:
- The contour that throws the error
- opencv-contrib-python
4.2.0.32
/34
vs4.3.0.36
> - Windows 10
10.0.18363
x64
Thanks!