How to choose threshold for ORB features without template matching #27
-
I see that I can choose the number of features that constitute a minimum match for the template matcher. I have two problems with this. The first concern is that the template matcher (assumedly) is not going to catch crops, or close-ups. I would assume that it would not match photos where one is just the subject, and the other has some boxes or text splattered over it. Secondly, the template matching process is sooo slow on my hardware. I also see that there is a distance setting, but as far as I understand it, that will only determine how close the found features are, and not how many have to match. Is there a way to set this currently, or is there another way to match images with the differences that I mentioned above? From my limited searching and writing a small video duplicate finder with OpenCV years ago (think OpenCV 2), I believe that the matching is done with a "database" that is indexed into buckets (or maybe multiple layer). This is a complete over simplification, but maybe close? This can be searched much quicker than looping through and manually comparing each feature one by one. Is there anything that could be sped up with a GPU, or is this a CPU bound problem? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
It is quite good at catching crops. More features are needed to catch higher levels of cropping. No way around that.
It will catch modified crops provided it isn't too much and you also disable the dct matching part (see below). As for speed you might just use the
There is no setting for how many have to match. Only a few have to match for it to work. It works like this
The feature matching is using I would like to port cbird to use OpenCV 4 (current using 2.4), maybe this will be one area to revisit. |
Beta Was this translation helpful? Give feedback.
-
Is there any info on how the scoring works. For instance, whether larger or smaller numbers will make closer matches?
I am exclusively using ORB features for similar scans now (-p.alg orb). Is the first quoted advice the only means of fine-tuning the matching? Are these steps only for the DCT algo?
I am going to have to get into studying this stuff. Also, I will be glad to test anything you want if you decide to try out other matching or indexing methods. |
Beta Was this translation helpful? Give feedback.
-
The scoring is different for each algo; lower score is better. I can't remember off the top of my head for orb, but a quick look at the code later, it seems to use the median distance for all matching features (all distances being less than So having more features (
My last message was concerned with template matching. The If so, the tunables are:
Thanks, I appreciate that. I'm getting close to another binary release. Are you on Linux/Windows? Since OpenCV 4 is on my list for 0.8, that will possibly enable more work in this area or performance improvements. There is a new feature descriptor called KAZE which might be better. |
Beta Was this translation helpful? Give feedback.
It is quite good at catching crops. More features are needed to catch higher levels of cropping. No way around that.
It will catch modified crops provided it isn't too much and you also disable the dct matching part (see below). As for speed you might just use the
orb
algo , set it to maximum of 1 match, and play with the distance parameter and score (-with score '<num'
etc. Since that …