2
$\begingroup$

The difference between convolution and cross-correlation from a signal-analysis point of view

The above question gives very good information from signal processing point of view. But what about images?How we can differentiate between convolution and correlation from image processing point of view ?since in my understanding signals are usually 1D and images are 2D matrices

$\endgroup$
4
  • 2
    $\begingroup$ it's exactly identical. (and I'd say an image is just a 2D signal, I wouldn't make that distinction between image and signal. If we did make that distinction, the name of this site would be kind of ill-fitting!) $\endgroup$ Jul 26, 2022 at 7:55
  • $\begingroup$ May help $\endgroup$ Jul 26, 2022 at 8:11
  • $\begingroup$ The difference is exactly the same -- obfuscated by the fact that for image processing, you're almost always applying symmetrical filters, so for the purpose of filtering you can confuse convolution and correlation and get the same result. $\endgroup$
    – TimWescott
    Jul 26, 2022 at 14:59
  • 3
    $\begingroup$ Does this answer your question? Difference Between Correlation and Convolution in the Context of Image Processing $\endgroup$
    – Dima
    Jul 27, 2022 at 14:10

1 Answer 1

1
$\begingroup$
  • Convolution is the operation of applying a linear shift invariant on an image.
  • Correlation is the operation of searching the template which is most similar in the $ {L}_{2} $ metric.
  • When building the operators in their matrix form they are the adjoint of each other.
  • For symmetric kernels they yield the same result (Assuming the same boundary conditions).

From Difference Between Correlation and Convolution in the Context of Image Processing by Dima:

Convolution is correlation with the filter rotated 180 degrees. This makes no difference, if the filter is symmetric, like a Gaussian, or a Laplacian. But it makes a whole lot of difference, when the filter is not symmetric, like a derivative.

The reason we need convolution is that it is associative, while correlation, in general, is not. To see why this is true, remember that convolution is multiplication in the frequency domain, which is obviously associative. On the other hand, correlation in the frequency domain is multiplication by the complex conjugate, which is not associative.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.