People Flow Counting
- Data streams in JSON format are output to the specified DIS channels or webhook URLs, including the people flow statistics when passing a straight line or within a specific region, and the heatmap statistics.
- Line-crossing people flow statistic on the edge
- Result example
{ "task_id":"ee7d7f5c7ba24839b6abaf5b81607496", "stream_id":"test", "event_type":131073, "timestamp":1535546730, "message_id":"849D1326-4FC8-11EA-8F73-0242AC110004", "data":{ "interval":2, "event_set":[ { "line":[ [ 480, 1440 ], [ 540, 540 ] ], "line_id":0, "side1_count":1, "side2_count":0, "side1_name":"side1", "side2_name":"side2" }, { "line":[ [ 490, 1500 ], [ 640, 340 ] ], "line_id":1, "side1_count":1, "side2_count":2, "side1_name":"in", "side2_name":"out" } ] } }
- Example of region-entering people flow statistics
{ "task_id":"ee7d7f5c7ba24839b6abaf5b81607496", "stream_id":"test", "event_type":131074, "timestamp":1535546604, "message_id":"849D1326-4FC8-11EA-8F73-0242AC110004", "data":{ "event_set":[ { "polygon":[ [ 480, 270 ], [ 1440, 270 ], [ 1440, 810 ], [ 480, 810 ] ], "count":2, "region_id":0 }, { "polygon":[ [ 480, 200 ], [ 1110, 170 ], [ 1040, 510 ], [ 280, 310 ] ], "count":1, "region_id":1 } ] } }
- Heatmap detection result
{ "task_id":"ee7d7f5c7ba24839b6abaf5b81607496", "stream_id": "test1", "event_type": 131075, "timestamp": 5, "message_id":"849D1326-4FC8-11EA-8F73-0242AC110004", "data":{ "interval":1, "heat_image_base64": "/9j/4AAQSkZJRgABAJDA...", "heatpoint_image_base64": "/9j/2wBDAAMCAgMCAgMD..." } }
- JSON format
Field
Type
Description
task_id
String
Task ID
stream_id
String
Camera ID
event_type
Uint64
Event type of the output message.
JSON format:
- For line-crossing people flow statistics, the value is fixed to 131073, which is 0x 0000 0000 0002 0001 in hexadecimal format.
- For region-entering people flow statistics, the value is fixed to 131074, which is 0x 0000 0000 0002 0002 in hexadecimal format.
- For heatmap statistics, the value is fixed to 131075, which is 0x 0000 0000 0002 0003 in hexadecimal format.
message_id
String
Alarm ID in the form of a UUID
timestamp
Uint64
End time of line-crossing people flow statistics, region-entering people flow statistics, and heatmap statistics
data
Object
Service output content
- data parameters of line-crossing people flow detection
Field
Type
Description
interval
Int
Interval for line-crossing people flow detection, in seconds
event_set
List<Object>
List of events generated
event_set parametersField
Type
Description
line
List<Object>
Sets of start and end points that form lines, for example, [[50,60],[1000,1000]]. The first point indicates the start point, and the second point indicates the end point.
line_id
Int
ID of a straight line
side1_count
Int
People passing through a straight line to side1_name
side2_count
Int
People passing through a straight line to side2_name
side1_name
String
Name of side1
side2_name
String
Name of side2
- data parameters of region-entering people flow detection
Field
Type
Description
event_set
List<Object>
List of events generated
event_set parametersField
Type
Description
polygon
List<Object>
A set of points that form a polygon, for example, [[484,465],[1850,450],[1905,1013],[515,1050]]
region_id
Int
Region ID
count
Int
People flow statistics of a region at the current time
- data parameters of heatmap detection
Field
Type
Description
interval
Int
Detection period of the heatmap, in seconds
heat_image_base64
Object
Base64 encoding results of heatmap detection
heatpoint_image_base64
Object
Base64 encoding results after detecting the hotspot and generating the heatmap. The pixel value in the heatmap indicates the number of people detected in a position.
- Result example
- Line-crossing people flow statistic on the edge
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot