Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

One of the fields of KeyPoint object is 'pt', which is the coordinate of those key point. Its type is Point32f. So you can access you coordinates like this:

Point32f p = keypoints_object[i].pt;

Or like this

float x = keypoints_object[i].pt.x;
float y = keypoints_object[i].pt.y;

See here for more information about fields of KeyPoint.

One of the fields of KeyPoint object is 'pt', which is the coordinate of those this key point. Its type is Point32f. So you can access you the coordinates like this:

Point32f p = keypoints_object[i].pt;

Or like this

float x = keypoints_object[i].pt.x;
float y = keypoints_object[i].pt.y;

See here for more information about fields of KeyPoint.

click to hide/show revision 3
No.3 Revision

updated 2013-03-25 08:59:24 -0600

berak gravatar image

One of the fields of KeyPoint object is 'pt', which is the coordinate of this key point. Its type is Point32f. Point2f. So you can access the coordinates like this:

Point32f Point2f p = keypoints_object[i].pt;

Or like this

float x = keypoints_object[i].pt.x;
float y = keypoints_object[i].pt.y;

See here for more information about fields of KeyPoint.