Installing OpenCV on NanoPI Neo

From wiki.ferrari.mo.it
Jump to navigation Jump to search

Installing OpenCV on Nanopi Neo from sources

Install Operating System from FriendlyElec. Username root password fa.

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

then, download OpenCV sources:

wget https://github.com/opencv/opencv/archive/3.4.2.zip
unzip 3.4.2.zip

and

cd opencv-3.4.2
mkdir build
cd build

Then, begin the installation:

cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
make -j1
make install

WARNING: If number of processes is greater than 1, you will have an out of memory subtle error.

The compilation will require 3-4 hours.

Installing CMake

apt remove cmake
wget https://cmake.org/files/v3.15/cmake-3.15.2.tar.gz
tar xf cmake-3.15.2.tar.gz
cd cmake-3.15.2
./configure
make install
cmake --version
ln -s /usr/local/bin/cmake /usr/bin/cmake