Skip to content

Latest commit

 

History

History
47 lines (35 loc) · 2.54 KB

examples-tkinter.md

File metadata and controls

47 lines (35 loc) · 2.54 KB

Tkinter Reference Application

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:

Dependencies

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

Configuration

All configurable parameters -- RTSP URI, component names, streammuxer and window dimensions, etc. -- are defined in the file config.py.

Running the Application

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.

Controls

Drawing Polygons

Select desired color, line-width, and alpha level, and then draw the polygon as follows:

  1. Select the polygon button to switch into drawing mode.
  2. Press the left mouse button at the desired location for the first coordinate.
  3. Drag the mouse to the location of the next coordinate and press the left mouse button again.
  4. Repeat step 4 until all coordinates have been drawn.
  5. 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.