Sunday, October 4, 2015

Download source code:
- OpenCV
- Examples

1. Build for host
OpenCV-2.0.0

  export PREFIX=/usr/local  
  ./configure --prefix=${PREFIX}  
     
  make    
  make install  

OpenCV-2.3.1
 cd OpenCV-2.3.1  
 mkdir release  
 cd release  
 cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..  #chu y hai dau cham  
   
 make  
 make install  

2. Cross compile
OpenCV-2.0.0 (using configure)
 export PATH=$PATH:/opt/FriendlyARM/toolschain/4.4.3/bin  
 export CROSS=arm-none-linux-gnueabi-  
 export HOST=arm-none-linux-gnueabi  

 export PREFIX=/friendlyarm

 ./configure --prefix=${PREFIX} --host=${HOST} CC=${CROSS}gcc \
 --without-gtk --without-gthread --without-ffmpeg \
 --without-python --enable-shared

 make
 make install

OpenCV-2.3.1 (using cmake)
Sử dụng Qt GUI for cmake
 yum install cmake-gui  







 [ninhld@localhost ~]$ cd /home/ninhld/mini2440/opencv/OpenCV-2.3.1/release2  
 [ninhld@localhost release2]$   
 [ninhld@localhost release2]$   
 [ninhld@localhost release2]$   
 [ninhld@localhost release2]$ make  
 Scanning dependencies of target libjasper  
 [ 0%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jas_version.obj  
 [ 0%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jp2_enc.obj  
 [ 0%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jpc_tsfb.obj  
 [ 0%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jas_icc.obj  
 [ 0%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jp2_cod.obj  
 [ 0%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jas_stream.obj  
 [ 1%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jpc_t2dec.obj  
 [ 1%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jpc_t1dec.obj  
 [ 1%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jas_cm.obj  
 [ 1%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jpc_t2cod.obj  
 [ 1%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jpc_tagtree.obj  
 [ 1%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jpc_mct.obj  
 [ 2%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jpc_enc.obj  
 [ 2%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jas_iccdata.obj  
 [ 2%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jas_tmr.obj  
 [ 2%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jpc_mqenc.obj  
 [ 2%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jas_malloc.obj  
 [ 2%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jpc_mqcod.obj  
 [ 2%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jas_init.obj  
 [ 3%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jpc_mqdec.obj  
 ...  










Leave a Reply

Subscribe to Posts | Subscribe to Comments

- Copyright © Lập trình hệ thống nhúng Linux . Powered by Luong Duy Ninh -