Sobel  
Top  Previous  Next

 
Menu:   Processing > Filters… > Edges->Sobel  
Script:   sobel  
 
Use this function to detect principal edges or their directions on an image by applying the Sobel operator: The filter is based on the following kernels:

sobel1      sobel2

The application of each kernel to the original image creates two auxiliary differential images X
dif and Ydif that 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 a given image type.


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

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

Output
 
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.  

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

Mode
 
Lets you choose the mode in which the results of the application of both kernels are combined:  
 
Select Sum to have the target pixel substituted with the sum of the absolute values of the pixels in two differential images:  
sobel3  
 
Select Max to to have the target pixel substituted with the maximum absolute value from two differential images:  
sobel4  
 
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:  
sobel5  
 
Select Phase to have the target pixel substituted with the angle of the gradient direction:  
sobel6  
 
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.