hpoints > 0: Error using convexityDefects() [closed]

asked 2020-04-07 09:40:54 -0500

TheCakeLover gravatar image

updated 2020-04-08 06:33:14 -0500

Dear all,

I am grabbing the hull of a contour by using the convexHull() function. This hull is then used as an input argument for the convexityDefects() function. Still I am getting the error

error: (-215:Assertion failed) hpoints > 0 in function 'cv::convexityDefects'

From the documentation of OpenCV it seems that the call to checkVector() induces the error. Why is the ouput of convexHull() not compatible with convexityDefects() ? Do i need to reshape() into the correct format?

Cheers!

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by berak
close date 2020-04-08 08:15:05.859792

Comments

also answered here

berak gravatar imageberak ( 2020-04-08 08:15:31 -0500 )edit