Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pattern Matching - Find reference object in second image [OpenCV?]

I have a reference b/w image that contains a reference object (a coin for example). The object is marked by the user, that is the region of interest.

Now I want to analyze other images and find the position and rotation of that object or similar objects. The object is arbitrarily placed under the camera, but is never scaled and the viewing angle is always 90 degrees.

I have evaluated a commercial library that does exactly what I want: Euresys EasyFind

Below you can find example images of the task at hand. The current implementation uses Feature Detection of OpenCV and is not working flawlessly.

Template:

enter image description here

A match is found for the very same coin:

enter image description here

The match fails for slightly different coins:

enter image description here

The feature detection seems to be the wrong approach. I need to simply the object somehow. But if I do that (Blur, Canny, CornerHarris) feature detection does not work at all.

Any advice for a solid approach is much appreciated. An alternative libary suggestion would be great as well.

like image 955
testalino Avatar asked Nov 29 '12 10:11

testalino


1 Answers

Since you have tried quite a number of possible techniques, I would request you to go through the following links (may be you might have gone through!!!)

  1. comparision of all feature detectors and descriptors
  2. combination of surf,FREAK and brisk

your 3rd image which fails is having low contrast and it is little tricky to match perfectly with the rest two...So I did a contrast adjustment and I get the following match with Orb Feature detector and Orb Descriptor Extractor..I applied contrast adjustment to all the images before feature detection.

IMAGE 1 WITH IMAGE 3

enter image description here

IMAGE 2 WITH IMAGE 3

enter image description here

IMAGE 1 WITH IMAGE 2 (THIS COMBINATION WORKS GOOD WITH ALL DETECTOR/EXTRACTOR PAIRS)

enter image description here

For matching I have used BruteForceMatcher<Hamming> matcher Although the points are localised orientation can be quite nicely guessed. One needs to use more then one technique and do some circle detection first to limit the feature detection to as minimum ROI as possible. Plus orientation of the detected points with respect to the centre of the circle gives the new orientation info easily. With reference to the 1st link and 2nd link you can notice SURF and BRIEF are quite resistant to change in intensity of light and blurring. So a combination of SURF and BRIEF is what you can also try.

like image 191
rotating_image Avatar answered Sep 28 '22 04:09

rotating_image