Back to Aurora Vision Library website

You are here: Start » Function Reference » Image » Image Local Transforms » GradientImage

GradientImage


Header: AVL.h
Namespace: avl
Module: FoundationLite

Computes a gradient image with smoothing operator of any size. The output pixels are signed.

Syntax

C++
C#
 
void avl::GradientImage
(
	const avl::Image& inImage,
	atl::Optional<const avl::Region&> inRoi,
	avl::GradientOperator::Type inOperator,
	const float inStdDevX,
	atl::Optional<float> inStdDevY,
	avl::Image& outGradientImage,
	avl::Image& diagGradientDirections
)

Parameters

Name Type Range Default Description
Input value inImage const Image& Input image
Input value inRoi Optional<const Region&> NIL Range of outGradientImage pixels to be computed
Input value inOperator GradientOperator::Type Defines how the gradient is computed
Input value inStdDevX const float 0.0 - 2.0f Horizontal smoothing standard deviation
Input value inStdDevY Optional<float> 0.0 - NIL Vertical smoothing standard deviation
Output value outGradientImage Image& Gradients of the image
Diagnostic input diagGradientDirections Image& Gradient directions presented in a human readable format

Remarks

Please note that about a half of the pixels will be negative and in the preview windows they will be displayed as black.

Hardware Acceleration

This operation supports automatic parallelization for multicore and multiprocessor systems.

Errors

List of possible exceptions:

Error type Description
DomainError Region exceeds an input image in GradientImage.