emphasize
Top  Previous  Next

emphasize ( integer Input, integer Output, integer Strength )

Use this function to emphasize fine detail in an image by applying the unsharp masking technique. The difference between the original and a lowpass filtered image is computed and added to the original image. The following formula is used for calculating the intensity of the target pixel:
emphasize
.
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  
 
An integer between 0 and 16 specifying the amount of the differential image to be added to the original one. Increasing this value will increase the level of detail in the image  
 
Error flags

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

Example

This set of statements continuously grabs and emphasizes an image. The strength can be adjusted in real time with a custom control:  
 
Control(0).SetTitle("Sharpness")  
Control(0).SetRange(0,20)  
Control(0).value=1  
do  
grabIm  (100)  
emphasize (100, 1, Control(0).value)  
loop