简介
odroid-XU4作为三星公司最新出品的处理器,性能远超树梅派。当嵌入式硬件平台要求较高时,是一款相对不错的处理器。opencv作为开源视觉库,其在嵌入式设备中应用广泛,下面介绍openc在odroid上的配置
前提
一些编译工具的安装如cmake在这就不多说了,百度linux安装cmake很多的
配置
1、root用户登录
username: root
password: odroid
2、设置系统,添加账户
sudo apt-get update
sudo apt-get install lxde gedit build-essential checkinstall cmake cmake-curses-gui pkg-config chromium-browser gparted wicd guvcview
sudo adduser odroid
sudo adduser odroid sudo
sudo adduser odroid netdev
3、odroid身份登录
username: odroid
password: odroid
4、打开你的无线装置,如果没有无线网卡买一个
5、运行odroid UTILITY
sudo -s
wget -O /usr/local/bin/odroid-utility.sh https://raw.githubusercontent.com/mdrjr/odroid-utility/master/odroid-utility.sh
chmod +x /usr/local/bin/odroid-utility.sh
odroid-utility.sh
6、获取opencv源码
cd ~
wget http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.9/opencv-2.4.9.zip
unzip opencv-2.4.9.zip
rm opencv-2.4.9.zip
cd opencv-2.4.9
7、编译并安装opencv库
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RELEASE-DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_OPENGL=ON -DWITH_V4L=ON -DWITH_TBB=ON -DBUILD_TBB=ON -DENABLE_VFPV3=ON -DENABLE_NEON=ON ..
make
sudo make install
8、安装openni
cd ~
sudo apt-get install -y g++ python libusb-1.0-0-dev libudev-dev openjdk-6-jdk freeglut3-dev doxygen graphviz
git clone https://github.com/cmcmurrough/OpenNI2
cd OpenNI2
PLATFORM=Arm make
cd Packaging && python ReleaseVersion.py Arm
mv Final/OpenNI-Linux-Arm-2.2.tar.bz2 ~
cd ~
tar -xvf OpenNI-Linux-Arm-2.2.tar.bz2
rm -rf OpenNI2
rm OpenNI-Linux-Arm-2.2.tar.bz2
cd OpenNI-Linux-Arm-2.2
sudo sh install.sh
9、安装INSTALL PCL DEPENDENCIES
sudo apt-get install freeglut3-dev libboost-all-dev libeigen3-dev libflann-dev libvtk5-dev libusb-1.0-0-dev libqhull-dev
8、获取PCL源码
cd ~
git clone https://github.com/PointCloudLibrary/pcl pcl-1.7.2
cd pcl-1.7.2
9、编译安装PCL
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
make
sudo make install
10、安装ROS
cd ~
sudo update-locale LANG=C LANGUAGE=C LC_ALL=C LC_MESSAGES=POSIX
sudo sh -c 'echo "deb http://packages.namniart.com/repos/ros trusty main" > /etc/apt/sources.list.d/ros-latest.list'
wget http://packages.namniart.com/repos/namniart.key -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install ros-indigo-ros-base
sudo apt-get install python-rosdep
sudo rosdep init
rosdep update
echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
source ~/.bashrc
sudo apt-get install python-rosinstall
11、成果展示~
这是一个opencv腐蚀例子: