1 | initial version |
" Are there library linking issues?" no, i'd rather think, the `#ifdef``'ed code is out of date , and was not tested from the buildbot
2 | No.2 Revision |
" Are there library linking issues?" no, i'd rather think, the `#ifdef``'ed code is out of date , and was not tested from the buildbotbuildbot.
you can't create SURF/SIFT instances on the stack anymore, instead of
SurfFeatureDetector detector(minHessian);
it now will have to be:
Ptr<xfeatures2d::SURF> detector = xfeatures2d::SURF::create(minHessian);
3 | No.3 Revision |
" Are there library linking issues?" no, i'd rather think, the `#ifdef``'ed code is out of date , and was not tested from the buildbot.
you can't create SURF/SIFT instances on the stack anymore, instead of
SurfFeatureDetector detector(minHessian);
it now will have to be:
//-- Step 1: Detect the keypoints and extract descriptors using SURF
int minHessian = 400;
//SurfFeatureDetector detector(minHessian);
Ptr<xfeatures2d::SURF> detector surf = xfeatures2d::SURF::create(minHessian);
// note, that it's also far more efficient, to compute keypoints and descriptors in one go.
std::vector<KeyPoint> keypoints_object, keypoints_scene;
Mat descriptors_object, descriptors_scene;
surf->detectAndCompute(gray_image1, Mat(), keypoints_object, descriptors_object);
surf->detectAndCompute(gray_image2, Mat(), keypoints_scene, descriptors_scene);