RidgeRun Video Stabilization Library/Getting Started/Building the Library: Difference between revisions

From RidgeRun Developer Wiki
No edit summary
Tag: Manual revert
No edit summary
Line 5: Line 5:
{{DISPLAYTITLE:Getting Started - Building the library|noerror}}
{{DISPLAYTITLE:Getting Started - Building the library|noerror}}


== Dependencies==
The RidgeRun Video Stabilization Library has the following dependencies for building from source:
=== Compulsory ===
A C++ compiler compatible with C++-17.
If GNUCompiler should be installed, we recommend the GNU Compiler >= 9.x.
Moreover, we use the meson building system. You can install it using:
<syntaxhighlight lang=bash>
# Install PIP
sudo apt install python3 python3-pip
# Install ninja
sudo apt install ninja-build pkg-config
# Install meson
sudo pip3 install meson
</syntaxhighlight>
=== Semi-Optional ===
The RidgeRun Video Stabilization Library is built on top of three different backends: OpenCV, OpenCL and CUDA. One of the three must exist in the system. If you are on a Debian-based system, you can install these dependencies using:
'''OpenCV'''
<syntaxhighlight lang=bash>
sudo apt install libopencv-core* libopencv-highgui* libopencv-imgproc* libopencv-imgcodecs* libopencv-dev
</syntaxhighlight>
'''OpenCL''': For non-NVIDIA platforms.
<syntaxhighlight lang=bash>
sudo apt install opencl-headers
</syntaxhighlight>
''It may depend on your system''
'''CUDA''': For NVIDIA-based platforms (in progress).
<syntaxhighlight lang=bash>
sudo apt install cuda-toolkit-*
</syntaxhighlight>
=== Optional ===
For documentation, development and plotting, you can install the following dependencies:
<syntaxhighlight lang=bash>
# For documentation
sudo apt install doxygen graphviz
# For plotting
sudo apt install libboost-filesystem-dev libboost-system-dev libboost-iostreams libgnuplot-iostream-dev
# For development
pip3 install pre-commit
sudo apt install clang-format cpp-check
</syntaxhighlight>
In the following sections, you can see how to install the dependencies mentioned before.
=== GStreamer Support ===
<pre>
Under Development for Q3 2024
</pre>
'''The process should be similar in other systems, not based on Debian.'''
== Building the project ==
Once the dependencies have been, you can run a default compilation with the following:
<syntaxhighlight lang=bash>
meson build --optimization 3 --prefix /usr -Denable-docs=disabled -Ddeveloper-mode=false
ninja -C build
sudo ninja -C build install
</syntaxhighlight>
For additional customization, you may refer to the following table of options:
<center>`
{| class="wikitable"
|-
! Configure Option !! Description !! Values
|-
| -Ddeveloper-mode || Enable developer mode. Enabled by default. || true, false
|-
| -Denable-docs || Enable the documentation generation. Enabled by default. || disabled, enabled
|-
| -Denable-eval || Enable the evaluation system. Disabled by default. || disabled, enabled
|-
| -Denable-tests || Enable the compilation of the tests. Enabled by default. || disabled, enabled
|-
| -Denable-examples || Enable the compilation of the examples. Enabled by default. || disabled, enabled
|-
| -Denable-plots || Enable the compilation of the plotter. Enabled by default. || disabled, enabled
|-
| -Denable-opencv || Enable the OpenCV backend compilation (CPU processing). Enabled by default. || disabled, enabled
|-
| -Denable-opencl || Enable the OpenCL backend compilation (GPU processing). Enabled by default. || disabled, enabled
|-
| -Denable-cuda || Enable the CUDA backend compilation (GPU processing). Enabled by default. || disabled, enabled
|-
| --prefix /usr || Set the installation path of the library. /usr/local by default  || PATH
|-
| --optimization 3 || Set the optimization level to the maximum. 0 by default || 0, 1, 2, 3
|}
<b>Table 1.</b> RidgeRun Video Stabilization Library configuration options (Meson)</caption>
</center>
''Note: If the dependency is not found, it will skip the compilation, and a message will be shown during the construction.''


<noinclude>
<noinclude>
{{RidgeRun Video Stabilization Library/Foot|Getting Started/Getting the Code|API Reference}}
{{RidgeRun Video Stabilization Library/Foot|Getting Started/Getting the Code|API Reference}}
</noinclude>
</noinclude>

Revision as of 13:42, 15 June 2024








Dependencies

The RidgeRun Video Stabilization Library has the following dependencies for building from source:

Compulsory

A C++ compiler compatible with C++-17.

If GNUCompiler should be installed, we recommend the GNU Compiler >= 9.x.

Moreover, we use the meson building system. You can install it using:

# Install PIP
sudo apt install python3 python3-pip
# Install ninja
sudo apt install ninja-build pkg-config
# Install meson
sudo pip3 install meson

Semi-Optional

The RidgeRun Video Stabilization Library is built on top of three different backends: OpenCV, OpenCL and CUDA. One of the three must exist in the system. If you are on a Debian-based system, you can install these dependencies using:

OpenCV

sudo apt install libopencv-core* libopencv-highgui* libopencv-imgproc* libopencv-imgcodecs* libopencv-dev

OpenCL: For non-NVIDIA platforms.

sudo apt install opencl-headers

It may depend on your system

CUDA: For NVIDIA-based platforms (in progress).

sudo apt install cuda-toolkit-*

Optional

For documentation, development and plotting, you can install the following dependencies:

# For documentation
sudo apt install doxygen graphviz
# For plotting
sudo apt install libboost-filesystem-dev libboost-system-dev libboost-iostreams libgnuplot-iostream-dev
# For development
pip3 install pre-commit
sudo apt install clang-format cpp-check

In the following sections, you can see how to install the dependencies mentioned before.

GStreamer Support

Under Development for Q3 2024

The process should be similar in other systems, not based on Debian.

Building the project

Once the dependencies have been, you can run a default compilation with the following:

meson build --optimization 3 --prefix /usr -Denable-docs=disabled -Ddeveloper-mode=false
ninja -C build
sudo ninja -C build install

For additional customization, you may refer to the following table of options:

`
Configure Option Description Values
-Ddeveloper-mode Enable developer mode. Enabled by default. true, false
-Denable-docs Enable the documentation generation. Enabled by default. disabled, enabled
-Denable-eval Enable the evaluation system. Disabled by default. disabled, enabled
-Denable-tests Enable the compilation of the tests. Enabled by default. disabled, enabled
-Denable-examples Enable the compilation of the examples. Enabled by default. disabled, enabled
-Denable-plots Enable the compilation of the plotter. Enabled by default. disabled, enabled
-Denable-opencv Enable the OpenCV backend compilation (CPU processing). Enabled by default. disabled, enabled
-Denable-opencl Enable the OpenCL backend compilation (GPU processing). Enabled by default. disabled, enabled
-Denable-cuda Enable the CUDA backend compilation (GPU processing). Enabled by default. disabled, enabled
--prefix /usr Set the installation path of the library. /usr/local by default PATH
--optimization 3 Set the optimization level to the maximum. 0 by default 0, 1, 2, 3
Table 1. RidgeRun Video Stabilization Library configuration options (Meson)

Note: If the dependency is not found, it will skip the compilation, and a message will be shown during the construction.