Kernel (image processing)

Kernel is a term borrowed from linear algebra, that in applications for image processing specifically, implies a numerical matrix that defines a linear transformation on an image matrix.

Typically, kernels are small matrices, and if the desired specific effect of a kernel is known, many computer programmers who work in image processing will know the best numerical values for a kernel. For example a four-by-four identity (here meaning it will not change the image it operates on if used in a convolution) kernel would be [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]].

In some types of image processing, the word kernel and filter are used interchangeably. Different kernels can create different effects such as enhancing contrast or blurring an image. Kernels are used in specific kinds of convolutions in convolutional neural networks.