Medial axis  
Top  Previous  Next

 
Menu:   Processing > Morphology… > Geodesy->Medial axis  
Script:   medialAxis  
 
Use this command to perform the medial axis transform of a binary images
. The function works by finding local maxima on the Distance Transform
of the image, thus extracting those pixels equidistant from the boundaries of objects. The size and shape of the neighborhood kernel used in the operation is selected with the Probe option. The values in the output image represent the distances to the boundaries of the original objects and can be used to find their maximum and minimum widths. The operator could be inverted, restoring the original binary objects from their medial axes.

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.  

Probe
 
Lets you chose the size and shape of the kernel used in the operation. Probe elements with check marks are active, empty elements are ignored. Choose among the following most usable kernels:  

#1
1x3 vertical bar
#4
3x1 horizontal bar
#5
3x3 cross
#10
3x3 diagonal cross
#15
3x3 square
#16
5x5 circle
 
 
Mode
 
Lets you choose the direction of the medial axis transform  
 
Select Direct to perform the direct medial axis transform and reduce the objects to single pixels.  
Select Inverse to perform the inverse transform and restore the original binary image from the result of its direct transform.  

Multiphase
 
Select this check box to create an output image of the multiphase type. If this box is unchecked, a grayscale 16-bit image will be created instead. Selecting a multiphase output image makes an output image more perceptible due to steep color differences between adjacent levels, but limits the maximum objects' size to 256 pixels.