Ubuntu SDK Source Installation

Ubuntu 16.04 Ubuntu 14.04
build_passing build_passing

Tip

If you used any other Linux distributions without apt-get package manager, you need to install required packages manaully instead of using make init.

Linux How to install required packages
Debian based sudo apt-get install build-essential cmake git libv4l-dev
Red Hat based sudo yum install make gcc gcc-c++ kernel-devel cmake git libv4l-devel
Arch Linux sudo pacman -S base-devel cmake git v4l-utils

Getting Source Code

sudo apt-get install git
git clone https://github.com/slightech/MYNT-EYE-S-SDK.git

Required Packages

cd <sdk>
make init

Tip

To build and install Opencv, Please refer to Installation in Linux . Alternatively, refer to the command below:

[compiler] sudo apt-get install build-essential
[required] sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
[optional] sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev

$ git clone https://github.com/opencv/opencv.git
$ cd opencv/
$ git checkout tags/3.4.1

$ mkdir _build
$ cd _build/

$ cmake \
-DCMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_INSTALL_PREFIX=/usr/local \
\
-DWITH_CUDA=OFF \
\
-DBUILD_DOCS=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_TESTS=OFF \
-DBUILD_PERF_TESTS=OFF \
..

$ make -j4
$ sudo make install

Building code

Tip

If opencv is installed in custom directory or if you want to specify a version, you should set the path before building:

# OpenCV_DIR is the directory where your OpenCVConfig.cmake exists
export OpenCV_DIR=~/opencv

Otherwise, CMake will prompt cannot find OpenCV. If you need sdk without OpenCV, please read OpenCV independency .

Build and install:

Tip

If the device is S2100 or S210A, you need to compile third-party libraries because of different distortion models, which is slightly different from the compilation process of S1030. Please refer to Ubuntu SDK Source Installation (S2100/S210A) .

cd <sdk>
make install

Finally, sdk will install in <sdk>/_install by default.

Building samples

cd <sdk>
make samples

Run samples:

./samples/_output/bin/api/camera_a

Tutorial samples, please read MYNT® EYE Data and MYNT® EYE Control .

Building tools

cd <sdk>
make tools

Installation requirement:

cd <sdk>/tools/
sudo pip install -r requirements.txt

The usage of tools and scripts will be introduced later.

Conclusion

If your project will use SDK, you can refer to the settings in samples/CMakeLists.txt for CMake. Alternatively, import the head file and dynamic library in the installation directory.