i've already read the posts here and here but they do not solve the error i get.
My code
vector<Vec4i> defects;
vector<vector<int> >hull( contours.size() );
for (int i = 0; i < contours.size(); i++)
{
convexHull( contours[i], hull[i], false, false );
if(contours[i].size() > 3 )
convexityDefects(contours[i], hull[i], defects[i]);
}
According to the posts above this should work, but it does not. I still get the error
error: (-215) hull.checkVector(1, CV_32S) > 2 in function convexityDefects
I really don't see the problem here.