I am trying to learn OpenCV and being tough, I am trying to run the following algorithm:
cv::Mat cur_features;
cv::goodFeaturesToTrack(current_image, cur_features, 400, 0.01, 0.01);
Now, being a solid person, I am interested to see what cur_features holds ... I was expecting 400x2 cv :: Mat, but instead I got 400x1 cv :: Mat
No big, I think maybe this is a direct index. However, for LIFE me, I CANNOT extract the value from cur_features.at (0) and print it.
What am I doing wrong? I saw goodFeaturesToTrack_Demo.cpp. Some things to note in this demo that are different for mine. I tried the following calls given in the following example:
std::cout << cur_features.size() << std::endl;
std::cout << cur_features.at<Point2f>(0).x << std::endl;
Can someone lead me to some kind of documentation explaining how to achieve my goal? The goodFeaturesToTrack function tells you that it returns an OutputArray, which is a vector of angles but does not describe anywhere what type of angles are. Where in the documentation will I look for this answer in case I get it using other methods?
Edit: Also, what does the point Mat :: type () mean. I cannot find where to explain the return value ... I am looking for an enumeration in the documentation, but I cannot find it.
std::cout << current_image.type() << std::endl;
std::cout << cur_features.type() << std::endl;
source
share