On the big image (screen shot) there are a lot of different small images, each of which at the time of the screen shot can be in one of the states (frames). It is necessary to find the X, Y coordinates of each of the small images on the large image. Obviously, this can be done according to the principle of brute force, i.e. going through each pixel of a large image and comparing with each of the possible states (Number of small images * number of frames) - but this is a very long and bad option - so I hope someone will tell a more beautiful and fast algorithm for solving this problem.
Important reservations:
When solving this problem, it is assumed that each frame of each small image is known (available as a separate image file), and when it appears on a large image, it does not rotate or scale.
there is no need to establish what kind of image this is - only the coordinates on the large image are important.
The program is written in C #, but in principle I am looking for not ready-made code, but a description of the action algorithm, so the language is not important in principle, ideally, it is generally a sequence of actions not tied to any language.