Aaraya notes: Difference between revisions

From RidgeRun Developer Wiki
No edit summary
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''Chunk:'''
'''Chunk''':
 
{{Birds Eye View/Head|previous=Getting Started/Quickstart Guide|next=User Guide/Minimal Application|metakeywords="meson, ninja, building, configuration"|metadescription="This guide will guide you on how to configure, build, test and validate the project."}} 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 [[Birds Eye View/Getting Started/How to Get the Code|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
{{Birds Eye View/Head|previous=Getting Started/Quickstart Guide|next=User Guide/Minimal Application|metakeywords="meson, ninja, building, configuration"|metadescription="This guide will guide you on how to configure, build, test and validate the project."}} 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 [[Birds Eye View/Getting Started/How to Get the Code|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
'''
 
Chunk:'''
'''Chunk''':
 
the project. * '''JsonCPP dev files''': For the parameter loading. * '''OpenCV dev files''': For image loading, processing and displaying. * '''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. * '''Wget, Unzip''': ''(optional)'' to download and unpack the sample images. In Debian-based systems (like Ubuntu) you can run: <syntaxhighlight line lang=bash>
the project. * '''JsonCPP dev files''': For the parameter loading. * '''OpenCV dev files''': For image loading, processing and displaying. * '''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. * '''Wget, Unzip''': ''(optional)'' to download and unpack the sample images. In Debian-based systems (like Ubuntu) you can run: <syntaxhighlight line lang=bash>
sudo apt update
sudo apt update
Line 21: Line 23:
</syntaxhighlight> {{ambox|type=info|text=Replace `$YOUR_REPO` with the actual repository path you
</syntaxhighlight> {{ambox|type=info|text=Replace `$YOUR_REPO` with the actual repository path you


'''Chunk:'''
'''Chunk''':
were given by RidgeRun}} '''2.''' Configure the project by running the following (recommended):  
 
==== CUDA Accelerated ====
were given by RidgeRun}} '''2.''' Configure the project by running the following (recommended): ==== CUDA Accelerated ==== <syntaxhighlight lang=bash line>
<syntaxhighlight lang=bash line>
meson setup builddir --prefix /usr/
meson setup builddir --prefix /usr/
</syntaxhighlight>  
</syntaxhighlight> ==== Plain CPU ==== <syntaxhighlight lang=bash line>
==== Plain CPU ====
<syntaxhighlight lang=bash line>
meson setup -Dnpp=disabled builddir --prefix /usr/
meson setup -Dnpp=disabled builddir --prefix /usr/
</syntaxhighlight> Note that there is nothing special about the name <span style="font-family:monospace">builddir</span>, you can choose whatever name you want. If you choose to change it, make sure you change it in the remainder of the steps in this guide. {{ambox|type=content|text="If anything fails, please provide the output log of the configuration step to [mailto:support@ridgerun.com 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
</syntaxhighlight> Note that there is nothing special about the name <span style="font-family:monospace">builddir</span>, you can choose whatever name you want. If you choose to change it, make sure you change it in the remainder of the steps in this guide. {{ambox|type=content|text="If anything fails, please provide the output log of the configuration step to [mailto:support@ridgerun.com 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
'''
 
Chunk:'''
'''Chunk''':
not using them, unless you have a specific reason to. <center> {| class="wikitable"
 
not using them, unless you have a specific reason to.  
<center>  
{| class="wikitable"
|+ Advanced configuration options
|+ Advanced configuration options
|-
|-
Line 51: Line 53:
|-
|-
| qt || enabled/disabled || Whether to build or not QT IO classes. || enabled
| qt || enabled/disabled || Whether to build or not QT IO classes. || enabled
|} </center> To use configuration options pass them like <span style="font-family:monospace">meson setup -Doption1=value1 -Doption2=value2 builddir</span>. '''3.''' Build the project by running: <syntaxhighlight lang=bash line>
|}
</center>  
To use configuration options pass them like <span style="font-family:monospace">meson setup -Doption1=value1 -Doption2=value2 builddir</span>. '''3.''' Build the project by running: <syntaxhighlight lang=bash line>
ninja -C builddir
ninja -C builddir
</syntaxhighlight> '''4.''' Optionally, run the unit tests by executing: <syntaxhighlight lang=bash line>
</syntaxhighlight> '''4.''' Optionally, run the unit tests by executing: <syntaxhighlight lang=bash line>
Line 63: Line 67:
</syntaxhighlight> '''2.''' Run the example as: <syntaxhighlight lang=bash line>
</syntaxhighlight> '''2.''' Run the example as: <syntaxhighlight lang=bash line>
./builddir/examples/birds_eye_view -p examples/birds_eye_view.json
./builddir/examples/birds_eye_view -p examples/birds_eye_view.json
</syntaxhighlight> You should see an output as the one below: [[File:bev-quickstart.png|thumbnail|center|320px|alt=Sample result|Resulting image after running the
</syntaxhighlight> You should see an output as the one below: [[File:bev-quickstart.png|thumbnail|center|320px|alt=Sample result|Resulting image after running the sample application]] {{Birds Eye View/Foot|Getting Started/Quickstart Guide|User
 
'''Chunk''':


'''Chunk:'''
Guide/Minimal Application}}
sample application]] {{Birds Eye View/Foot|Getting Started/Quickstart Guide|User Guide/Minimal Application}}

Latest revision as of 19:18, 10 September 2024

Chunk:





⇦ Getting Started/Quickstart Guide Home User Guide/Minimal Application ⇨



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

Chunk:

the project. * JsonCPP dev files: For the parameter loading. * OpenCV dev files: For image loading, processing and displaying. * 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. * Wget, Unzip: (optional) to download and unpack the sample images. 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

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

git clone git@gitlab.ridgerun.com:$YOUR_REPO/libpanorama
cd libpanorama

2. Configure the project by running the following (recommended): ==== CUDA Accelerated ====

meson setup builddir --prefix /usr/

==== Plain CPU ====

meson setup -Dnpp=disabled builddir --prefix /usr/

Note that there is nothing special about the name builddir, you can choose whatever name you want. If you choose to change it, make sure you change it in the remainder of the steps in this guide.

There are some configuration options you can use, in case you want to fine tune your build. These are not necessary and we recommend

Chunk:

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

To use configuration options pass them like meson setup -Doption1=value1 -Doption2=value2 builddir. 3. Build the project by running:

ninja -C builddir

4. Optionally, run the unit tests by executing:

ninja -C builddir test

5. Optionally, install the project by running:

sudo ninja -C builddir install

== Validating the Build == To ensure the build was successful, run the default example with the provided samples. 1. Download the sample images, if you haven't already.

cd samples
./download_samples.sh
cd ..

2. Run the example as:

./builddir/examples/birds_eye_view -p examples/birds_eye_view.json

You should see an output as the one below:

Sample result
Resulting image after running the sample application


⇦ Getting Started/Quickstart Guide Home [[Birds Eye View/User

Chunk:

Guide/Minimal Application|User

Chunk:

Guide/Minimal Application ⇨]]