【发布时间】:2015-01-23 21:08:14
【问题描述】:
来自 OpenCV 文档:
C++:void SIFT::operator()(InputArray img, InputArray mask, vector<KeyPoint>& keypoints,
OutputArray descriptors, bool useProvidedKeypoints=false)
参数:
img – Input 8-bit grayscale image
mask – Optional input mask that marks the regions where we should detect features.
keypoints – The input/output vector of keypoints
descriptors – The output matrix of descriptors. Pass cv::noArray()
if you do not need them.
useProvidedKeypoints – Boolean flag. If it is true, the keypoint
detector is not run. Instead, the provided vector of keypoints is
used and the algorithm just computes their descriptors.
我有以下问题:
mask具有什么价值?我的意思是,如果我想删除图像边界附近的关键点,我应该给一个掩码,在边框和中心是零?-
在另一个网页上,我发现了一种不同的方法,它使用“检测”方法来检测关键点,并使用“计算”方法来计算描述符。使用功能检测/计算与功能“操作员”有什么区别?使用第一种方法,我首先检测关键点而不计算描述符......但是,如果我使用带有
李>useProvidedKeypoints标志的“运算符”方法,我之前如何计算关键点? 另外,蛮力匹配和FLANN匹配在匹配点数上有什么区别?我需要使用 MATLAB 的
VL_FEAT库获得相同的结果...所以我想知道这两种方法中哪一种更接近
例如,下面的 Matlab 代码给出了 2546 个检测到的关键点
[f1,d1] = vl_sift(frame1_gray);
使用 OpenCV:
std::vector<KeyPoint> keypoints;
cv::SiftFeatureDetector detector;
detector.detect(gray1, keypoints);
cout << keypoints.size() << endl;
只有708!!!
然后,使用 SIFT::operator() 我作为输入提供的参数有问题
std::vector<KeyPoint> keypoints;
Mat descriptors;
SIFT S = SIFT();
SIFT::operator(gray1, Mat(), keypoints, descriptors);
【问题讨论】:
标签: matlab opencv image-processing computer-vision sift