GStreamer CPU Blob Detector Element

From RidgeRun Developer Wiki



Previous: GStreamer Plugins/Noise Reduction Index Next: GStreamer Plugins/GPU Blob Detector







The GStreamer element is called "rrblobdetector". This element performs the blob detector stage, described in the Overview section, with the difference that this element does not draw the bounding boxes, this function corresponds to another element called “rrmotionoverlay”. The rrblobdetector performs the blob detection using CPU and receives as input a bit mask GRAY8 format and outputs different formats that you can see in the capabilities section in the src template:

Main Properties

  • Algorithm: With this property you can choose the algorithm to use for the blob detection. Default is “0”, the options are:
Contours (0) : Contours based detection
Brts (1) : BRTS connected components detection.
  • Min-area: With this property you can set the minimum normalized blob area. If the blob is smaller than this area, the blob will be discarded. By default it is “0”.
Zero: Start at 0 running time (default).
First: Start at the first observed input running time.
Set: Set start time with “start-time” property.

Capabilities

This section overviews the CPU Blob Detector input and output capabilities.

Below is the full output of the gst-inspect-1.0 command:

Factory Details:
  Rank                     none (0)
  Long-name                CPU based Blob Detector
  Klass                    Filter/Editor/Video
  Description              Detect blobs from a binary image
  Author                   Melissa Montero <melissa.montero@ridgerun.com>

Plugin Details:
  Name                     rrmotiondetection
  Description              Motion detection components based on OpenCV
  Filename                 /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstrrmotiondetection.so
  Version                  0.1.0
  License                  Proprietary
  Source module            gstrrmotiondetection
  Binary package           gstrrmotiondetection
  Origin URL               www.ridgerun.com

GObject
 +----GInitiallyUnowned
       +----GstObject
             +----GstElement
                   +----GstAggregator
                         +----GstRrBlobDetector

Pad Templates:
  SINK template: 'mask'
    Availability: Always
    Capabilities:
      video/x-raw
                 format: GRAY8
                  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: 'video'
    Availability: Always
    Capabilities:
      video/x-raw(memory:NVMM)
                 format: { (string)I420, (string)I420_10LE, (string)P010_10LE, (string)I420_12LE, (string)UYVY, (string)YUY2, (string)YVYU, (string)NV12, (string)NV16, (string)NV24, (string)GRAY8, (string)BGRx, (string)RGBA, (string)Y42B }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
      video/x-raw
                 format: { (string)I420, (string)YV12, (string)YUY2, (string)UYVY, (string)AYUV, (string)VUYA, (string)RGBx, (string)BGRx, (string)xRGB, (string)xBGR, (string)RGBA, (string)BGRA, (string)ARGB, (string)ABGR, (string)RGB, (string)BGR, (string)Y41B, (string)Y42B, (string)YVYU, (string)Y444, (string)v210, (string)v216, (string)Y210, (string)Y410, (string)NV12, (string)NV21, (string)GRAY8, (string)GRAY16_BE, (string)GRAY16_LE, (string)v308, (string)RGB16, (string)BGR16, (string)RGB15, (string)BGR15, (string)UYVP, (string)A420, (string)RGB8P, (string)YUV9, (string)YVU9, (string)IYU1, (string)ARGB64, (string)AYUV64, (string)r210, (string)I420_10BE, (string)I420_10LE, (string)I422_10BE, (string)I422_10LE, (string)Y444_10BE, (string)Y444_10LE, (string)GBR, (string)GBR_10BE, (string)GBR_10LE, (string)NV16, (string)NV24, (string)NV12_64Z32, (string)A420_10BE, (string)A420_10LE, (string)A422_10BE, (string)A422_10LE, (string)A444_10BE, (string)A444_10LE, (string)NV61, (string)P010_10BE, (string)P010_10LE, (string)IYU2, (string)VYUY, (string)GBRA, (string)GBRA_10BE, (string)GBRA_10LE, (string)BGR10A2_LE, (string)GBR_12BE, (string)GBR_12LE, (string)GBRA_12BE, (string)GBRA_12LE, (string)I420_12BE, (string)I420_12LE, (string)I422_12BE, (string)I422_12LE, (string)Y444_12BE, (string)Y444_12LE, (string)GRAY10_LE32, (string)NV12_10LE32, (string)NV16_10LE32, (string)NV12_10LE40 }
                  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
  
  SRC template: 'src'
    Availability: Always
    Capabilities:
      video/x-raw(memory:NVMM)
                 format: { (string)I420, (string)I420_10LE, (string)P010_10LE, (string)I420_12LE, (string)UYVY, (string)YUY2, (string)YVYU, (string)NV12, (string)NV16, (string)NV24, (string)GRAY8, (string)BGRx, (string)RGBA, (string)Y42B }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
      video/x-raw
                 format: { (string)I420, (string)YV12, (string)YUY2, (string)UYVY, (string)AYUV, (string)VUYA, (string)RGBx, (string)BGRx, (string)xRGB, (string)xBGR, (string)RGBA, (string)BGRA, (string)ARGB, (string)ABGR, (string)RGB, (string)BGR, (string)Y41B, (string)Y42B, (string)YVYU, (string)Y444, (string)v210, (string)v216, (string)Y210, (string)Y410, (string)NV12, (string)NV21, (string)GRAY8, (string)GRAY16_BE, (string)GRAY16_LE, (string)v308, (string)RGB16, (string)BGR16, (string)RGB15, (string)BGR15, (string)UYVP, (string)A420, (string)RGB8P, (string)YUV9, (string)YVU9, (string)IYU1, (string)ARGB64, (string)AYUV64, (string)r210, (string)I420_10BE, (string)I420_10LE, (string)I422_10BE, (string)I422_10LE, (string)Y444_10BE, (string)Y444_10LE, (string)GBR, (string)GBR_10BE, (string)GBR_10LE, (string)NV16, (string)NV24, (string)NV12_64Z32, (string)A420_10BE, (string)A420_10LE, (string)A422_10BE, (string)A422_10LE, (string)A444_10BE, (string)A444_10LE, (string)NV61, (string)P010_10BE, (string)P010_10LE, (string)IYU2, (string)VYUY, (string)GBRA, (string)GBRA_10BE, (string)GBRA_10LE, (string)BGR10A2_LE, (string)GBR_12BE, (string)GBR_12LE, (string)GBRA_12BE, (string)GBRA_12LE, (string)I420_12BE, (string)I420_12LE, (string)I422_12BE, (string)I422_12LE, (string)Y444_12BE, (string)Y444_12LE, (string)GRAY10_LE32, (string)NV12_10LE32, (string)NV16_10LE32, (string)NV12_10LE40 }
                  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'
  SINK: 'video'
    Pad Template: 'video'
  SINK: 'mask'
    Pad Template: 'mask'

Element Properties:
  algorithm           : The algorithm type to use for blob detection
                        flags: readable, writable
                        Enum "GstRrBlobDetectorAlgorithm" Default: 0, "contours"
                           (0): contours         - Countours based detection
                           (1): brts             - BRTS connected components detection
  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-area            : The minimum normalized blob area. If blob is smaller it will be discarded
                        flags: readable, writable
                        Float. Range:               0 -               1 Default:          0,0006 
  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: "rrblobdetector0"
  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

Element Signals:
  "on-new-motion" :  void user_function (GstElement* object,
                                         gchararray arg0,
                                         gpointer user_data);


Previous: GStreamer Plugins/Noise Reduction Index Next: GStreamer Plugins/GPU Blob Detector