opencv - 通用描述符匹配器函数 OPENCV

标签 opencv

我想问你一个简单的问题,但到目前为止对我来说太难了。 我的问题是:

opencv svn中有一个函数叫GenericDescriptorMatcher();

Ptr<GenericDescriptorMatcher> gdm = new VectorDescriptorMatcher( descriptorExtractor, descriptorMatcher );

我想得到一个关于它的解释,但是以一种简单的方式,它应该是什么

descriptorExtractor

它应该是什么

descriptorMatcher

看在上帝的份上,很多天我都在研究这个功能,但仍然不知道如何使用它,所以如果你有使用它的经验,请尝试用非常简单的方式解释它。

谢谢

最佳答案

举个例子

// Detect features
Ptr<FeatureDetector>     detector = new SurfFeatureDetector(400);
vector<KeyPoint> features;
detector->detect(image,   features); 

// Extract features
Mat descriptors;
Ptr<DescriptorExtractor> extractor = new SurfDescriptorExtractor();
extractor->compute(image,     features, descriptors);

// Matcher of features
Ptr<DescriptorMatcher> matcher = new BruteForceMatcher<L2<float>>();

// Now you can match the features using matcher or use gdm
Ptr<GenericDescriptorMatcher> gdm = new VectorDescriptorMatcher( extractor, matcher);

关于opencv - 通用描述符匹配器函数 OPENCV,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6756556/

相关文章:

python - OpenCV如何平滑轮廓,降低噪声

c++ - 具有不同 ROI 的扩张梯度(blob 优化)OPENCV

java - 如何用java在openCv中找到矩形的角点

python - 我如何获得opencv中显示的图像坐标

python - 如何正确使用 cv2.pointPolygonTest() 和 cv2.findcontours()?

python - 检测多边形内的矩形

python - TypeError: 'NoneType'对象无法下标opencv-python/python face_recognition

python - OpenCV 读取视频文件在 Python 中非常慢

image-processing - 无法让 AVFoundation 使用 AVCaptureSessionPresetPhoto 分辨率

opencv - OpenCV 中二值图像的 width 和 widthStep 不同