3

2 つのバイナリ イメージを登録しようとしています。特徴点の生成と照合には、opencv オーブ検出器とマッチャーを使用しました。ただし、マッチング結果は悪いようです。誰かが理由と改善方法を教えてもらえますか? ありがとう。画像とマッチング結果はこちら。

ここに画像の説明を入力

ここに画像の説明を入力

ここに画像の説明を入力

ここにコードがあります

OrbFeatureDetector detector; //OrbFeatureDetector detector;SurfFeatureDetector
vector<KeyPoint> keypoints1;
detector.detect(im_edge1, keypoints1);
vector<KeyPoint> keypoints2;
detector.detect(im_edge2, keypoints2);

OrbDescriptorExtractor extractor; //OrbDescriptorExtractor extractor; SurfDescriptorExtractor extractor;
Mat descriptors_1, descriptors_2;
extractor.compute( im_edge1, keypoints1, descriptors_1 );
extractor.compute( im_edge2, keypoints2, descriptors_2 );

//-- Step 3: Matching descriptor vectors with a brute force matcher
BFMatcher matcher(NORM_L2, true);   //BFMatcher matcher(NORM_L2);

vector< DMatch> matches;
matcher.match(descriptors_1, descriptors_2, matches);


vector< DMatch > good_matches;
vector<Point2f> featurePoints1;
vector<Point2f> featurePoints2;
for(int i=0; i<int(matches.size()); i++){
    good_matches.push_back(matches[i]);
}

//-- Draw only "good" matches
Mat img_matches;
imwrite("img_matches_orb.bmp", img_matches);
4

2 に答える 2

1

いくつかの回答が役立つ場合があります: OpenCV を使用して特徴点のマッチングを改善する

これはSIFT記述子用ですが、ORBマッチングにも使用できます:)

于 2016-05-12T13:29:32.863 に答える