Click or drag to resize
CvInvokeDistanceTransform Method
http://www.emgu.com
Calculates distance to closest zero pixel for all non-zero pixels of source image

Namespace: Emgu.CV
Assembly: Emgu.CV.World (in Emgu.CV.World.dll) Version: 3.2.0.2682 (3.2.0.2682)
Syntax
public static void DistanceTransform(
	IInputArray src,
	IOutputArray dst,
	IOutputArray labels,
	DistType distanceType,
	int maskSize,
	DistLabelType labelType = DistLabelType.CComp
)

Parameters

src
Type: Emgu.CVIInputArray
Source 8-bit single-channel (binary) image.
dst
Type: Emgu.CVIOutputArray
Output image with calculated distances (32-bit floating-point, single-channel).
labels
Type: Emgu.CVIOutputArray
The optional output 2d array of labels of integer type and the same size as src and dst. Can be null if not needed
distanceType
Type: Emgu.CV.CvEnumDistType
Type of distance
maskSize
Type: SystemInt32
Size of distance transform mask; can be 3 or 5. In case of CV_DIST_L1 or CV_DIST_C the parameter is forced to 3, because 3x3 mask gives the same result as 5x5 yet it is faster.
labelType (Optional)
Type: Emgu.CV.CvEnumDistLabelType
Type of the label array to build. If labelType==CCOMP then each connected component of zeros in src (as well as all the non-zero pixels closest to the connected component) will be assigned the same label. If labelType==PIXEL then each zero pixel (and all the non-zero pixels closest to it) gets its own label.
See Also