Back to Adaptive Vision Library website
You are here: Start » Function Reference » Image Features » DistanceTransform
DistanceTransform
Computes an image in which the pixel values denote the estimated distances to the nearest bright pixel in the input image.
Header: | AVL.h |
---|
Syntax
C++
C#
void avl::DistanceTransform ( const avl::Image& inImage, int inThreshold, float inStraightDistance, float inDiagonalDistance, float inMaxDistance, avl::Image& outImage )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inImage | const Image& | Input image | |||
inThreshold | int | 0 - + | 128 | Minimal brightness above which pixels are called bright | |
inStraightDistance | float | 0.0 - | 1.0f | Distance between two neighboring in a row or a column pixels | |
inDiagonalDistance | float | 0.0 - | 1.414f | Distance between two pixels connected by vertices | |
inMaxDistance | float | 0.0 - | 255.0f | Maximum value of the calculated distance | |
outImage | Image& | Output distance image |