Sobel filter (convolution)

The Sobel filter is a set of two convolution filters used to detect horizontal and vertical edges in images.

The horizontal filter is

[101202101]

and the vertical filter is

[121000121]