Calculates distance to closest zero pixel for all non-zero pixels of source image
Namespace:
Emgu.CV
Assembly:
Emgu.CV (in Emgu.CV.dll) Version: 2.0.1.0 (2.0.1.0)
Syntax
Parameters
- src
- Type: System..::.IntPtr
Source 8-bit single-channel (binary) image.
- dst
- Type: System..::.IntPtr
Output image with calculated distances (32-bit floating-point, single-channel).
- distanceType
- Type: Emgu.CV.CvEnum..::.DIST_TYPE
Type of distance
- maskSize
- Type: System..::.Int32
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.
- userMask
- Type: array<
System..::.Single
>[]()[]
User-defined mask in case of user-defined distance.
It consists of 2 numbers (horizontal/vertical shift cost, diagonal shift cost) in case of 3x3 mask
and 3 numbers (horizontal/vertical shift cost, diagonal shift cost, knights move cost) in case of 5x5 mask.
- labels
- Type: System..::.IntPtr
The optional output 2d array of labels of integer type and the same size as src and dst.
See Also