Overview of sink types

See the various details of each sink type.

Working with REST sinks is the same as with widgets. Their output just can't be visualized on the FLOW Insights' dashboard. As the principles of such work've already been explained, this article won't repeat them. If anything seems unclear, please refer to the previous articles.

Details of sink types

The number of REST sink types has dramatically lowered, as most of them's been replaced by widgets.

Raw trajectories

This sink shows you how traffic objects' trajectories have changed in time.

JSON type identifier: raw_trajectories
History supported: No
Output heaviness: Heavy data
Additional request parameters: None
Response's data object contents:

"data": {
	"data_validity": "ok",
  "evaluation_validity": "ok",
	"object_count": 1329,
	"trajectories": [
    {
      "color": "white",
      "duration": 39142,
      "id": "8",
      "license_plate": "",
      "last_detection_score": 0.5966202020645142,
      "trajectory_score": 0.8626661896705627,
      "timestamp": "1650529144653",
      "category": "car",
      "state_data": {
        "timestamps": [
          0, 
          368,
          // ... 
        ],
        "map_positions": [
          [615951.5625, 5453988.5],
          [615951.8125, 5453992],
          // ...
        ],
        "map_speeds": [
          0.09022672474384308, 
          0.021549025550484657, 
          // ...
        ],
        "map_accelerations": [
          5.666559219360352,
          -10.65473175048828,
          // ...
        ],
        "map_speed_angles": [
          5.109283447265625,
          5.166502952575684,
          // ...
        ],
        "wgs84_positions": [
          [16.59258449695335, 49.22769412627738],
          [16.592588941067113, 49.22772555017891],
          // ...
        ],
        "sensor_positions": [
          [ 0.11871673911809921, 0.1282760351896286 ],
          [ 0.12449279427528381, 0.12761197984218597 ],
          // ...
        ],
        "bounding_boxes": [
          [
            0.25482144951820374, 0.2587209641933441,
            0.27610158920288086, 0.29117339849472046
          ],
          [
            0.2526055872440338, 0.2627129852771759,
            0.28182610869407654, 0.29768529534339905
          ],
          // ...
        ]
      }
		},
    // ...	
	]
}

Comments:

  • // ... is used as an ellipsis for shortening long data outputs.
  • trajectories - information about the traffic objects outputted by the sink
    • color - the general color of the traffic object
    • duration - how long the traffic object has been in the scene
    • id - the traffic object's unique identifier within the analytics
    • license_plate - the license plate contents of the traffic object. If none have been detected, the value is an empty string.
    • timestamp - the timestamp of the moment when this object has been detected for the first time in milliseconds since epoch
    • category - the traffic object's category. See the Trajectory view widget for a list of possible values in the Category column.
    • last_detection_score - the most recent detection confidence of the traffic object normalized to the interval 0.0-1.0
    • trajectory_score - the average of the last several detection confidence scores normalized to the interval 0.0-1.0
    • state_data - data about the traffic object's properties that change with time
      • map_positions - only available in [georegistration]. This array contains the traffic object's positions within its corresponding UTM zone. The first element of the position array is the x coordinate, the second element is the y coordinate.
      • map_speeds - only available in georegistered analytics. This array contains the traffic object's speeds in m/s.
      • map_accelerations - only available in georegistered analytics. This array contains the traffic object's acceleration in m/s².
      • map_speed_angles - only available in georegistered analytics. This array contains the traffic object's azimuths within its corresponding UTM zone in radians, with the value 0 denoting direction to the right (along the x axis).
      • timestamps - the amount of milliseconds that has passed between the moment when this object has been detected for the first time and the moment that the other state_data properties correspond to.
      • wgs84_positions - the position of the traffic object within the WGS 84 coordinate system. Only available in georegistered analytics. The first array element is the longitude, the second is latitude. They're expressed as positive or negative numbers. Positive latitude is above the equator (N), and negative latitude is below the equator (S). Positive longitude is east of the prime meridian, while negative longitude is west of the prime meridian (a north-south line that runs through a point in England).
      • sensor_positions - the position of the traffic object within the sensor's normalized coordinate space. The first array element is the x coordinate, the second is the y coordinate. E.g. in a camera image, the coordinates [0,0] correspond to the upper left corner.
      • sensor_speeds - only available in non-georegistered analytics. This array contains the traffic object's speeds in px/s.
      • sensor_acceleration - only available in non-georegistered analytics. This array contains the traffic object's accelerations in px/s².
      • sensor_speed_angles - only available in non-georegistered analytics. This array contains the traffic object's orientation within the sensor coordinate space in radians, with the value 0 denoting direction to the right (along the x axis).
      • bounding_boxes - this array contains sub-arrays, where each sub-array denotes an object's bounding box properties using 4 doubles with semantics in the following order: top left point's x coordinate, top left's y, bottom right's x, bottom right's y. The coordinates are normalized screen coordinates (values from 0 to 1 with [0,0] being in the upper left corner).

Trajectory file sink

This is a special type of sink that lets users of FLOW Insights export observed trajectories into a .tlgx file and download it through FLOW Insights' analytics' Storage menu. It's not possible to interact with it through the REST API—requesting data of this sink returns an empty result.

JSON type identifier: file


Need more help or have some questions?Contact us!