opencv - 在SURF中更改描述符大小

标签 opencv surf feature-descriptor

我正在尝试在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 );

}

提前致谢

最佳答案

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

SurfDescriptorExtractor extractor(hessianThreshold, nOctaves, nOctaveLayers,  
                                                        ***extended***, upright);

关于opencv - 在SURF中更改描述符大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16466601/

相关文章:

python - Opencv Python - 来自特征匹配+单应性的相似度分数

c# - emgu 在图像 b 中找到图像 a

c++ - OpenCV - 在同一个程序中收集 featureDetectors 和 descriptorDetector

c++ - 在 OpenCV 的 FlannBasedMatcher 中,训练究竟发生在什么阶段?

c++ - 使用 MATLAB 和 OpenCV 对图像求和的效率

python - OpenCV对象检测一个困难的对象

matlab - 用多种颜色填充曲线上方的区域(matlab,surf)

java - 在Android(Java)中将opencv矩阵转换为字符串以存储在数据库中的最佳方法

python - 使用 Aruco 标记获取相机位置和旋转

opencv - 使用mingw构建tbb时链接错误,同时opencv运行时错误