# Why we need convolution in image processing?

To my understanding, there are two methods to do linear filtering. One is cross-correlation, and another is convolution. Convolution requires 'flipping' the kernel when you do the calculation.

I think that you can simply do cross-correlation without doing convolution. So I wonder why to choose convolution instead of correlation in image processing.

• Filtering per se requires convolution. Cross correlation is mathematical the same as cross correlation with a flipped (time or space) kernel. If the kernel is symmetric convolution and correlation are identical operations. Sep 26, 2022 at 13:29

i.e. if you have multiple filters you could apply conv(x, conv(h1, h2)) could be computed as conv(conv(x, h1), h2), conv(conv(x, h2), h1), conv(x, conv(h2, h1)) (and others commuting x with the filters), so for analysis it is nice to use convolution, you can manipulate it like multiplications. In fact in the frequency domain the convolution reduces to a multiplication.
Be careful what you mean when you say cross-correlation: In statistical signal processing, that means: $$R_{xy} (\tau) = E\left [ x(t) y(t+\tau) \right ]$$ where $$E$$ is the expectation operation. This has little to do with convolution.