I consulted the professor. Turns out the animation in Wikipedia is wrong. Even though thanks to the symmetry the result is the same.
Difference between Convolution and Correlation
-
06-10-2022 - |
Question
In our lectures at the university, we got following definition for Correlation with a Kernel K with dimension n:
sum of sum of K(i,j) * I(x+i, y+j), where i,j goes from -n to n.
Convolution is defined as follows:
sum of sum of K(i,j) * I(x-i, y-j), where i,j goes from -n to n.
However, looking at the animation here:
The way they do the convolution is how correlation is defined.
Whats going on here? Is the definition given at the lectures wrong?
Solution 2
OTHER TIPS
The definition is absolutely correct.
Important point to note here is, both correlation and convolution are identical only when the filter I
is symmetric.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow