1. So first you go and find features in your image.
These are characteristic points of the image (corners and line crossings are good examples) that have a lot of invariances: whatever reasonable processing you do to to your image (scaling, rotation, brightness change, adding a bit of noise, etc) it will not change the fact that there is a corner in a certain point.
“Pixel value” or “vertical lines” are bad features.
Sometimes a feature will include some numbers (e.g. the prominence of a corner) in addition to a position.
2. Then you do some clean-up, like remove features that are not strong enough.
3. Then you go to your database.
That’s something you’ve built in advance, usually by taking several nice and clean images of whatever you are trying to find, running you feature detection on them, cleaning things up, and arrange them in some data structure for your next stage —
You have to take a bunch of features form your image and try to match them against your database: do they correspond to an object you are looking for?
This is pretty non-trivial, since on the face of it you have to consider all subsets of the bunch of features you’ve found, which is exponential. So there are all kinds of smart hashing techniques to do it, like Hough transform and Geometric hashing.
5. Now you should do some verification.
You have found some places in the image which are suspect: it’s probable that they contain your object.
Usually, you know what is the presumed size, orientation, and position of your object, and you can use something simple (like a convolution) to check if it’s really there.
6. You end up with a bunch of probabilities,
basically: for a few locations, how probable it is that your object is there.
Here you do some outlier detection.
- If you expect only 1-2 occurrences of your object, you’ll look for the largest probabilities that stand out, and take only these points.
- If you expect many occurrences (like face detection on a photo of a bunch of people), you’ll look for very low probabilities and discard them.