You are here: Start » AVL.NET » AVL.GradientDirAndPresenceImage(AvlNet.Image, AvlNet.Region, AvlNet.GradientMaskOperator, float, AvlNet.Image)
AVL.GradientDirAndPresenceImage(AvlNet.Image, AvlNet.Region, AvlNet.GradientMaskOperator, float, AvlNet.Image)
| Namespace: | AvlNet |
|---|---|
| Assembly: | AVL.NET.dll |
Syntax
public static void GradientDirAndPresenceImage( AvlNet.Image inImage, AvlNet.Region inRoi, AvlNet.GradientMaskOperator inOperator, float inEdgeThreshold, out AvlNet.Image outDirectionsImage )
Parameters
- inImage
- Type: AvlNet.Image
- inRoi
- Type: AvlNet.Region
- inOperator
- Type: AvlNet.GradientMaskOperator
- inEdgeThreshold
- Type: System.Single
- outDirectionsImage
- Type: AvlNet.Image
Description
The operation computes the angle of the intensity change direction at each pixel of the inImage. Firstly the selected inOperator is used to obtain two-dimensional gradient vector at each pixel. When this vector length exceeds inEdgeThreshold the angle of the vector is calculated, scaled and stored in outDirectionsImage pixel.
This operation always generates mono image with uint8 pixel type on output, regardless of input image format, with following pixel values:
- When gradient length does not exceed threshold, the value of 0 is stored in pixel.
- When gradient length exceeds threshold, its angle is scaled to range 1...255 and stored in pixel value.
Hardware Acceleration
This operation is optimized for SSE2 technology for pixels of type: UINT8.
This operation supports automatic parallelization for multicore and multiprocessor systems.
Hardware acceleration settings may be manipulated with Settings class.
