BPI-M3 compile Opencv 3.1.0 source code

BPI-M3 compile Opencv 3.1.0 source code, thank @zhiqing_yu do this work.

test image : raspbian-jessie for BPI-M3

As a result of the m3 processor performance is very powerful, very suitable for image processing, so want to use the m3 recently run opencv and through the control of unmanned aerial vehicle (uav) flight mavlink protocol. For terrain imaging, obstacle recognition, target track, etc.

Below, I combined with automatic shell script installation, the installation process of OpenCV.


# bpi m3 setup script for use as companion computer

# update m3 to latest versions

1 Because of BPI-M3 emmc only 8 g installation system and compile opencv space is not enough, from emmc startup and cannot use the tf card, they are. In the end I chose in the tf card installed on the system, emmc as download and compile storage space.

  sudo umount /dev/mmcblk1
  sudo mkfs -V  /dev/mmcblk1
  sudo mount /dev/mmcblk1 /home/pi/emmc

delete wolfram-engine can save 600MB space.

sudo apt-get purge wolfram-engine

Raspberry pie source update slow at china, must be replaced for the domestic image

eidt etc/apt/sources.list first line to:

deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ jessie main contrib non-free rpi

Note : not edit others .

sudo apt-get update
sudo apt-get upgrade

2 install python and pip, to prepare for the installation of the unmanned aerial vehicle (uav) control

sudo apt-get install python-dev
sodo wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py

3 Installation of unmanned aerial vehicle (uav) package:dronekit

sudo pip install dronekit dronekit-sitl 
sudo pip install mavproxy

4 Installation of dynamic image processing package, made two mistakes during installation, just repeat install to fixed it.

sudo apt-get install gstreamer1.0

5 Install hotspot service package:

sudo apt-get install hostapd isc-dhcp-server

6 begin to install OpenCV:

sudo apt-get install build-essential git cmake pkg-config
sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt-get install libxvidcore-dev libx264-dev
sudo apt-get install libgtk2.0-dev
sudo apt-get install libatlas-base-dev gfortran
sudo apt-get install python2.7-dev python3-dev
sudo pip install numpy

download opencv source , I tried 3.1 release package, gpu sample there are errors, compile and build with the latest source no problem.

cd emmc(mount location )
sudo git clone https://github.com/Itseez/opencv.git
sudo git clone https://github.com/Itseez/opencv_contrib.git

Set up build directory

sudo mkdir emmc/opencv/build
cd emmc/opencv/build

Run cmake to configured

           -D CMAKE_INSTALL_PREFIX=/usr/local  \
           -D INSTALL_C_EXAMPLES=ON  \
           -D OPENCV_EXTRA_MODULES_PATH=/home/pi/emmc/opencv_contrib/modules \
           -D BUILD_EXAMPLES=ON ..

After the completion, compile installation

make -j8(m3 need 1 hour,raspberry pi 3 need 2 hour,raspberry pi 2 need 2.5 hour,rasperry pi 1 need 9 hour)
sudo make install
sudo ldconfig

At this point opencv compiler installed, good luck :slight_smile:

The following is a control of unmanned aerial vehicle (uav) flight routine reference source, who are interested in his study

# picamera (likely already included from opencv)
# sudo pip install "picamera[array]"

# cherrypy web server (used by red balloon finder)
sudo pip install cherrypy

# install red balloon finder
sudo apt-get install screen

cd ~
git clone https://github.com/diydrones/companion.git
git clone https://github.com/rmackay9/ardupilot-balloon-finder

1 Like

Wrong since you’re already inside the emmc folder.

