Skip to content

Line Counter

Version v2

The LineCounter is an analytics block designed to count objects passing the line. The block requires detections to be tracked (i.e. each object must have unique tracker_id assigned, which persists between frames)

Type identifier

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

Properties

Name Type Description Refs
name str The unique name of this step..
line_segment List[Any] Line in the format [[x1, y1], [x2, y2]] consisting of exactly two points. For line [[0, 100], [100, 100]] line will count objects entering from the bottom as IN.
triggering_anchor str Point from the detection for triggering line crossing..

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

Available Connections

Check what blocks you can connect to Line Counter in version v2.

The available connections depend on its binding kinds. Check what binding kinds Line Counter in version v2 has.

Bindings
Example JSON definition of step Line Counter in version v2
{
    "name": "<your_step_name_here>",
    "type": "roboflow_core/line_counter@v2",
    "image": "<block_does_not_provide_example>",
    "detections": "$steps.object_detection_model.predictions",
    "line_segment": [
        [
            0,
            50
        ],
        [
            500,
            50
        ]
    ],
    "triggering_anchor": "CENTER"
}

Version v1

The LineCounter is an analytics block designed to count objects passing the line. The block requires detections to be tracked (i.e. each object must have unique tracker_id assigned, which persists between frames)

Type identifier

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

Properties

Name Type Description Refs
name str The unique name of this step..
line_segment List[Any] Line in the format [[x1, y1], [x2, y2]] consisting of exactly two points. For line [[0, 100], [100, 100]] line will count objects entering from the bottom as IN.
triggering_anchor str Point from the detection for triggering line crossing..

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

Available Connections

Check what blocks you can connect to Line Counter in version v1.

The available connections depend on its binding kinds. Check what binding kinds Line Counter in version v1 has.

Bindings
Example JSON definition of step Line Counter in version v1
{
    "name": "<your_step_name_here>",
    "type": "roboflow_core/line_counter@v1",
    "metadata": "<block_does_not_provide_example>",
    "detections": "$steps.object_detection_model.predictions",
    "line_segment": [
        [
            0,
            50
        ],
        [
            500,
            50
        ]
    ],
    "triggering_anchor": "CENTER"
}