Top  Previous  Next

Menu:   Processing > Filters… > Edges->Prewitt  
Script:   prewitt  
Use this function to detect edges on am image or their directions by applying the Prewitt operator: The filter calculates the approximation of the first derivative of the image. It is based on the following kernels:

prewitt1 prewitt2

The application of each kernel to the original image creates two auxiliary differential images X
dif and Ydif which are combined in a certain way depending on the Mode selected. If an overflow occurs, the result is clipped to the minimum or maximum pixel value for the given image type. Prewit filter is sensitive to the noise and should be used for well-contrasted noiseless images.

If you choose this command, the following options will become available:

Displays the input image frame number. If you want to process another image, type or select the corresponding value.  

Displays the number of the frame in which the output image will be created. Depending on the Preferences. ImageWarp will set it either to the first available value or to the Input frame number. Type or select another value if you want the output image to be created in a different frame.  

Select this check box to watch the Preview of the output image.  
Select this check box to invert the resulting image. The edges will be presented as dark lines on a bright background.  

Lets you choose the mode in which the results of the application of both kernels are combined:  
Select Sum of the absolute values of the pixels in two differential images:  
Select Max to to have the target pixel substituted with the maximum absolute value from two differential images.  
Select Sqrt to have the target pixel substituted with the square root of the sum of the squares of the pixels in two differential images.  
Select Phase to have the target pixel substituted with the angle of the gradient direction:  
The angle is measured from the positive X-axis counterclockwise. The phase value will be calculated differently depending on the type of an image. If an image is of an integer type, the target pixel representing the angle of the intensity gradient will be rescaled so the range of possible angular values (0° -359°) will be mapped on the entire intensity scale of the image. If an image is of a floating type, the phase will be reported in radians, while the absence of the gradient will be indicated by pixels with the value of negative 1.