2.安装必要的插件
sudo apt-get install ipython python-opencv python-scipy python-numpy python-pygame python-setuptools git
安装的问题就出现在这里,因为bananpro安装的是树莓派系统,apt-get是从树莓派的程序库里去寻找编译好的文件下载安装,如果不涉及低层协议两者通用,但是一旦涉及BCM芯片的操作,直接使用树莓派程序库的bin文件就无法运行,在本例中等simplecv安装好后,bananpro会提示缺少
libbcm_host.so。
wget http://www.libsdl.org/release/SDL-1.2.15.tar.gz
./configure
make
sudo make install
wget http://www.pygame.org/ftp/pygame-1.9.1release.tar.gz
tar -xzf pygame-1.9.1release.tar.gz
sudo apt-get install mercurial python-dev python-numpy libav-tools libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev libsdl1.2-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev
python setup.py build
sudo python setup.py install
sudo
apt-get install libv4l-dev
cd
/usr/include/linux
sudo
ln -s ../libv4l1-videodev.h videodev.h
git clone https://github.com/sightmachine/SimpleCV.git
sudo pip install -r requirements.txt
sudo python setup.py install
ls /dev 看看有没有video0这个文件
python
from SimpleCV import Camera, Display
myCamera = Camera(prop_set={'width':320, 'height':240})
#Camera括号中也可以不填,按默认分辨率640*480
captureImg = myCamera.getImage()
captureImg.save("nihao,jpg")