2.4.2 Edge Filters

Edge filters are like a spatial 1st derivative, and are used for edge detection. Thus edge filters are susceptible to noise, so noise filtering should be done first.
Sobel Edge Detectors are direction and size sensitive, so are Prewitt Edge Detectors which are similar, except the 2's are replace by 1's (of same sign) - after Adjust Auto Levels:
Original
-101
-202
-101
-1-2-1
000
121
-1-20
-202
021
021
-202
-1-20
Note how the sign of the result also affects the appearance of the Sobel Edge output. It would be better if an alternative taking the absolute value for each pixel calculated would be available. It would be better still if there was a means to find edges which are not direction sensitive. In fact there is, which by experience I know that using a 3x3 window taking the max-min of the 9 pixels, after first removing noise with a 3x3 median filter, is better. The same effect can be achieved by subtracting the 3x3 min of an image from the 3x3 max of the image. Here is the result (after contrast and brightness adjustment). Note how all direction sensitivity has been successfully eliminated.

Other Edge filters include the: Canny Edge Detector, Compass Edge Detector and Zero Crossing Detector.