OpenCV - Extracting the data from a Point2f variable

closed account (ybq5Djzh)
I'm doing a project in OpenCV. I have this variable which is of type Point2f.

cv::Point2f initial;

The value of initial is [656, 55]. Question is how do I extract these 2 numbers into 2 variables?
closed account (ybq5Djzh)
It was initial.x and initial.y

figured it out :)
Looking at the documentation: http://opencv.willowgarage.com/documentation/cpp/core_basic_structures.html

Point2f is a typedef of Point_<float>, which has public members x and y.

1
2
3
cv::Point2f initial(656, 55);
float xval = initial.x; // 656
float yval = initial.y; // 55 
Topic archived. No new replies allowed.