Building GPU Accelerated Motion Detector

From RidgeRun Developer Connection
Jump to: navigation, search



Previous: Getting Started/Evaluating GPUMotionDetector Index Next: Examples



Nvidia-preferred-partner-badge-rgb-for-screen.png




This section shows the instructions of how to install the full version of the C++ library and the GStreamer plugins.

GPU Accelerated Motion Detector C++ Library

Before installing the library please make sure to fulfill the dependencies described in the Dependencies section.

Step 1: Get the Source Code

Once you purchase the GPU Accelerated Motion Detector C++ Library , RidgeRun will provide source code access through a private GitLab repository. You need this access to build the C++ Library. You will receive a repository URL that you can use to clone the source code using the following command:

 git clone ${REPOSITORY_URL_PROVIDED_BY_RIDGERUN}

Where ${REPOSITORY_URL_PROVIDED_BY_RIDGERUN} is the URL provided by RidgeRun after the purchase.

Step 2: Build and Install

 cd librrmotiondetection
 meson --prefix=/usr build
 ninja -C build
 sudo ninja -C build install


GPU Accelerated Motion Detector GStreamer Plugins

Before installing the GStreamer plugins please make sure to fulfill the dependencies described in the Dependencies section.

Step 1: Get the Source Code

Once you purchase the GPU Accelerated Motion Detector GStreamer Plugins , RidgeRun will provide source code access through a private GitLab repository. You need this access to build the GPU Accelerated Motion Detector in your system and add it to your GStreamer plug-ins catalog. You will receive a repository URL that you can use to clone the source code using the following command:

 git clone ${REPOSITORY_URL_PROVIDED_BY_RIDGERUN}

Where ${REPOSITORY_URL_PROVIDED_BY_RIDGERUN} is the URL provided by RidgeRun after the purchase.

Step 2: Build and Install

 cd gstrrmotiondetection
 meson --prefix=/usr build
 ninja -C build
 sudo ninja -C build install

You can verify the plug-ins installation by running the following command in your terminal:

 gst-inspect-1.0 rrmotiondetectionbin

Please verify every element:

  • rrmotiondetection
  • rrnoisereduction
  • rrblobdetector
  • rrcudablobdetector
  • rrmotionoverlay
  • rrmotiondetectionbin

If the plugin was successfully installed you should see the plugin information printed in your terminal, similar to the information shown below. If the plugin information is not displayed, please visit our Troubleshooting section.


Factory Details:
  Rank                     none (0)
  Long-name                Motion Detection Bin
  Klass                    Filter/Video
  Description              Detects motion blobs
  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
                   +----GstBin
                         +----GstRrMotionDetectionBin

Implemented Interfaces:
  GstChildProxy

Pad Templates:
  SINK template: 'sink'
    Availability: Always
    Capabilities:
      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 ]
      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 ]
  
  SRC template: 'src'
    Availability: Always
    Capabilities:
      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 ]
      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 ]

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

Pads:
  SINK: 'sink'
  SRC: 'src'
    Pad Template: 'src'

Element Properties:
  async-handling      : The bin will handle Asynchronous state changes
                        flags: readable, writable
                        Boolean. Default: false
  cuda-blob-detection : Use blob detection algorithm (in charge of detecting the motion bounding boxes) implemented in cuda otherwise use cpu blob detection
                        flags: readable, writable
                        Boolean. Default: false
  grayscale           : When enabled, the motion detection is performed over a grayscaleimage (color dropped)
                        flags: readable, writable
                        Boolean. Default: true
  message-forward     : Forwards all children messages
                        flags: readable, writable
                        Boolean. Default: false
  name                : The name of the object
                        flags: readable, writable
                        String. Default: "rrmotiondetectionbin0"
  parent              : The parent of the object
                        flags: readable, writable
                        Object of type "GstObject"

If you want to know more information about the code you can contact us:

RR Contact Us.png


Previous: Getting Started/Evaluating GPUMotionDetector Index Next: Examples