Zynq-7000学习笔记(十四)——移植openCV

PC平台:WINDOWS 10 64位 + 虚拟机Ubuntu 14.04

开发板:ZedBoard

openCV: opencv-3.1.0.zip

opencv的编译很简单,不需要特别注意什么,先准备一个xilinx.cmake文件

set( CMAKE_SYSTEM_NAME Linux )
set( CMAKE_SYSTEM_PROCESSOR arm )
set( CMAKE_C_COMPILER arm-linux-gnueabihf-gcc )
set( CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++ )
set( CMAKE_INSTALL_PREFIX /home/luotong/working/opencvlib)

进入opencv-3.1.0目录,创建并进入build目录
cmake -DBUILD_EXAMPLES=1 -DBUILD_ZLIB=1 -DBUILD_JPEG=1 -DCMAKE_TOOLCHAIN_FILE=../platforms/linux/xilinx.cmake -DWITH_FFMPEG=0 -DWITH_PNG=0 -DWITH_1394=0 -DWITH_GTK=0 -DWITH_GTK_2_X=0 -DWITH_GSTREAMER=0 -DWITH_GSTREAMER_0_10=0 ..

# make

# make install

来源:luotong86的专栏
*本文已由作者授权转发,如需转载请联系作者本人获得授权