clarify
Top  Previous  Next

clarify ( integer Input, integer Output, integer Size, floating Offset, integer Invert =0 )

Use this function to clarify an image or selection by reducing noise without blurring objects of interest. The original image is compared pixel by pixel with the result of the
lowpass filter. When the absolute difference between the intensities of related pixels exceeds the Offset, pixels from the lowpass Image are selected for the output image, otherwise pixels of the original image are selected.

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.  
 
Size  
 
An odd integer between 1 and 2*Overscan+1 specifying the size of the window for the lowpass filter. The Overscan setting is defined in ImageWarp Preferences.  
 
Offset  
 
A floating variable or constant specifying the threshold for the difference between the intensity of related pixels in the original and lowpass image.  
 
Invert  
 
A boolean integer specifying if the outcome of the function should be inverted. Must be one of the following values:  
 
FALSE – the direct mode. Those pixels whose intensities fall beyond the Offset range from the intensities of the lowpass image pixels, will be replaced by the pixels from the lowpass image.  
TRUE – the inverse mode. Those pixels whose intensities fall within the Offset range from the intensities of the lowpass image pixels, will be replaced by the pixels from the lowpass image.  
 
Error flags
 
ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  

Example

setCurDir("samples")  
loadIm (1,"sample14.iwd")  
clarify (1, 2, 32, 8)