How to detect occurrencies of a small image in a larger image?

前端 未结 3 1277
别那么骄傲
别那么骄傲 2021-01-17 02:59

I would like to detect the occurrencies of a small image in a larger image, as well as coordinates.

How do I do it with C#/.NET?

相关标签:
3条回答
  • 2021-01-17 03:38

    Basic strategy.

    1. Find descriptors that can fairly specifically describe (pinpoint) the small image and can be evaluated given a certain coordinate.
    2. Find ways to evaluate that descriptor function at various locations in the larger image.
    3. Find ways to make #2 fast. If not possible, go back to #1 and try another descriptor.

    Useful ideas.

    1. Phase correlation appears to be a hot technique on SO.

      • http://en.wikipedia.org/wiki/Phase_correlation
      • Phase correlation
      • Detecting if two images are visually identical
      • Numerical Pattern Matching
    2. Image pyramid. (for its ability to speed up many classes of descriptors with minimal tinkering)

      • http://en.wikipedia.org/wiki/Pyramid_(image_processing)
    0 讨论(0)
  • 2021-01-17 03:38

    An extremely low-level way to do it would be to read in the file as a bitmap stream (assuming you can convert it to bitmap) and parse it to search for patterns. But your algorithm would have to be very, very refined. So basically, what P.Brian.Mackey said.

    0 讨论(0)
  • 2021-01-17 03:50

    Your question fits into the realm of computer vision. This is a branch of computing where even many of the simple problems require a fair understanding of image processing and algorithms. I recommend you implement a CV library like AForget.NET to simplify the task.

    0 讨论(0)
提交回复
热议问题