This repo includes a basic Tkinter python GUI application found here. The reference example is in an early stage and there are plans to expand the functionality over time. In its current state the application demonstrates:
- How to use an Application window with a DSL Pipeline and Window Sink.
- How to draw ODE Areas over a live stream using a Custom Pad Probe Handler and Display Types.
The following dependencies are required to run the application:
- python3-pip and python-dev:
$ sudo apt-get install python3-pip python-dev
- pillow:
$ pip3 install image
- DSL libdsl.so:
$ make lib
- pyds: Installation
All configurable parameters -- RTSP URI, component names, streammuxer and window dimensions, etc. -- are defined in the file config.py.
When runing on Ubuntu, Tkinter applications need to execute at a slightly elevated priority. This requires the application to be launched with administration priviliges.
$ sudo python3 tkapp.py
- To start the pipeline playing, select
- To stop a playing pipeline, select
- To hide the controls from view, select
This version is limited to polygons and lines, with plans to add rectangles, circles, and text in a future release.
Note! Polygons do not support fill color - requires support from NVIDIA.
Select desired color, line-width, and alpha level, and then draw the polygon as follows:
- Select the polygon button to switch into drawing mode.
- Press the left mouse button at the desired location for the first coordinate.
- Drag the mouse to the location of the next coordinate and press the left mouse button again.
- Repeat step 4 until all coordinates have been drawn.
- Select the right mouse button to complete/close the polygon shape.
Once complete, the polygon values will be displayed in the status bar at the bottom of the frame.
The coordinates can then be used when developing your own Python or C/C++ pipeline applications.