I have read that convolution and cross-correlation are the same thing, but convolution flips 180 degrees (images), or time reverses (sequences) the kernel, before performing the elementwise multiplication of the input and the kernel.
I understand how this works on 1D signals, however I do not know how to perform these two operations for 2D images, and it's been really hard to find any good example on the web.
I would very much appreciate an example, showing both Convolution and Cross-correlation of an image. Clearly specifying what the indexes stand for and how the output image is calculated.
For example (feel free to use any other example if you think it would be better):