invertIm
Top  Previous  Next

invertIm ( integer Input, integer Output )

Use this function to invert pixel values in an image or selection. The following formula is used for calculating the intensity of a target pixel:

invertim

where
Imax is the maximum possible intensity value for the given image type.

In case of floating point and complex images
Imax is assigned zero, so the function will negate pixel values.

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.  
 
Error flags

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

Example

The following set of statements displays an inverted live image:  
 
do  
  grabIm (0)  
  invertIm(0,1)  
loop while getError()=ERR_OK  
 
Remark

To logically invert a binary image, use the not function.