我试图在openCV中将描述符大小更改为128而不是64
有谁知道我怎么能改变它
这是我的代码的一部分
{
SurfFeatureDetector detector( minHessian , 1 , 1 , 1 , 0 ); // try to get most number of keypoint for matching
std::vector<KeyPoint> keypoints_object, keypoints_scene;
detector.detect( img_object, keypoints_object );
detector.detect( img_scene, keypoints_scene );
//-- Step 2: Calculate descriptors (feature vectors)
SurfDescriptorExtractor extractor ;
Mat descriptors_object, descriptors_scene;
extractor.compute( img_object, keypoints_object, descriptors_object );
extractor.compute( img_scene, keypoints_scene, descriptors_scene );
}
先谢谢
答案 0 :(得分:1)
扩展参数负责描述符的大小。将其设置为1(true),并应计算128个元素的描述符。
SurfDescriptorExtractor extractor(hessianThreshold, nOctaves, nOctaveLayers,
***extended***, upright);