Ubuntu Source Installation

1. Install SDK dependencies

1.1 Install OpenCV

If you have installed opencv already or you want use it in ROS, you can skip this part.

1.1.1 Install OpenCV with apt or compile (Choose one)

1.1.1.1 Install OpenCV with apt (Recommend)
sudo apt-get install libopencv-dev
1.1.1.2 Install OpenCV by Compile

To build and install Opencv, please refer to Installation in Linux

Tip

If you need to install ros, you can skip this step and use opencv in ros.

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.3

cd opencv/
mkdir build
cd build/

cmake ..

make -j4
sudo make install

1.2 Install PCL for Point Cloud sample (Optional)

To build and install PCL, please refer to PCL Installation

Tip

If you need to install ros, you can skip this step and use pcl in ros.

git clone https://github.com/PointCloudLibrary/pcl.git
cd pcl
git checkout pcl-1.7.2
mkdir build && cd build

cmake -DCMAKE_BUILD_TYPE=Release ..

make -j2
sudo make -j2 install

2. Build SDK

git clone https://github.com/slightech/MYNT-EYE-D-SDK.git
cd MYNT-EYE-D-SDK

2.1 Init SDK

Note

Because of the problem of device permissions, you must reinsert the camera device after the command is executed and on the same computer, this operation only needs to be done once.

make init

2.2 Compile SDK

make all

3. Run Samples

Note

Open the rectified image by default (Run vio need to raw image, run depth or points cloud need to rectified image.)

  1. get_image shows the left camera image and colorful depthmap (compatible with USB2.0)

./samples/_output/bin/get_image
  1. get_stereo_image shows the left camera image and colorful depthmap

./samples/_output/bin/get_stereo_image
  1. get_depth shows the left camera image, 16UC1 depthmap and depth value(mm) on mouse pointed pixal

./samples/_output/bin/get_depth
  1. get_points shows the left camera image, 16UC1 depthmap and point cloud view

./samples/_output/bin/get_points
  1. get_imu shows motion datas

./samples/_output/bin/get_imu
  1. get_img_params show camera intrinsics and save in file

./samples/_output/bin/get_img_params
  1. get_imu_params show imu intrinsics and save in file

./samples/_output/bin/get_imu_params
  1. get_from_callbacks show image and imu data by callback

./samples/_output/bin/get_from_callbacks
  1. get_all_with_options open device with different options

./samples/_output/bin/get_all_with_options
  1. get_depth_with_filter display filtered depth image

./samples/_output/bin/get_depth_with_filter
  1. get_points_with_filter display filtered point cloud image

./samples/_output/bin/get_points_with_filter

4 Install With OpenCV ROS

If you won’t use ROS(The Robot Operating System), you can skip this part.

ROS installation and operation steps, refer to ROS Wrapper Installation 以及 ROS Wrapper Usage .

5. Package

If you wanna package with specified OpenCV version:

cd <sdk>  # local path of SDK
make cleanall
export OpenCV_DIR=<install prefix>

export OpenCV_DIR=/usr/local
export OpenCV_DIR=$HOME/opencv-2.4.13.3

Packaging:

cd <sdk>  # local path of SDK
make pkg

6. Clean

cd <sdk>  # local path of SDK
make cleanall
make uninstall