Transplant OPENCV library on zedboard, and transplant opencv on zedboard

Source: Internet
Author: User

Transplant OPENCV library on zedboard, and transplant opencv on zedboard
Transplant OPENCV library on zedboard
We have done a lot of work before porting the OPENCV library, but the various libraries that need to be included need to be cross-compiled, X264, JPGE, FFMPGE, etc.

Note: In chapter 13 of the "Practical Guide to software and hardware Collaborative Design for Embedded Systems", we have to turn off various settings. The root cause is that we do not have the corresponding database support, therefore, if we need to use the corresponding library in opencv, We must overcompile the various libraries in advance and put them into the directory of the cross compiler, my cross-compiler installation directory/root/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/arm-xilinx-linux-gnueabi/

Then we begin to cross-compile the following libraries.

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

2. Cross-compile JPEG 1. Install libtool

1.1 download libtoolLibtool-2.2.10.tar.gzHttp://mirrors.ustc.edu.cn/gnu/libtool/

1.2 tar-xvzfLibtool-2.2.10.tar.gz-C/home/xzy/sdb1/JPEG/

1.3 enter the decompressed directory and execute./configure

1.4 make

1.5 make install


2. JPEG library porting

2.1 Download the source code package, select your src.v6b.tar.gz http://www.ijg.org/files/

2.2 unzip tar extension src.v6b.tar.gz-C/home/xzy/sdb1/JPEG/

2.3 enter the decompressed directory and copy libltdl/config. sub and config. guess under the libtool-2.2.10 directory to this directory.

2.4 configure./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.6Go to the installation path and create the following directory:Mkdir bin lib include man/man1. My installation directory is in this directory. Note that you must create these directories. Otherwise, make install (tried .)

2.7 make install, and then OK.


3 cross compile x264 1 download yasm: http://yasm.tortall.net/Download.html unzip into directory to perform the following Configuration:
        ./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-compile x264 download x264: ftp://ftp.videolan.org/pub/videolan/x#/snapshots/decompress and configure
        ./configure --prefix=/root/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/arm-xilinx-linux-gnueabi/ --enable-shared
Modify the config. mak File
# Change here to ARMARCH = ARMSYS = LINUX # change here to arm-xilinx-linux-gnueabi-gccCC = arm-xilinx-linux-gnueabi-gcc # Remove-DHAVE_MMXEXT-DHAVE_SSE2-DARCH_X86CFLAGS = -Wall-I. -O4-ffast-math-d1_x264 _-DHAVE_MALLOC_H-DSYS_LINUX-DHAVE_PTHREAD-s-fomit-frame-pointer LDFLAGS =-lm-lpthread-sAS = nasm



Modify Makefile
libx264.a: .depend $(OBJS) $(OBJASM)rm-linux-ar rc libx264.a $(OBJS) $(OBJASM)arm-linux-ranlib libx264.a
makemake install



Then, the corresponding library is generated under/root/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/arm-xilinx-linux-gnueabi/lib.
Xvid download 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-compiled ffmpeg download ffmpge: http://download.chinaunix.net/download.php? Id = 5532 & ResourceID = 2990 tar xvjf ffmpeg-0.4.9-p20051120.tar.bz2
Cd ffmpeg-0.4.9-p20051120/6 cross-compiled OpenCV
Refer:
What is the difficulty of this project?

The Development Board is easy, no difficulty. You don't need to do most of the work by yourself. You can simply get started with the routine.

How to download the opencv Library to the Development Board

The x86 opencv library called on the pc needs to be transplanted. The arm version is called on the arm, and the library must be compiled into an arm and version.
 

Related Article

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.