@note The explanation below belongs to the book **Learning OpenCV** by Bradski and Kaehler.
-### Convolution
+### Correlation
-In a very general sense, convolution is an operation between every part of an image and an operator
+In a very general sense, correlation is an operation between every part of an image and an operator
(kernel).
### What is a kernel?
![](images/filter_2d_tutorial_kernel_theory.png)
-### How does convolution with a kernel work?
+### How does correlation with a kernel work?
Assume you want to know the resulting value of a particular location in the image. The value of the
-convolution is calculated in the following way:
+correlation is calculated in the following way:
-# Place the kernel anchor on top of a determined pixel, with the rest of the kernel overlaying the
corresponding local pixels in the image.
-# *kernel*: The kernel to be scanned through the image
-# *anchor*: The position of the anchor relative to its kernel. The location *Point(-1, -1)*
indicates the center by default.
- -# *delta*: A value to be added to each pixel during the convolution. By default it is \f$0\f$
+ -# *delta*: A value to be added to each pixel during the correlation. By default it is \f$0\f$
-# *BORDER_DEFAULT*: We let this value by default (more details in the following tutorial)
-# Our program will effectuate a *while* loop, each 500 ms the kernel size of our filter will be