小编KLo*_*owe的帖子

一旦引入旋转/比例不变性,OpenCV Orb就找不到匹配

我正在使用OpenCV 2.3.1中的Orb特征检测器开展项目.我发现8个不同图像之间的匹配,其中6个非常相似(相机位置相差20厘米,沿线性滑块,因此没有比例或旋转方差),然后从大约45度角拍摄2张图像侧.我的代码在非常相似的图像之间找到了大量精确匹配,但从更不同的角度拍摄的图像几乎没有.我已经包含了我认为是我的代码的相关部分,如果您需要更多信息,请告诉我.

// set parameters

int numKeyPoints = 1500;
float distThreshold = 15.0;

//instantiate detector, extractor, matcher

detector = new cv::OrbFeatureDetector(numKeyPoints);
extractor = new cv::OrbDescriptorExtractor;
matcher = new cv::BruteForceMatcher<cv::HammingLUT>;

//Load input image detect keypoints

cv::Mat img1;
std::vector<cv::KeyPoint> img1_keypoints;
cv::Mat img1_descriptors;
cv::Mat img2;
std::vector<cv::KeyPoint> img2_keypoints
cv::Mat img2_descriptors;
img1 = cv::imread(fList[0].string(), CV_LOAD_IMAGE_GRAYSCALE);
img2 = cv::imread(fList[1].string(), CV_LOAD_IMAGE_GRAYSCALE);
detector->detect(img1, img1_keypoints);
detector->detect(img2, img2_keypoints);
extractor->compute(img1, img1_keypoints, img1_descriptors);
extractor->compute(img2, img2_keypoints, img2_descriptors);

//Match keypoints using knnMatch to find the single best match for each keypoint
//Then cull results …
Run Code Online (Sandbox Code Playgroud)

c++ opencv computer-vision photogrammetry orb

18
推荐指数
2
解决办法
2万
查看次数

标签 统计

c++ ×1

computer-vision ×1

opencv ×1

orb ×1

photogrammetry ×1