The technique actually depends on the actual scenario. This is due to several names, such as content-based search, pattern matching, image description, etc.
My suggestions:
If your script looks like faces rotating at known angles with known sizes, look for simpler methods, such as correlating two images. Do it for every corner, and you got it.
If you know that the only change between images is rotation, this means that you only have happy and sad faces rotating without other distortions, you can look for methods to compare rotation invariants. Fourier theory can help you, as well as display the polar coordinates associated with correlations.
In the worst case scenario, when you have several options, you will need to learn about image descriptors and pattern matching methods. They also depend on the type of image, and there are several. If you are done with them, you will have a scheme with some libraries / code for extracting functions from images and a classifier to tell you which of them and which are not, with some certainty (for example, between feature vectors).
source share