Reputation:
Is it possible to only match & level the contours in an image? Possibly symmetric matching? If so, what matcher would you use for this purpose?
Demonstration Image:
In this image of my lovely iMac, you can see that the images passed in are unleveled. This is because I took the first image at a different height than the second image.. For example:
(First Image capture)
(Second Image capture)
So, instead of matching features all over the image, I was wondering if OpenCV has any feature matcher that could limit me to match the edges of where 1 image ends, and the other one begins. That way, I could hopefully straighten them up.
What I currently use:
BestOf2NearestMatcher
GridAdaptedFeatureDetector
with GFTTDetector
SiftDescriptorExtractor
What I hope would be the result:
My target result would be to align the images in the demonstration image above.
Upvotes: 2
Views: 456
Reputation: 584
I am kind of working on the same issue. You can surely limit the feature points using some mask. In my case I know that there is 50% overlap in adjacent images, so I have used features in later half (x > im.cols)of first image and initial half of second image(x < im.cols).You can make this changes in matchers.cpp of stitching. This will eliminate the chance of false matches.
But this will fail when there are less or no feature points. I would suggest to go for line based stitching if aligning edges of object is the main concern.
Line features in opencv3.0
http://docs.opencv.org/3.0-beta/modules/line_descriptor/doc/tutorial.html
Upvotes: 2