int _tmain(int argc, _TCHAR* argv[]) {
Mat img = imread("LenaGr.jpg", 0);
//vector of KeyPoints
vector<KeyPoint> keyPoints;
//construction of the fast feature detector object
FastFeatureDetector fast(40);
//feature point detection
fast.detect(img, keyPoints);
drawKeypoints(img, keyPoints, img, Scalar::all(-1), DrawMatchesFlags::DEFAULT);
//output all the (x,y) of keypoint
vector<KeyPoint>::iterator it;
for(it = keyPoints.begin(); it != keyPoints.end(); ++it) {
printf("x=%f y=%f\n", it->pt.x, it->pt.y);
}
namedWindow("img", WINDOW_AUTOSIZE);
imshow("img", img);
waitKey(0);
return 0;
}