direction
Top  Previous  Next

direction ( integer Input, integer Output )

Use this function to perform the direction transform of an image or selection. The function builds a multiphase image with pixel indexes corresponding to the direction of the intensity gradient in the input image. Values from 1 to 8 correspond to eight major directions starting from the positive X-axis clockwise. The zero value indicates the absence of gradient in the target point.

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

This set of statements builds the direction map of a sample image:  
 
setCurDir ("samples")  
loadIm (1,"sample4.iwd")  
direction(1,2)