highpass
Top  Previous  Next

highpass ( integer Input, integer Output, integer SizeX, integer SizeY [, floating Factor =1] )

Use this function to extract high frequency components from an image or selection. The filter works by subtracting the result of the
lowpass operator from the original image. The cutoff frequency is determined by the size of the filter kernel. If an overflow occurs, the result is clipped to the minimum or maximum pixel value for the given image type.

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.  
 
SizeX  
 
An odd integer between 1 and 2*Overscan+1 specifying the width of the filter kernel which determines the horizontal cutoff frequency. The larger the width is, the smaller cutoff frequency will be. The Overscan setting is defined in ImageWarp Preferences.  
 
SizeY  
 
An odd integer between 1 and 2*Overscan+1 specifying the height of the filter kernel which determines the vertical cutoff frequency. The larger the hight, the smaller cutoff frequency is.  
 
Factor  
 
A floating variable or constant specifying the amplification factor for high frequencies. The difference between the original and lowpass image is multiplied by this value.  
Default value: 1.  
 
Error flags

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

Example

This set of statements continuously captures an image and performs phase detection by applying the highpass filter:  
 
do  
grabIm (0)  
highpass (0, 1, 5, 5, 3)  
loop while getError()=ERR_OK