fen1ksss 0 Жалоба Опубликовано March 28, 2012 Hi guys, do anybody know, how the detect-function works? for example here: Mat img = imread (...); SurfFeatureDetector detector(400); vector<KeyPoint> keypoints; detector.detect(img, keypoints); especially how it's writting in keypoints1 . Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах
Smorodov 579 Жалоба Опубликовано March 28, 2012 Fragment from opencv\modules\features2d\src\keypoint.cpp I think it looks quite self-explaining: void write(FileStorage& fs, const string& objname, const vector<KeyPoint>& keypoints) { WriteStructContext ws(fs, objname, CV_NODE_SEQ + CV_NODE_FLOW); int i, npoints = (int)keypoints.size(); for( i = 0; i < npoints; i++ ) { const KeyPoint& kpt = keypoints[i]; write(fs, kpt.pt.x); write(fs, kpt.pt.y); write(fs, kpt.size); write(fs, kpt.angle); write(fs, kpt.response); write(fs, kpt.octave); write(fs, kpt.class_id); } } [/code] Look also to other files in folder opencv\modules\features2d\src\. Example of using descriptors you can find in samples folder in file descriptor_extractor_matcher.cpp If you need SURF descriptor explanation, there a lot of documents in internet (http://en.wikipedia.org/wiki/SURF) for example. May be I don't understand you correctly? Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах