# Best way to find an object in a picture

I'm trying to find an object in a picture, my solution is to take the picture and a photo of the object and find the maximum of the mutual covariance, this is my project on GitHub: ImageFinder

It works but if the object is rotated or transformed it doesn't work well. Which other method should I use?

I thought that a good way can be to look for the object through the colors and then try to rotate the image or to resize it while does not match, but this idea need an improvement.

There is no "best method", it will vary according to application. There are many trains of thought regarding this subject.

I've done something in that area using Cepstral Analysis. Take a look at this:

Note: I am the author of the above.

Basically, you do the following:

1. Sum the target image and the object
2. Calculate the Cepstrum of said sum.
3. Find the peaks (there will be 2, you have to resolve the ambiguity using something like SAD)
4. The location of the peak will tell you the translation you must apply to the image.