Convolution
A convolution operation is a cross-correlation where the filter is flipped both horizontally and vertically before being applied to the image:
It is written:
Suppose H is a Gaussian or mean kernel.  How does convolution differ from cross-correlation?

Continuous filtering
We can also apply continuous filters to continuous images.
In the case of cross correlation:
In the case of convolution:
Note that the image and filter are infinite.

Image gradient
The gradient of an image:
The gradient points in the direction of most rapid change in intensity

Effects of noise
Consider a single row or column of the image
Plotting intensity as a function of position gives a signal

Solution:  smooth first

Derivative theorem of convolution
This saves us one operation:

Laplacian of Gaussian
Consider

2D edge detection filters

Edge detection by subtraction

Edge detection by subtraction

Edge detection by subtraction

Gaussian - image filter