Sobel edge detection highlights all edges contained in the image regardless of direction. The algorithm is applied as a vector sum of two directional edge operators. The resulting image is transformed from the original
image such that locations with a constant brightness value are transformed into black areas, while locations with varying brightness are transformed into white areas.
Vertical and horizontal directional mask:
-1
0
1
-1
-2
-1
-2
0
2
0
0
0
-1
0
1
1
2
1
Formula for calculating the direction (phase).
Formula for amplitudes by definition.
Formula for approximate amplitude calculation.
Preview
Example
Original image
Convolution result with vertical directional mask
Convolution result with horizontal directional mask
Directional image
Sobel edge detection result - calculated according to the definition
Sobel edge detection result - calculated using an approximate formula