thicken
Top  Previous  Next

thicken ( integer Input, integer Output [, integer Grow =0, integer Mode =0 ] )

Use this function to grow bright objects from their skeletons. The function is complementary to the
thicken operation. For multiphase images it works by dilating the boundaries of objects while preserving their topology and keeping the objects separated from each other. For grayscale and true-color image the function dilates the areas around the intensity "ridges", thus increasing the width of bright lines in an image.

Parameters
 
Input  
 
An integer between 0 and 116 specifying the input image frame number. A value of 0 represents the DMA memory buffer of the video device. Values in the range of 100-116 correspond to hidden frames.  
 
Output  
 
An integer between 1 and 116 specifying the output image frame number. Values in the range of 100-116 correspond to hidden frames.  
 
Grow  
 
A positive integer specifying the number of thickening steps. If this parameter is set to zero, the function will continue to iterate until the objects are completely thickened.  
Default value: 0  
 
Mode  
 
An enumerated integer that describes the thinning algorithm. Must be one of the following values:  
 
M_DISTANCE=0 – fast non-iterative method based on the distance transform.  
M_ZHANG=1 – parallel iterative method based on the modified Zhang-Suen transform.  
M_DAVIES=2 – sequential iterative method based on the Davies-Plummer algorithm.  
Default value: M_DISTANCE  
 
Error flags

ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  

Example
 
This set of statements binarizes a sample image and performs 10 thickening iterations:  
 
setCurDir ("samples")  
loadIm (1,"sample4.iwd")  
threshold(1,1,M_PRESET,0.,113.,TRUE,FALSE)  
thicken (1,2,10)