Line Crossing πŸ‘£

Rhombus Line Crossing Guide

Table of Contents


Overview

Rhombus Line Crossing allows you to track when a person or vehicle moves between two defined regions in a camera feed. To enable Line Crossing, you must create "inside" and "outside" regions that form a region set. This set is then used to count entry and exit events.


Endpoint Information

1. Retrieve Line Crossing Events

Endpoint: /report/getThresholdCrossingEvents

Description: Use this endpoint to retrieve events related to line crossings for specified devices within a given time range.

Parameters:

  • crossingObject : Human or Vehicle
  • startTimeMs (required): Start time for the query in epoch ms
  • endTimeMs (required): End time for the query in epoch ms
  • devices (required): Array of device UUIDs to query

Example Body Request:

{
  "crossingObject": "HUMAN",
  "devices": [
    "CAMERA_UUID"
  ],
  "startTimeMs": 1723044419000, 
  "endTimeMs": 1723649219358
}

Example Response:

{
  "deviceToThresholdCrossingEventMap": {
    "CAMERA_UUID": [
      {
        "crossingObject": "HUMAN",
        "direction": "EGRESS",
        "timestampMs": 1723572999705
      },
      {
        "crossingObject": "HUMAN",
        "direction": "INGRESS",
        "timestampMs": 1723572983053
      },
      // ... more events ...
    ]
  },
  "error": false
}

Test here πŸ‘‰ /getThresholdCrossingEventsπŸ‘ˆ


2. Retrieve Line Crossing Events

Endpoint: /report/getThresholdCrossingEventsForDevice

Description: Use this endpoint to retrieve events related to line crossings for the specified devices within a given time range.

Parameters:

  • crossingObject: Human or Vehicle
  • startTimeMs (required): Start time for the query in epoch ms
  • endTimeMs (required): End time for the query in epoch ms
  • deviceUuid (required): Device UUID to query
  • maxPageSize : Max number of results to return. Response's lastEvaluatedKey will be null if no additional results are available
  • lastEvaluatedKey : Should be null on first request and populated on subsequent requests if provided in the response to retrieve the next page

Example Body Request:

{
  "crossingObject": "HUMAN",
  "devices": [
    "CAMERA_UUID"
  ],
  "startTimeMs": 1723044419000, 
  "endTimeMs": 1723649219358,
  "lastEvaluatedKey": 1, 
  "maxPageSize": 1,
}

Example Response:

{
  "deviceToThresholdCrossingEventMap": {
    "CAMERA_UUID": [
      {
        "crossingObject": "HUMAN",
        "direction": "EGRESS",
        "timestampMs": 1723572999705
      },
      {
        "crossingObject": "HUMAN",
        "direction": "INGRESS",
        "timestampMs": 1723572983053
      },
      // ... more events ...
    ]
  },
  "error": false
}

Test here πŸ‘‰ /getThresholdCrossingEventsForDeviceπŸ‘ˆ


3. Get Camera Configuration Details

Endpoint: /deviceconfig/getFacetedConfig

Description: Use this endpoint to retrieve the detailed configuration of a specific camera.

Parameters:

  • deviceUuid (required): UUID of the device to query

Example Body Request:

{
  "deviceUuid" : "XXXXXXXXXXXXX"
}

Example Response:

{
  "config": {
    
    //.. other video settings ...
    
    "videoFacetSettings": {
      "v0": {
        "cross_counting": true,
        "cross_counting_settings": {
          "in_roi": [
            {
              "coordinates": [
                {"x": 0.5, "y": 0.1},
                {"x": 0.5, "y": 0.9},
                {"x": 0.6, "y": 0.1},
                {"x": 0.6, "y": 0.9}
              ]
            }
          ],
          "out_roi": [
            {
              "coordinates": [
                {"x": 0.5, "y": 0.1},
                {"x": 0.5, "y": 0.9},
                {"x": 0.4, "y": 0.1},
                {"x": 0.4, "y": 0.9}
              ]
            }
          ]
        },
        // ... other video settings ...
      }
    }
  },
  "error": false
}

Test here πŸ‘‰ /getFacetedConfigπŸ‘ˆ