Extract the coordinates of a point OpenCV C + + [closed]
Hello,
I want to extract a specific point in vector
vector <vector <Point>> contours_poly (contours.size ());
but I could not extract its coordinates (X and Y) because I used matrices. Here is my code:
vector<vector<Point> > contours;
vector<vector<Point> > contours_poly( contours.size() );
for(size_t i = 0; i < contours.size(); i++ )
{
approxPolyDP( Mat(contours[i]), contours_poly[i], 2, true );
}
Merci.
what goes wrong ?
I can't extract the coordinates of a specific point(the X and the Y) of my vector "contours_poly"
X = contours_poly[ contour_id ][ point_id ] .x;
(note, that the contours_poly vectors will have less points than the original contour due to the approx.)
Thanks a lot :D