Back to Adaptive Vision Library website

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

GradientImage


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
inImage const Image& Input image
inRoi Optional<const Region&> NIL Range of outGradientImage pixels to be computed
inOperator GradientOperator::Type Defines how the gradient is computed
inStdDevX const float 0.0 - 2.0f Horizontal smoothing standard deviation
inStdDevY Optional<float> 0.0 - NIL Vertical smoothing standard deviation
outGradientImage Image& Gradients of the image
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.