As Richard Gloaguen said, the cross correlation of g(x) and h(x) is a convolution of g(-x) and h(x).
In signal processing,
The convolution of f(x) and h(x) in time domain can be considered as using the filter h(x) to processing the signal f(x). The characteristic of the filter h(x) is represented in frequency domain as H(w).
The cross correlation of f(x) and g(x) in time domain is used to determine the similarity between signal f(x) and g(x). Based on the cross corelation information, we can align two signal f(x) and g(x).
Adding to the excellent answers above. To my understanding, the correlation is used for determining how much similarity there are between two signals; in this case, two images. If you're doing correlation between an image (whatever scene) and another image (which includes some object or corresponds to a fractional of the another image) the outcome image should be whole black, with white point(s) where exist total matching.
Convolution is used in filtering purposes. On image enhancement could help to local contrast, to simulate low field depth for background of an photo. It is necessary that you perfectly learn what mask use [commonly called h(x,y)], its size and their values. This mask shoul be different for a specific task. Greetings and I hope that this information to help you.
For image matching, the cross correlation can work some time. Its strengh is that it's simple and easy to implemenation, but its drawback is that it's too simple to deal with some complex image matching problem.
If the objects in two images are not exactly same, such as different orientation, different size, etc, the cross correlation can't give us a perfect matching result. To my knowledge, the SURF is a good method to deal with this complex image matching or image registration problem. Matlab contains the toolbox on this method:
That is the main problem with cross-correlation, and there are several better methods for the image matching. Although, could be a good first attempt, but with the limitations above mentioned.