开发者

SIFT is not finding any features in reference image in OpenCV

开发者 https://www.devze.com 2023-03-23 14:10 出处:网络
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

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 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:

SIFT is not finding any features in reference image in OpenCV

Tha开发者_高级运维nks in advance.

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

SIFT is not finding any features in reference image in OpenCV


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 !

SIFT is not finding any features in reference image in OpenCV

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,


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.


I think you can try using MSER features- https://en.wikipedia.org/wiki/Maximally_stable_extremal_regions

See an example: https://www.mathworks.com/examples/matlab-computer-vision/mw/vision_product-TextDetectionExample-automatically-detect-and-recognize-text-in-natural-images

0

精彩评论

暂无评论...
验证码 换一张
取 消