| Cv2FindContoursAsMat Method |
Finds contours in a binary image.
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public static Mat<Point>[] FindContoursAsMat(
InputOutputArray image,
RetrievalModes mode,
ContourApproximationModes method,
Nullable<Point> offset = null
)
Public Shared Function FindContoursAsMat (
image As InputOutputArray,
mode As RetrievalModes,
method As ContourApproximationModes,
Optional offset As Nullable(Of Point) = Nothing
) As Mat(Of Point)()
public:
static array<Mat<Point>^>^ FindContoursAsMat(
InputOutputArray^ image,
RetrievalModes mode,
ContourApproximationModes method,
Nullable<Point> offset = nullptr
)
static member FindContoursAsMat :
image : InputOutputArray *
mode : RetrievalModes *
method : ContourApproximationModes *
?offset : Nullable<Point>
(* Defaults:
let _offset = defaultArg offset null
*)
-> Mat<Point>[]
Parameters
- image
- Type: OpenCvSharpInputOutputArray
Source, an 8-bit single-channel image. Non-zero pixels are treated as 1’s.
Zero pixels remain 0’s, so the image is treated as binary.
The function modifies the image while extracting the contours. - mode
- Type: OpenCvSharpRetrievalModes
Contour retrieval mode - method
- Type: OpenCvSharpContourApproximationModes
Contour approximation method - offset (Optional)
- Type: SystemNullablePoint
Optional offset by which every contour point is shifted.
This is useful if the contours are extracted from the image ROI and then they should be analyzed in the whole image context.
Return Value
Type:
MatPointDetected contours. Each contour is stored as a vector of points.
See Also