Proper approach to feature detection with opencv

My goal is to find known logos in static image and videos. I want to achieve that by using feature detection with KAZE or AKAZE and RanSac.

I am aiming for a similar result to: https://www.youtube.com/watch?v=nzrqH...

While experimenting with the detection example from the docs which is great btw, i was facing several issues:

  • Object resolution: Differences in size between the known object and the resolution of the scene where the object should be located sometimes breaks the detection algorithm - the object won't be recognized in images with a low resolution although the image quality is still allright for a human eye.
  • Color contrast with the background: It seems, that the detection can easily be distracted by different background contrasts (eg: object is logo black on white background, logo in scene is white on black background). How can I make the detection more robust against different luminations and background contrasts?
  • Preprocessing: Should there be done any kind of preprocessing of the object / scene? For example enlarge the scene up to a specific size? Is there any guideline how to approach the feature detection in several steps to get the best results?

  • I think your issue is more complicated than feature-descriptor-matching-homography process. It is more likely oriented to pattern recognition or classification.

    You can check this extended paper review of shape matching:

    http://www.staff.science.uu.nl/~kreve101/asci/vir2001.pdf

    Firstly, the resolution of images is very important, because usually matching operation makes a pixel intensity cross-correlation between your sample image (logo) and your process image, so you will get the best-crosscorrelated area.

    In the same way, the background colour intensity is very important because background illumination could affect severally to your final result.

    Feature-based methods are widely researched:

    http://docs.opencv.org/2.4/modules/features2d/doc/feature_detection_and_description.html

    http://docs.opencv.org/2.4/modules/features2d/doc/common_interfaces_of_descriptor_extractors.html

    So for example, you can try alternative methods such as:

    Hog descritors: Histogram oriented gradients: https://en.wikipedia.org/wiki/Histogram_of_oriented_gradients

    Pattern matching or template matching http://docs.opencv.org/2.4/doc/tutorials/imgproc/histograms/template_matching/template_matching.html

    I think the lastest (Pattern matching) is the easiest to check your algorithm.

    Hope these references helps.

    Cheers.

    Unai.

    链接地址: http://www.djcxy.com/p/92264.html

    上一篇: 在控制台应用程序中反序列化Json

    下一篇: 使用opencv进行功能检测的正确方法