SIFT is not finding any features in reference image in OpenCV
Asked Answered
S

3

7

I have an image of the target logo that I am trying to use to find target logos in other images. I am currently running two different detection algorithms to help me detect any logos on the image. The first detection algorithm I use is Histogram based in which I search the image for a general area on screen where the colors are very similar. From there I run SIFT to further get the object that I am looking for. This works on most logos however the Target logo that I have isn't even picking up and keypoints in the logo.

I was wondering if there was anything I could do to help locate some keypoints in the image. Any advice is greatly appreciated.

Below is the image that isn't being picked up by SIFT:

enter image description here

Thanks in advance.

EDIT I tried using Julien's idea for template matching based on different scales and rotations of the model, but still got little results. I have included an image that I am trying to test against.

Image of the logo

Speechmaking answered 26/7, 2011 at 15:9 Comment(2)
There simply are no points that qualify as key points (it's obvious - there is nothing that distinguishes a point on a circle from any other point on that circle). You'll have to switch to a non-keypoint method for this logo.Fiona
@etarion: What would be a good non-keypoint method in this case? I've trained using Haar Characteristics and training them using Adaboost, but that's been over 3 weeks ago and it's still on stage 3.Speechmaking
P
11

There is no keypoint in your image...

Why ?

  • Because there is no keypoint in a uniform color plane (why would there be ? as it is uniform nothing is an highlight)
  • Because everything is symmetric in your image, it wouldn't really help to have keypoints, according to certain feature extractor they would have the same feature vectors
  • Because there's no corner or high gradient in cross directions which would result in keypoints fro many feature detectors

What you could try is a template matching method if you are searching for this logo without big changes (rotation, translation, noise etc) a simple correlation is the easiiiiest.

If you want to go further, one of my idea, that I have never implemented but which could be funny : would be to have sets of this image that you scale, rotate, warp, desaturate, increase noise with functions and then apply template matching with this set of images you got from your former template... Well this idea comes from SIFT and Wavelet transform, where we use sort of functions that we change in some ways (rotation, noise, frequency etc...) in order to give robustness to our transform against these basic changes that occur in any image that you want to "inspect". That could be an idea for you !

enter image description here

Here is an image summarizing my idea, you rotate and scale your template, actually it creates a new rotated/scaled template that you can try to match, it will increase robustness (even if it can be very long if you choose a lot of parameters to change). Well i'm not saying that's an algorithm, but it could be a funny and very basic idea to try...

Julien,

Palaeo answered 26/7, 2011 at 18:54 Comment(0)
C
1

There is another reason that this logo is problematic for feature matching. Most features work pretty bad with artificial images that doesn't have any smoothness. All the derivatives are exactly 1 pixel size and features detector rely on derivatives. You have to smooth the image a bit. Ofcorse for this specific logo it will not help due to high symmetry. You can use hough transform to detect circles inside circles. It would give you better results in comparison with template matching.

Carchemish answered 27/7, 2011 at 17:40 Comment(4)
For sure, Hough Circle would give good results, however, you will detect other features that you don't want...i think it could be a very good idea if you you use it with a color detector (if the logo is always red)...Palaeo
At the moment I use a color detector to limit the Region of Interest to only a portion of the image, then I would use SIFT to try and detect the features between the two images and use KNN to match it. However, because this logo has no features it stops me dead in my tracks. Still trying to figure out some sort of safety net that isn't expensive.Speechmaking
Did you try my solution with scale and rotation ? In your case, on a car, itPalaeo
I did implement a function that did what you mentioned and I only got results if I scaled the image down by 1/16 every iteration and if I added contrast to the logo with projection. It literally ran for a good 14 hours before it found something close to similar.Speechmaking

© 2022 - 2024 — McMap. All rights reserved.