GStreamer Pan Tilt Zoom and Rotate Element - User Guide
GStreamer PTZR |
---|
GstPTZR Basics |
User Guide |
Getting Started |
Examples |
Contact Us |
This page serves as a guide for users to configure GstPTZR to meet different application requirements.
System Parameters
GstPTZR uses the following parameters to determine its runtime behavior:
- Input image resolution
- Output image resolution
- Properties:
- Pan
- Tilt
- Zoom
- Rotate
- Rectangle
Of the above, only the properties can be configured at runtime. The input and output caps are fixated during pipeline startup. The following pipeline shows a typical use case, where all the parameters are being specified.
gst-launch-1.0 \ videotestsrc ! \ capsfilter caps="video/x-raw,width=1920,height=1080" ! \ ptzr zoom-level=1.6 rotate-level=30 pan-level=100 tilt-level=100 ! \ capsfilter caps="video/x-raw,width=640,height=480" ! \ autovideosink
In the snippet above, line 3 configures an input image of Full HD resolution, that is, 1920x1080. Line 4 links the GstPTZR element and configures the pan, tilt, zoom and rotate properties. Finally, line 5 configures an output image size of QVGA, or 320x240. Being the output image smaller than the input, the captured region may be moved around, zoomed in/out and rotated, to give the PTZR effect.
Graphically, the same can be appreciated in Figure 1. The input and output caps define the input and output image sizes, respectively. The size, position and angle of the capture region depends on the element's runtime properties configuration and the input and output caps. For example, the capture region size will be capture_size = zoom_level * output_size, or equivalently (960, 720) = (640, 480) / 1.6 . This will be detailed further in the next pages.
Element Properties
The following pages describe in greater detail how to configure the runtime behavior of GstPTZR via GStreamer properties.
1. Pan & Tilt 2. Zoom 3. Rotate 3. Rectangle