v1
find_and_draw_contours(image, color=(255, 0, 255), thickness=3)
¶
Finds and draws contours on the image.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
image |
ndarray
|
Input thresholded image. |
required |
color |
tuple
|
Color of the contour lines in BGR. Defaults to purple (255, 0, 255). |
(255, 0, 255)
|
thickness |
int
|
Thickness of the contour lines. Defaults to 3. |
3
|
Returns:
Name | Type | Description |
---|---|---|
tuple |
Tuple[ndarray, int]
|
Image with contours drawn and number of contours. |
Source code in inference/core/workflows/core_steps/classical_cv/contours/v1.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
|