Wrong since this will result in a syntax error (no use of #). The usual @sinovoip mess. Untested crap not worth a look. And then you show screenshots full of error messages and not a single result of the whole weird ‘installation tutorial’.

Breaking news: OpenCV can be compiled on an ARMv7 SoC. Woohoo.

Show us a real (not a faked) example how cameras are used on BPi M3 and then it get’s interesting. Show us a real use case of an OpenCV installation making use of a dual camera setup running on BPi M3.

The time you waste providing such crappy non-working ‘setup tutorials’ you could also use to answer user questions. Why don’t you do that? Why do you only flood this forum with non working crap and fake stuff?

http://forum.banana-pi.org.cn/thread-1271-1-1.html is for BPI-M2.

if you can do ,why not share your work to user ???:sweat_smile:

Maybe you heard of linux-sunxi community and Armbian already? There we share loads of work with users of Allwinner hardware. Unfortunately you choose a pretty poorly supported SoC for your M3 that receives not that much support. So nothing to share :slight_smile:

BTW: How long did it took you to create the ‘installation tutorial’ above? Do you understand that you made several mistakes so it simply can’t work? Why do you waste time creating instructions that do not work? Why don’t you revise wrong instructions when someone takes his time, reads over the stuff and points out where you made mistakes?

Do you sometimes care about the results of your work? I really don’t understand what the purpose of instructions is that are known to not work.

armbian do a great work . also you can ?? but you can not representative armbian .

we just can representative ourself ,not representative any open source community. i am right???:wink:

why you always as a Auto reply machine. i just see you write some documents with many Crazy subjective factors. you are not a Objective guys .

it can not working ?? we are not do a product , just DIY for users .

test image dwonload link:


Hey @sinovoip: You wrote again so much I don’t understand but the intructions above are still wrong. Why don’t you correct them? Don’t you fear users could try them out and fail? Do you care about your users? And their time? Or are you convinced that no one will ever try out the stuff you waste your time with like above?

1 Like

where is wrong? did you test it?

Read above? One time emmc/ is too much, the other time a # is missing. Did you test it?

you can test this image at frist.


hehe .this is from my shell .in test time ,#and \ do not need. emmc is my dir .

1 Like

C’mon: If you’re at ~/emmc and then do a

sudo git clone https://github.com/Itseez/opencv.git

Then now opencv is in


If you now do the following while still being in ~/emmc

sudo mkdir emmc/opencv/build
cd emmc/opencv/build

then opencv is still in ~/emmc/opencv but you created and changed into ~/emmc/emmc/opencv/build while you wanted to be at ~/emmc/opencv/build instead. There’s is one step missing (cd ..) or the occurences of emmc/ are too much.

I wrote exactly this two times already but it’s obviously absolutely useless since you don’t seem to take care of the difference between ~/emmc/emmc/opencv/build (wrong) and ~/emmc/opencv/build (right). The ‘instructions’ above simply can not work and that’s just one of the mistakes. And it’s always the same: As soon as @sinovoip posts instructions they’re partially wrong so exactly nobody can benefit from. So why do you waste your time providing useless instructions again and again?

Same here: [BPI-M3] how to use fatload uEnv.txt & script.bin & kernel uImage Still wrong: scrip=script.bin can NOT work! You’ve been told several times and you simply don’t give a sh*t. There’s still a t missing. You not even fix such simple mistakes. And this pretty much describes the entirety of the catastrophic state of documentation and the lousy support situation.

CN6 / CSI connector not populated so you’re showing pictures made with an USB cam there as proof that BPi M3 works with a dual camera setup. Always fakes… :frowning:

I’ve never seen the proof that any of your boards really works with a CSI camera :slight_smile:

Make process gave error under ubuntu… :frowning:

this is for rasbian,Ubuntu and debian have many error

tkaiser @
at sudo mkdir emmc/opencv/build means emmc/opencv mkdir build

you can test it

if you have a time can you try to install ros with this link? because I sholud use opencv with ROS. My internet download speed is very slow I cant download rasbian now.

If install successful I will download rasbian it this night.

sorry my nearest work is opencv and uav .you can do it yourself

Hmm… thanks for your helps to contribute this topic. Lastly, I want to ask did you used opencl with your application. If yes, which application did you use and how many fps did you take? If you can answer I will be very happy … :slight_smile:

are you test this Ros image ???

i have test this image but opencv unsucseece