Ask Your Question

Revision history [back]

With the function findContours, contours parameter is a MatOfPoint, therefore, with toArray, you can use the points stored:

int nbPoints = contours.length();
Point points = contours.toArray();
for( int i = 0 ; i < nbPoints ; ++i )
{
    Point v = points[i];
}

See the doc here and here.