Exporting Crowd Estimation data¶
How to Export the output image using RTSP¶
This guide walks you through the process of setting up a Crowd Estimation instance to export the output buffer (with points and people counter) as an RTSP stream. We'll be using the Crowd Estimation/video playlist 720p
instance as an example.
-
Create a copy of the instance by saving it in the user instances:
-
Access the Setup windows of the new instance.
-
Go to the Export tab and click on the
Add Custom Export Options
button. -
Configure the output to use the right data type and format
-
Click "Ok" and save the changes.
-
Start the instance
-
Confirm that the output is being streamed to
rtsp://127.0.0.1:8554/demo
. Here's how to do it using VLC
How to Export people count using MQTT¶
This guide walks you through the process of setting up a Crowd Estimation instance to export the total number of people in the image using MQTT.
-
If the instance is running, stop it.
-
Go to the export settings, and add a new export option.
-
Configure the output to use the right data type and format
-
Click Ok and save the changes
-
Download and run the following Python script:
python mqtt_listen_people_count.py
Note
The script requires python 3.7+ and
paho-mqtt
which can be installed by runningpip install paho-mqtt
-
Start the
My Instances/video playlist 720p
instance. You should be seeing the number of people in the console. Each line represents a frame in the input source.