| Cv2DistanceTransform Method |
computes the distance transform map
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public static void DistanceTransform(
InputArray src,
OutputArray dst,
DistanceTypes distanceType,
DistanceMaskSize maskSize,
int dstType = 4
)
Public Shared Sub DistanceTransform (
src As InputArray,
dst As OutputArray,
distanceType As DistanceTypes,
maskSize As DistanceMaskSize,
Optional dstType As Integer = 4
)
public:
static void DistanceTransform(
InputArray^ src,
OutputArray^ dst,
DistanceTypes distanceType,
DistanceMaskSize maskSize,
int dstType = 4
)
static member DistanceTransform :
src : InputArray *
dst : OutputArray *
distanceType : DistanceTypes *
maskSize : DistanceMaskSize *
?dstType : int
(* Defaults:
let _dstType = defaultArg dstType 4
*)
-> unit
Parameters
- src
- Type: OpenCvSharpInputArray
8-bit, single-channel (binary) source image. - dst
- Type: OpenCvSharpOutputArray
Output image with calculated distances. It is a 8-bit or 32-bit floating-point,
single-channel image of the same size as src. - distanceType
- Type: OpenCvSharpDistanceTypes
Type of distance - maskSize
- Type: OpenCvSharpDistanceMaskSize
Size of the distance transform mask, see #DistanceTransformMasks. In case of the
#DIST_L1 or #DIST_C distance type, the parameter is forced to 3 because a 3x3 mask gives
the same result as 5x5 or any larger aperture. - dstType (Optional)
- Type: SystemInt32
Type of output image. It can be MatType.CV_8U or MatType.CV_32F.
Type CV_8U can be used only for the first variant of the function and distanceType == #DIST_L1.
See Also