Top  Previous  Next

laplace ( integer Input, integer Output [, integer Invert =0, integer Type =1 ] )

Use this function to detect points, lines and edges while suppressing regions of constant gradient by applying the Laplacian operator to an image. The Laplacian is an approximation to the linear second derivative of the intensity:


The approximation is done using a convolution kernel, which depends on the Type value. If an overflow occurs, the result is clipped to the minimum or maximum pixel value for the given image type.

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.  
A boolean integer specifying if the outcome of the function should be inverted. Must be one of the following values:  
FALSE – the direct mode. Uses the kernels described below.  
TRUE – the inverse mode. The sign of the kernel elements is inverted.  
Default: FALSE  
An enumerated integer that defines the kernel for the operator. Must be one of the following values:  
M_4CONN – the 4-connected kernel  
M_8CONN – the 8-connected kernel  
M_ISOTROP – the isotropic kernel  
Default value: M_8CONN  
Error flags

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


This set of statements continuously captures an image and performs edge detection by applying the Laplacian operator:  
grabIm (0)  
laplace (0, 1, FALSE, M_8CONN)  
loop while getError()=ERR_OK  

A value of 128 is added to the result, i.e., zero crossings occur for 128.