Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Extract the coordinates of a point OpenCV C + +

Hello,

I want to extract a specific point in vector "vector <vector <point="">> contours_poly (contours.size ());" and 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.

click to hide/show revision 2
No.2 Revision

updated 2014-03-06 03:05:35 -0600

berak gravatar image

Extract the coordinates of a point OpenCV C + +

Hello,

I want to extract a specific point in vector "vector <vector <point="">> contours_poly (contours.size ());" and I could not extract its coordinates (X and Y) because I used matrices. Here is my code:

vector<vector<point>

 vector<vector<Point> > contours;
  vector<vector<point> 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.

click to hide/show revision 3
No.3 Revision

updated 2014-03-06 03:16:11 -0600

berak gravatar image

Extract the coordinates of a point OpenCV C + +

Hello,

I want to extract a specific point in vector "vector

vector <vector <point="">> <Point>> contours_poly (contours.size ());" and ());

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.