Top  Previous  Next

waterfall ( integer Input, integer Output [, integer Depth =0, integer Invert =0 ] )

Use this function to create basins of intensity in an image or selection. The function works by treating the image as a topographic surface, finding the local minima and using them as seed points for "flooding" the surface. You can also visualize this function as a heavy rainfall applied to the intensity surface, with a selected level of precipitation.

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.  
An integer between 1 and 116 specifying the output image frame number. Values in the range of 100-116 correspond to hidden frames.  
An integer specifying the maximum depth of "water basins" on the intensity surface. This could be also interpreted as the level of rain falling onto the surface. Increasing this parameter will result in merging of small basins into bigger ones.  
A boolean integer specifying whether the input image should be inverted before the operation is applied. Must be one of the following values:  
FALSE=0 – no inversion is performed.  
TRUE=1 – inverts the input image before applying the waterfall algorithm.  
Default value: FALSE  
Error flags

The flag set if successful.  
The flag set if failed.  


This set of statements applies the waterfall operation to a sample image:  
setCurDir ("samples")  
loadIm (1,"sample3.iwd")  
   waterfall (1,2,50)