Birds Eye View - GStreamer - GstBEV Plugin

From RidgeRun Developer Wiki




⇦ Calibration Guide/Performing the Calibration Home GStreamer/Generic Pipelines ⇨




BEV Plugin


This wiki will provide you the expected output of the Birds Eye View's plugin. Alongside a dummy calibration file for reference.

To check the plugin you can do it as follows.

gst-inspect-1.0 bev

The expected output would be the following.

 gst-inspect-1.0 bev
Factory Details:
  Rank                     none (0)
  Long-name                Bird's Eye View
  Klass                    Mixer/Video
  Description              Generates a bird's eye view transformation from N input images
  Author                   Jimena Salas <jimena.salas@ridgerun.com>

Plugin Details:
  Name                     panorama
  Description              GStreamer plugin for image transformations using libpanorama
  Filename                 /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstpanorama.so
  Version                  0.2.0
  License                  Proprietary
  Source module            libpanorama
  Binary package           libpanorama
  Origin URL               www.ridgerun.com

GObject
 +----GInitiallyUnowned
       +----GstObject
             +----GstElement
                   +----GstAggregator
                         +----GstBev

Pad Templates:
  SRC template: 'src'
    Availability: Always
    Capabilities:
      video/x-raw
                 format: RGBA
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
    Type: GstAggregatorPad
    Pad Properties:
      emit-signals        : Send signals to signal data consumption
                            flags: readable, writable
                            Boolean. Default: false
  
  SINK template: 'sink_%u'
    Availability: On request
    Capabilities:
      video/x-raw
                 format: RGBA
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
    Type: GstAggregatorPad
    Pad Properties:
      emit-signals        : Send signals to signal data consumption
                            flags: readable, writable
                            Boolean. Default: false

Element has no clocking capabilities.
Element has no URI handling capabilities.

Pads:
  SRC: 'src'
    Pad Template: 'src'

Element Properties:
  calibration-file    : Path to the calibration file containing all the bird's eye view parameters
                        flags: readable, writable, changeable only in NULL or READY state
                        String. Default: null
  latency             : Additional latency in live mode to allow upstream to take longer to produce buffers for the current position (in nanoseconds)
                        flags: readable, writable
                        Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 0 
  min-upstream-latency: When sources with a higher latency are expected to be plugged in dynamically after the aggregator has started playing, this allows overriding the minimum latency reported by the initial source(s). This is only taken into account when larger than the actually reported minimum latency. (nanoseconds)
                        flags: readable, writable
                        Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 0 
  name                : The name of the object
                        flags: readable, writable
                        String. Default: "bev0"
  parent              : The parent of the object
                        flags: readable, writable
                        Object of type "GstObject"
  start-time          : Start time to use if start-time-selection=set
                        flags: readable, writable
                        Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 18446744073709551615 
  start-time-selection: Decides which start time is output
                        flags: readable, writable
                        Enum "GstAggregatorStartTimeSelection" Default: 0, "zero"
                           (0): zero             - Start at 0 running time (default)
                           (1): first            - Start at first observed input running time
                           (2): set              - Set start time with start-time property

Example pipeline

For an initial test, you will require a calibration file. You can utilize the one provided with the evaluation version.

CALIBRATION_FILE=birds_eye_view.json

For the caps, you need to use the same resolution as the one mentioned in the calibration file.

CAPS="video/x-raw,width=1280,height=720,format=RGBA"

Now you can try the following pipeline as a dummy example using videotestsrc.

gst-launch-1.0 -e bev name=bev0 calibration-file=$CALIBRATION_FILE \
 videotestsrc is-live=true ! $CAPS ! queue ! bev0.sink_0 \
 videotestsrc is-live=true ! $CAPS ! queue ! bev0.sink_1 \
 videotestsrc is-live=true ! $CAPS ! queue ! bev0.sink_2 \
 videotestsrc is-live=true ! $CAPS ! queue ! bev0.sink_3 \
 videotestsrc is-live=true ! $CAPS ! queue ! bev0.sink_4 \
 videotestsrc is-live=true ! $CAPS ! queue ! bev0.sink_5 \
bev0. ! queue ! nvvidconv ! nvv4l2h264enc bitrate=20000000 ! h264parse ! mp4mux ! filesink location=test.mp4


⇦ Calibration Guide/Performing the Calibration Home GStreamer/Generic Pipelines ⇨