Reputation: 594
I'm trying to compare two images by features detection.
The main goal is to find out if the two pictures are similar or not and if they are not I'll skip to the next model and compare those two until I'll found the one who is most similar.
I've managed to detect good features in both image but struggling in comparing the twos. Both images are getting around 100-200 features and manually I can find some matching points which are sitting in the same places in both.
unfortunately, the matchFeatures
command is pretty straight forward and it simply compares 1 feature to another without using the other features.
This will and is not work simply because the two images are not the same picture.
They might be the same object but not taken at the same time. so I can't actually compare singular feature to a singular feature.
I'm trying to compare shapes.
So like I'll make an imaginary shape from the dots (features) in one image and try to find something similar in the other picture.
I tried to manually building a recursive function that computes similar distances in both and trying to find some more similar distances that are continuing from those dots, but the complexity is very big and matlab is having hard time doing it so I quitted.
I have kind of stucked here and I'm looking for some fresh ideas how to manage it.
To sum up (or TL;DR) I'm trying to do this:
but rather than comparing singular feature to a singular feature, comparing group of features (I don't even need their description, just the location) into a group of features by the shape they are creating.
Upvotes: 0
Views: 729
Reputation: 39389
I would not give up on feature matching just yet. What exactly is the problem you are having? Too few correct matches or too many incorrect ones?
If you have too few correct matches, you can try tweaking the parameters of the feature detector to detect more points. 100-200 is actually rather few. Try reducing the metric threshold and increasing the number of scale levels. You can also try tweaking the parameters of matchFeatures
to allow more matches.
If you have too many spurious matches, then you can try using the estimateGeometricTransform
function to compute the geometric transformation between the two images and eliminate outlier matches.
Upvotes: 1