maxmin
Top  Previous  Next

maxmin ( integer Input, integer Output, integer Strength )

Use this function to emphasize edges of objects while suppressing the noise, by using a 5x5 nonlinear convolution. The outer 16 points are searched to find the maximum and minimum values. If the difference between them is greater than a predetermined threshold, then the central pixel is replaced by whichever value, maximum or minimum is nearest to the original value.

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.  
 
Strength  
 
A positive floating argument specifying the difference between the minimum and maximum intensity in the neighborhood of each pixel. If this threshold is exceeded, the pixels from the original image will be replaced by the maximum or minimum value, whichever is nearest to the original value.  
 
Error flags

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

Example

setCurDir("samples")  
loadIm (1,"sample8.iwd")  
maxmin (1, 2, 15)