Searching for the variation of the image on another C# image



  • There are many different small images on a large image (screen image), each of which, at the time of the screen image, can be in one of the properties (cards). There is a need to find X,Y coordinates of each of the small pictures on the big picture. It is clear that this can be done on the principle of brutphorus, i.e. by selecting every picsel of a large picture and comparing to each of the possible circumstances (the number of small images * the number of personnel) - but this is a very long and bad option - so I hope someone will tell a more beautiful and fast algorithm of this task.

    Important reservations:

    1. In this task, it is assumed that each small image is known (i.e. as a separate fileboard) and that it is neither rotated nor scaled up in a large image.

    2. There's no need to determine what this image is, only the coordinates on the big picture are important.

    3. The programme is written on the C#, but in principle I'm looking for a description of the algorithm of action, so language is not important, ideally, a sequence of action not tied to any language.



  • Yes, classically, the task is to be accomplished through the overtake of all images and the complexity of the image. But the challenge can be considerably simplified and there are a few methods (and they can be combined).

    • The image can be translated into monochrome. One bat at a picsel. In this mode, the comparison will go very fast. And when a coincidence is found, it's always possible to check a full-coloured copy.
    • There's no need for every pickle to compare all the images in turn. You can go through all the pictures, read the first eight to 16 picels and remember. Then build a tree. Now it's enough to move the window on the original image and compare it. If the first bikes matched, it's good to check the picture. If it is right to make a picsel buffer (bytes), it may be almost O(n) to run the entire picture if the data are not found. And if you read the ILC algorithm (Knata-Moriza-Pritha to find a submarine in the line) and correctly draw up a search souff, you can do it faster.

    I have dealt with a very similar task in my time, it was necessary to compare two pictures and determine whether the change of part of the picture (cstats, this is a classic task that MPEG2 or MPEG4 coder) and the translation of the picture into a single-bite presentation has greatly accelerated the process. But I went further, I did a package of the same baytes.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2