Skip to content

Image Contours

Class: ImageContoursDetectionBlockV1

Source: inference.core.workflows.core_steps.classical_cv.contours.v1.ImageContoursDetectionBlockV1

Finds the contours in an image. It returns the contours and number of contours. The input image should be thresholded before using this block.

Type identifier

Use the following identifier in step "type" field: roboflow_core/contours_detection@v1to add the block as as step in your workflow.

Properties

Name Type Description Refs
name str Enter a unique identifier for this step..
line_thickness int Line thickness for drawing contours..

The Refs column marks possibility to parametrise the property with dynamic values available in workflow runtime. See Bindings for more info.

Available Connections

Compatible Blocks

Check what blocks you can connect to Image Contours in version v1.

Input and Output Bindings

The available connections depend on its binding kinds. Check what binding kinds Image Contours in version v1 has.

Bindings
  • input

    • image (image): The input image for this step..
    • line_thickness (integer): Line thickness for drawing contours..
  • output

    • image (image): Image in workflows.
    • contours (contours): List of numpy arrays where each array represents contour points.
    • hierarchy (numpy_array): Numpy array.
    • number_contours (integer): Integer value.
Example JSON definition of step Image Contours in version v1
{
    "name": "<your_step_name_here>",
    "type": "roboflow_core/contours_detection@v1",
    "image": "$inputs.image",
    "line_thickness": 3
}