Prewitt Edge Filter (Operator)
- Practical Electron Microscopy and Database -
- An Online Book -
|Microanalysis | EM Book http://www.globalsino.com/EM/
Similar to Sobel Edge Filter, the Prewitt Edge Filter is an operator used in image processing, particularly within edge detection algorithms (approximations of the derivatives). It computes a discrete approximation of the gradient of the image intensity function, and consists of a horizontal filter and a verticle filter and is used to detect edges of images. Both Sobel and Prewitt Filters are used extensively for detecting edges in image processing.
In the Prewitt Edge Filter case, both horizontal and verticle filters are applied to the same image and then summed to form the final image as a final filter. The two filters are basic convolution filters in the form in Figure 1006a.
Figure 1006a. Prewitt edge filter: (a) horizontal filter and (b) verticle filter.
Figure 1006b shows an filter example. The filter is centered at pixel p5 here. Based on Figures 1006a and 1006b, the value of the resulting new pixel p5 is then given by,
The actual forumla uses the horizontal and verticle components to obtain the the final form,
Therefore, the Prewitt edge filter estimates the maximum gradient of the edges, and can be used to find edge directions. In DM, the Prewitt edge filter can be programmed with scripts as shown in Table 1006.
Table 1006. Prewitt edge filter in DM.