In image processing, a kernel, convolution matrix, or mask is a small matrix (usually 3X3 but can be any matrix size).
It is used for blurring, sharpening, embossing, edge detection, and more.
This is accomplished by doing a convolution between a kernel and an image.
Convolution is termed as the process function and also result of adding each element of the image to its local neighbors, weighted by the kernel.
Some (3×3) kernel examples are:
Identity Kernel
{0 & 0 & 0}
{0 & 1 & 0}
{0 & 0 & 0}
Edge detection Kernel
{ 1 & 0 & -1}
{ 0 & 0 & 0}
{-1 & 0 & 1}
Sharpen Kernel
{0 & -1 & 0}
{-1 & 5 & -1}
{0 & -1 & 0}
Gaussian blur 3 × 3 Kernel
. {1 & 2 & 1}
¹⁄ 16 {2 & 4 & 2}
. {1 & 2 & 1}
Comments are closed, but trackbacks and pingbacks are open.