sudo apt-get install libopencv-dev
sudo apt-get install python-opencv
# check for updates
$ sudo apt-get update
$ sudo apt-get upgrade
# install dependencies
$ sudo apt-get install cmake wget
$ sudo apt-get install libprotobuf-dev protobuf-compiler
# download ncnn
$ git clone https://github.com.cnpmjs.org/Tencent/ncnn.git
# install ncnn
$ cd ncnn
$ mkdir build
$ cd build
# build 32-bit ncnn
$ $ cmake -D PI3=ON \
-D NCNN_DISABLE_RTTI=OFF \
-D CMAKE_EXE_LINKER_FLAGS=-ldl \
-D CMAKE_TOOLCHAIN_FILE=../toolchains/pi3.toolchain.cmake ..
$ make -j4