1 | initial version |
the "minimal" args to construct a Keypoint are x,y,size
. you'll just have to invent a size, that makes sense in your image (e.g avg. distance between points).
vector<point> pts = .... ; // from landmarks or such vector<keypoint> kp; // empty float s = 5; // ?? for (size_t i=0; i<pts.size(); i++)="" {="" kp.push_back(pts[i].x,="" pts[i].y,="" s);="" }<="" p="">
Mat descriptors; Ptr<feature2d> extractor = features2d::SURF::create(); // you need float features for the svm ! extractor->compute(image, kp, descriptors);
2 | No.2 Revision |
the "minimal" args to construct a Keypoint are x,y,size
. you'll just have to invent a size, that makes sense in your image (e.g avg. distance between points).
vector<point>
vector<Point>
pts = .... ; // from landmarks or such