0
votes

I am doing keypoint detection and matching in opencv to stitch two images.

When the images are small, it works well. But when dealing with larger images, the number of keypoints detected is increased, and therefore it cost a lot of time to match them. But in order to stitch the images, it seems that we don't need so many keypoints. In order to increase efficiency, is there any way to only detect a limited number of keypoints?

In the code, I use SiftFeatureDetector and SiftDiscriptorExtractor to detect keypoints and extract descriptors.

Regards.

1

1 Answers

1
votes

My advise:

Re-size the image so they become much smaller and then execute feature matching. Once you have a fast solution (Homography) apply it and than the next matching will be much faster.

You do have a way to easily control the amount of features. You can rise the threshold and as a result less features will be selected. You can even wrap the threshold in while() loop. It rises the threshold until features amount is less than N (but grater than some M).

Look at full code example I posted here:

Calculate offset/skew/rotation of similar images in C++