Back to Aurora Vision Library website

You are here: Start » Function Reference » Image » Image Features » DistanceTransform


Header: AVL.h
Namespace: avl
Module: FoundationBasic

Computes an image in which the pixel values denote the estimated distances to the nearest bright pixel in the input image.

Applications: This is an initial step of some advanced traditional image analysis algorithms.


void avl::DistanceTransform
	const avl::Image& inImage,
	int inThreshold,
	float inStraightDistance,
	float inDiagonalDistance,
	float inMaxDistance,
	avl::Image& outImage


Name Type Range Default Description
Input value inImage const Image& Input image
Input value inThreshold int 0 - + 128 Minimal brightness above which pixels are called bright
Input value inStraightDistance float 0.0 - 1.0f Distance between two neighboring in a row or a column pixels
Input value inDiagonalDistance float 0.0 - 1.414f Distance between two pixels connected by vertices
Input value inMaxDistance float 0.0 - 255.0f Maximum value of the calculated distance
Output value outImage Image& Output distance image