Calculates distance to closest zero pixel for all non-zero pixels of source image
Namespace: Emgu.CVAssembly: Emgu.CV (in Emgu.CV.dll) Version: 2.2.1.1150 (2.2.1.1150)
Syntax
C# | Visual Basic | Visual C++ |
Parameters
- src
- IntPtr
Source 8-bit single-channel (binary) image.
- dst
- IntPtr
Output image with calculated distances (32-bit floating-point, single-channel).
- distanceType
- DIST_TYPE
Type of distance
- maskSize
- 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
- array<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
- IntPtr
The optional output 2d array of labels of integer type and the same size as src and dst.