0

我正在尝试将描述符大小更改为 128 而不是 openCV 中的 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 );

}

提前致谢

4

1 回答 1

1

扩展参数负责描述符的大小。将其设置为 1(true),应计算 128 个元素的描述符。

SurfDescriptorExtractor extractor(hessianThreshold, nOctaves, nOctaveLayers,  
                                                        ***extended***, upright);
于 2013-05-10T13:50:57.870 回答