1 | initial version |
Each contour is stored as a vector of points (e.g. std::vector<std::vector<cv::Point> >
)
the problem in your code is the line below
Mat contours;
findContours(skin,contours,RETR_EXTERNAL,CHAIN_APPROX_SIMPLE);
correct it like:
vector<vector<Point> > contours;
findContours(skin,contours,RETR_EXTERNAL,CHAIN_APPROX_SIMPLE);