1
$\begingroup$

I can see most of the places it says "convolution is associative, while correlation, in general, is not".

Denote $*$ convolution operator, let's say you have an image $f$, which you need to convolve with $g$ and then with $h$ : $$f∗g∗h=f∗(g∗h)$$

But when I see the difference between convolution and correlation, correlation is equal to convolution but after flipping the kernel or window.

Can somebody explain with an example why correlation is not associative?

$\endgroup$
  • 1
    $\begingroup$ @OlliNiemitalo, done. It's below my usual standard for an answer, but I'm working on becoming less pedantic anyway ... ;) $\endgroup$ – Jazzmaniac Oct 18 '17 at 22:01
1
$\begingroup$

Subtraction is also not associative: (a-b)-c does not equal a-(b-c) in general. The order of the flipping of the sign matters, just like it does for the flipping of the kernel.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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