Back to FabImage Library website

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

GradientImage


Header:FIL.h
Namespace:fil

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

Syntax

C++
C#
 
void fil::GradientImage
(
	const fil::Image& inImage,
	ftl::Optional<const fil::Region&> inRoi,
	fil::GradientOperator::Type inOperator,
	const float inStdDevX,
	ftl::Optional<float> inStdDevY,
	fil::Image& outGradientImage,
	fil::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.