Migrating OPENCV libraries on Zedboard

Source: Internet
Author: User

Migrating OPENCV libraries on Zedboard
Before doing a lot of porting OpenCV library work, but need to contain the various libraries, need cross-compiling, X264, Jpge, Ffmpge and so on

Note: In the "embedded system hardware and software Collaborative design Practice Guide" in 13 chapters, said the need to close various settings switch, the root cause is that we do not have the corresponding library support, so if we need to use the corresponding library in OpenCV, then we must advance the various libraries cross-compile, into the cross-compiler directory, My cross compiler installation directory/root/codesourcery/sourcery_codebench_lite_for_xilinx_gnu_linux/arm-xilinx-linux-gnueabi/

Then we'll start to cross-compile the following libraries.

1 cross compiler build cross compiler build see: http://blog.csdn.net/xiabodan/article/details/22717175

2 Cross-compiling JPEG 1. Installing the Libtool tool

1.1 Download Libtool Tools libtool-2.2.10.tar.gzhttp://mirrors.ustc.edu.cn/gnu/libtool/

1.2 Tar-xvzf libtool-2.2.10.tar.gz-c/home/xzy/sdb1/jpeg/

1.3 Enter the extracted directory and execute the./configure

1.4 Make

1.5 Make Install


2.JPEG Code Library porting

2.1 Download JPEG source package, select Jpegsrc.v6b.tar.gz http://www.ijg.org/files/

2.2 Unzip the tar jpegsrc.v6b.tar.gz -c/home/xzy/sdb1/jpeg/

2.3 Enter the extracted directory and copy the Libltdl/config/config.sub and config.guess from the libtool-2.2.10 directory to this directory.

2.4 configuration./configure CC=ARM-XILINX-LINUX-GNUEABI-GCC--host=arm-unknown-linux

–prefix=/home/xzy/sdb1/jpeg/jpeg-6b --enable-shared--enable-static

2.5 make

2.6 go to the installation path and create the following directory MkDir bin Lib include man Man/man1, my installation directory is in this directory, note that you have to create these directories, or else make install (tried. )

2.7 make install, and then it's OK.


3 cross-compiling x264 1 Download yasm yasm:http://yasm.tortall.net/download.html decompression Enter the directory to configure the following:
        ./configure--enable-shared--prefix=/root/codesourcery/sourcery_codebench_lite_for_xilinx_gnu_linux/ arm-xilinx-linux-gnueabi/--host=arm-unknown-linux
         Make
         Make install
2 Cross-compiling x264Download x264:ftp://ftp.videolan.org/pub/videolan/x264/snapshots/Configure after decompression
        ./configure--prefix=/root/codesourcery/sourcery_codebench_lite_for_xilinx_gnu_linux/arm-xilinx-linux-gnueabi/- -enable-shared
Modify the Config.mak file
# here instead of armarch=armsys=linux# here arm-xilinx-linux-gnueabi-gcccc=arm-xilinx-linux-gnueabi-gcc# remove-dhave_mmxext here- Dhave_sse2-darch_x86cflags=-wall-i.-o4-ffast-math-d__x264__-dhave_malloc_h-dsys_linux-dhave_pthread-s- Fomit-frame-pointer ldflags=-lm-lpthread-sas=nasm



ModifyMakefilefile
LIBX264.A:. Depend $ (OBJS) $ (objasm) Rm-linux-ar RC libx264.a $ (OBJS) $ (objasm) Arm-linux-ranlib libx264.a
Makemake Install



Then you can have the corresponding library generated under the/root/codesourcery/sourcery_codebench_lite_for_xilinx_gnu_linux/arm-xilinx-linux-gnueabi/lib.
4 cross-compiling XviDDownload xvid:http://downloads.xvid.org/downloads/xvidcore-1.1.3.tar.gz
        CD xvidcore-1.1.3/build/generic/
        ./configure--prefix=/root/codesourcery/sourcery_codebench_lite_for_xilinx_gnu_linux/arm-xilinx-linux-gnueabi/- -disable-assembly
    Gedit platform.inc  Modify CC=ARM-XILINX-LINUX-GNUEABI-GCC

5 cross-compiling ffmpeg download ffmpge:http://download.chinaunix.net/download.php?id=5532&resourceid=2990 tar xvjf ff mpeg-0.4.9-p20051120.tar.bz2
CD FFMPEG-0.4.9-P20051120/6 Cross compilation OpenCV
Reference:

Migrating OPENCV libraries on Zedboard

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.