Ask Your Question
0

Approach for detecting a similar object

asked 2014-08-14 15:16:21 -0600

pwfixed gravatar image

updated 2014-08-14 15:19:05 -0600

I am trying to detect this object (let's call it "Arrow")

image description

in these two images:

Image "A" image description

and

Image "B"

image description

Right now, my approach is to load the scene image (either of the last two) in grayscale and then the object image (the arrow, first image) in grayscale and then using the SURF Feature detector, and SURF Descriptor with a Flann Based Matcher to match similar features. The problem I am running is that my object image does not have a lot of features (as you can probably tell) and it only matches Image "A".

I may be taking the wrong approach given that I am new in computer vision so I would like to ask for recommendations. Maybe I need to use a different technique in this case and my inexperience is holding me back. Or maybe I am missing something obvious. I 'd appreciate any input. Thanks!

PS: If it matters in any way, I am using the latest OpenCV java port.

edit retag flag offensive close merge delete

Comments

2

Have you tried template matching?

Haris gravatar imageHaris ( 2014-08-15 10:42:52 -0600 )edit

I thought template matching would only work with similar sized images. But I haven't tried it yet. I will give it a try.

pwfixed gravatar imagepwfixed ( 2014-08-15 11:37:32 -0600 )edit
1

That actually did the trick, I guess I can use the template matching approach for most of my objects and if it doesn't work then I 'll try to do it by feature detection. Thanks Haris!

pwfixed gravatar imagepwfixed ( 2014-08-15 11:56:32 -0600 )edit

You are welcome....I am glad it helped...:)

Haris gravatar imageHaris ( 2014-08-15 23:27:47 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2014-10-07 09:59:41 -0600

Doombot gravatar image

Haris is right in his comment. Using template matching is superb if you have a pretty similar object. You can make it robust to scale by scaling the template up and down (if you have prior knowledge you can bound that to relevant scale values) and rotation by rotating it (again you can bound it intelligently if you have some knowledge of the application). Just keep in mind that in the end, you are repeating the same detection a lot of time so it might be time-consuming, especially if you need real or close to real-time detection.

Where template matching doesn't work well (not every possibilities are listed of course):

  • Trying to detect a different kind of arrow (an arrow of a different shape, this would be a case of object class detection);
  • Having inconsistent illumination across the scene (if your template uses real pixel intensity value but no relatively illumination invariant methods such as edge detection, etc.)
edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-08-14 15:16:21 -0600

Seen: 1,837 times

Last updated: Oct 07 '14