drawContours function
Mat
drawContours(
- InputOutputArray image,
- Contours contours,
- int contourIdx,
- Scalar color, {
- int thickness = 1,
- int lineType = LINE_8,
- InputArray? hierarchy,
- int maxLevel = 0x3f3f3f3f,
- Point? offset,
DrawContours draws contours outlines or filled contours.
For further details, please see: https:///docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#ga746c0625f1781f1ffc9056259103edbc
Implementation
Mat drawContours(
InputOutputArray image,
Contours contours,
int contourIdx,
Scalar color, {
int thickness = 1,
int lineType = LINE_8,
InputArray? hierarchy, // TODO: replace with vec
int maxLevel = 0x3f3f3f3f,
Point? offset,
}) {
offset ??= Point(0, 0);
hierarchy ??= Mat.empty();
cvRun(
() => cffi.DrawContoursWithParams(
image.ref,
contours.ref,
contourIdx,
color.ref,
thickness,
lineType,
hierarchy!.ref,
maxLevel,
offset!.ref,
),
);
return image;
}