http://www.emgu.com
Assembly: Emgu.CV (in Emgu.CV.dll) Version: 2.3.0.1416 (2.3.0.1416)
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.3.0.1416 (2.3.0.1416)
Syntax
C# |
---|
public static void cvDistTransform( IntPtr src, IntPtr dst, DIST_TYPE distanceType, int maskSize, float[] userMask, IntPtr labels ) |
Visual Basic |
---|
Public Shared Sub cvDistTransform ( _ src As IntPtr, _ dst As IntPtr, _ distanceType As DIST_TYPE, _ maskSize As Integer, _ userMask As Single(), _ labels As IntPtr _ ) |
Visual C++ |
---|
public: static void cvDistTransform( IntPtr src, IntPtr dst, DIST_TYPE distanceType, int maskSize, array<float>^ userMask, IntPtr labels ) |
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.