I'm using OpenCV 2.2 and I need to determine convexity defects of a convex hull. I can't find anything on convexity defects in the documentation which makes me wonder if it is still supported in OpenCV 2.X or if it was renamed?
Anyways, I tried using the C function
CvSeq* cvConvexityDefects(const CvArr* contour, const CvArr* convexhull, CvMemStorage* storage=NULL )
However, I'm not able to convert my std::vector<Point> hull
into CvArr
. The CvArr
parameters to cvConvexityDefects
should be 1-dimensional and continuous array of int's, which I had no success in creating (tried casting, manual copying into a CvSeq structure, ...).
Any ideas?