genImpulse
|
|
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.
|
|
Level
|
|
A positive floating variable or constant specifying the maximum level of noise impulses. The actual intensities of the impulses are randomly distributed between -Level and +Level.
|
|
Density
|
|
An integer between 1 and 100 specifying the average spatial density of the noise in relative units. The coordinates of noise impulses are randomly distributed over the image or selection area.
|
Default value: 50
|
|
ERR_OK
|
|
The flag set if successful.
|
|
ERR_FAILED
|
|
The flag set if failed.
|
This set of statements continuously grabs an image and superimposes an impulse noise on it:
|
|
do
|
grabim(0)
|
level=getMaxPixel(0)*0.75
|
genImpulse (0, 1, level, 30)
|
loop
|
|