Image Convolution

The Discrete Convolution tool works by convolving the input image with a 3x3 kernel to calculate the value of each pixel in an output image. The tool computes a new pixel value for each possible location within the input image.

For each location, the tool multiplies the grey value of each of the nine pixels in that region of the input image by the values of the corresponding pixels in the kernel. It then adds these values together and assigns this new value to the pixel in the output image that corresponds to the origin of the kernel.

The figure below shows how the Discrete Convolution tool computes the first pixel in the output image. Note that since the kernel requires 9 input pixels to produce a single output pixel and the kernel is always fully contained within the input image, the resulting output image is smaller than the input image.

Convolving an image with a kernel

The Discrete Convolution tool performs the operation shown in the figure above at every possible kernel location within the input image.