Spherical Video PTZ: User Guide - Building and Installation

From RidgeRun Developer Wiki


Previous: User Guide Index Next: User Guide/Quick Start Guide





Lipanorama

This wiki shows how to build the source code. It assumes you have already purchased a license and received access to the source code. If not, head to How to Get the Code for instructions on how to proceed.

Install the Dependencies

Before anything, ensure you have installed the following dependencies:

  • Git: To clone the repository.
  • Meson: To configure the project.
  • Ninja: To build the project.
  • JsonCPP dev files: For the parameter loading.
  • OpenCV dev files: For panoramaptz Gstreamer element.
  • GstCUDA: For enabling GPU-accelerated video and graphics processing using CUDA in GStreamer pipelines.
  • GStreamer dev files and plugins: (optional) for image loading.
  • QT5 dev files: (optional) for image displaying.
  • CppUTest dev files: (optional) for unit testing.
  • Doxygen, Graphviz: (optional) for documentation generation.

In Debian-based systems (like Ubuntu) you can run:

sudo apt update
sudo apt install -y \
  libjsoncpp-dev \
  libopencv-dev libopencv-core-dev \
  libopencv-video-dev libopencv-highgui-dev libopencv-videoio-dev \
  libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
  gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-base \
  gstreamer1.0-libav gstreamer1.0-plugins-ugly \
  qtbase5-dev qtmultimedia5-dev libqt5multimedia5-plugins \
  git wget unzip libcpputest-dev doxygen graphviz \
  python3-pip ninja-build
sudo -H pip3 install meson

For the GstCUDA dependency go to: GstCUDA

Set up the environment

export SAMPLES=/path_where_the_example_image_is_downloaded/
export LIBPANORAMA_PATH=/path_where_libpanorama_is_installed/

Building the Project

1. Start by cloning the project using the repository you have been given

cd $LIBPANORAMA_PATH
git clone git@gitlab.ridgerun.com:$YOUR_REPO_LIBPANORAMA/libpanorama
cd libpanorama
Note
Replace $YOUR_REPO_LIBPANORAMA with the actual repository path you were given by RidgeRun.

2. Configure the project by running the following:

meson builddir
ninja -C builddir
sudo ninja -C builddir install
Note
If anything fails, please provide the output log of the configuration step to support@ridgerun.com

There are some configuration options you can use, in case you want to fine tune your build. These are not necessary and we recommend not using them, unless you have a specific reason to.

Advanced configuration options
Option name Possible values Description Default
examples enabled/disabled Whether to build or not the examples. enabled
tests enabled/disabled Whether to build or not the tests. enabled
docs enabled/disabled Whether to build or not the API docs. enabled
npp enabled/disabled Whether to use CUDA (NPP) acceleration or not. enabled
opencv enabled/disabled Whether to build or not OpenCV IO classes. enabled
gstreamer enabled/disabled Whether to build or not GStreamer IO classes. enabled
qt enabled/disabled Whether to build or not QT IO classes. enabled

Validating the Build

To ensure the build was successful, run the default example with the provided samples.

1. Download the sample image, if you haven't already.

cd $SAMPLES
wget "https://unsplash.com/photos/PYpkPbBCNFw/download?ixid=M3wxMjA3fDB8MXxhbGx8fHx8fHx8fHwxNzExNTE1MTQxfA&force=true" -O example_image.jpg

2. Run the example as:

cd $LIBPANORAMA_PATH/libpanorama
./builddir/examples/equirectangular_to_rectilinear $SAMPLES/example_image.jpg|alt=Example of libpanorama

You should see an output as the one below:

Libpanorama example

GstRrPanoramaptz

This section introduces the GstRrPanoramaptz plugin, a component of GStreamer designed to apply Pan-Tilt-Zoom (PTZ) transformations to video panoramas using CUDA. Developed with a focus on high-performance video processing, this plugin supports real-time adjustments of panoramic video feeds, enabling dynamic viewpoint changes through pan, tilt, and zoom operations. Ideal for applications requiring interactive video navigation or automated surveillance, GstRrPanoramaptz extends GStreamer's capabilities with advanced video transformation techniques. Here, you'll find setup instructions, usage examples, and insights on integrating this plugin into your video processing pipeline, offering a comprehensive guide to leveraging its features for enhanced video manipulation.

Set up the environment

export PANORAMA_PTZ_PATH=/path_where_gstrrpanoramaptz_is_installed/

Building the project

After the Building and Installation of Spherical Video PTZ section follow this steps to build the rrpanoramaptz plugin for Gstreamer.

1. Start by cloning the project using the repository you have been given

cd $PANORAMA_PTZ_PATH
git clone git@gitlab.ridgerun.com:$YOUR_REPO/gst-rr-panoramaptz
cd gst-rr-panoramaptz
Note
Replace $YOUR_REPO with the actual repository path you were given by RidgeRun

2. Configure the project by running the following:

meson builddir --prefix=/usr
ninja -C builddir
sudo ninja -C builddir install
Note
If anything fails, please provide the output log of the configuration step to support@ridgerun.com

Validating the Build

gst-inspect-1.0 rrpanoramaptz

Upon successful build validation with gst-inspect-1.0 rrpanoramaptz, the output will detail the plugin's comprehensive configuration, highlighting its purpose, capabilities, and properties. You should see an output as the one below:

...
Pad Templates:
  SINK template: 'sink'
    Availability: Always
    Capabilities:
      video/x-raw
                 format: RGBA
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
      video/x-raw(memory:NVMM)
                 format: RGBA
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
...



Previous: User Guide Index Next: User Guide/Quick Start Guide