Opencv-2.1.0 µÄarmÒÆÖ²
ÎҵĻ·¾³
Host:Ubuntu 14.04
Target:tq2410 with Linux 2.6.30.4
Crossing Compiler:arm-linux-gcc 4.3.2
Ò»  ½»²æ±àÒëÁ´µÄ°²×°
1# cd /usr/local
½âѹ£¬¼´¿ÉµÃµ½ arm-none-linux-gnueabi Ŀ¼
# tar xzvf arm-none-linux-gnueabi-4. -C ./
2 ±à¼­/etc/bash.bashrcÎļþÌí¼Ó°Ñ±àÒëÆ÷·¾¶µ½»·¾³±äÁ¿ PATHÖÐ ,
  Ö»ÒªÔÚÕâ¸öÎļþÖÐÌí¼ÓÏÂÃæÕâ 2 ¸öÓï¾ä¼´¿É:
PATH=/usr/local/arm/4.3.2/bin:$PATH
export PATH
3 ±à¼­Íê±ÏºóʹÓà source /etc/bash.bashrc ÃüÁîÖ´ÐÐÒÔÏÂÕâ¸öÎļþ,ÈÃÉèÖÃÉúЧ,Ö®ºóÔÙÊäÈë:
# arm-none-linux-gnueabi-gcc -v
Èç¹ûÊä³öÏÂÃæµÄÐÅÏ¢Ôò±íÃæÉèÖóɹ¦:
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with:/scratch/julian/lite-respin/linux/src/gcc-4.3/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --enable-shared --enable-symvers=gnu --enable-__cxa_atexit --with-pk
gversion='Sourcery G++ Lite 2008q3-72' --with-bugurl=desourcery/GNUToolchain/ --disable-nls--prefix=/opt/codesourcery--with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc --with-build-sysroot=/scratch/julian/lite-respin/linux/install/arm-none-linux-gnueabi/libc --with-
gmp=/scratch/julian/lite-respin/linux/obj/host-libs-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr--with-mpfr=/scratch/julian/lite-respin/linux/obj/host-libs-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --disable-libgomp--enable-poison-system-directories--with-build-time-tools=/scratch/julian/lite-respin/linux/install/arm-none-linux-gnueabi/ bin --with-
build-time-tools=/scratch/julian/lite-respin/linux/install/arm-none-linux-gnueabi/bin Thread model: posix
gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72)
µ«ÊÇ£¬´Ëʱ»á±¨´í£ºbash:/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc:ûÓÐÄǸöÎļþ»òĿ¼
ÕâÊÇÒòΪÊÇΪ62λ»úÓë32λ²»¼æÈÝ£¬ÔÚ64λubuntuϵͳÉÏÔËÐÐ32λ³ÌÐòÐèÒª°²×°32λlib
ÍøÉϺܶàµØ·½ËµÓÃ#sudo apt-get install ia32-libs¿É½â¾ö£¬µ«ÊÇÎÒÖ´ÐÐÖ®ºóÈ´ÏÔʾ£º
# sudo apt-get install ia32-libs
ÕýÔÚ¶ÁÈ¡Èí¼þ°üÁбí... Íê³É
ÕýÔÚ·ÖÎöÈí¼þ°üµÄÒÀÀµ¹ØϵÊ÷     
ÕýÔÚ¶Áȡ״̬ÐÅÏ¢... Íê³É     
ÕýÔÚ¶ÁÈ¡Èí¼þ°üÁбí... Íê³É
ÕýÔÚ·ÖÎöÈí¼þ°üµÄÒÀÀµ¹ØϵÊ÷     
ÕýÔÚ¶Áȡ״̬ÐÅÏ¢... Íê³É     
ÏÖÔÚûÓпÉÓõÄÈí¼þ°ü ia32-libs£¬µ«ÊÇËü±»ÆäËüµÄÈí¼þ°üÒýÓÃÁË¡£
Õâ¿ÉÄÜÒâζ×ÅÕâ¸öȱʧµÄÈí¼þ°ü¿ÉÄÜÒѱ»·ÏÆú£¬
»òÕßÖ»ÄÜÔÚÆäËû·¢²¼Ô´ÖÐÕÒµ½
¿ÉÊÇÏÂÁÐÈí¼þ°üÈ¡´úÁËËü£º
  lib32z1 lib32ncurses5 lib32bz2-1.0
E: Èí¼þ°ü ia32-libs ûÓпɹ©°²×°µÄºòÑ¡Õß
ÔËÐÐÒÔÏÂÃüÁî¼´¿É£º
#sudo apt-get install g++-multilib
Õâʱ¼´¿ÉÏÔʾÉÏÃæµÄÐÅÏ¢£¬½»²æ±àÒëÁ´°²×°Íê³É
¶þ OpenCV2.0.0½»²æ±àÒë¹ý³Ì
ps:µ½ÕâÒ»²½ºóÍøÉϺܶà½Ì³Ì¶¼ÊÇ¿ªÊ¼½»²æ±àÒë x264,xvid,ffmpegµÈµÈ£¬×÷Õß³¢ÊÔ¹ýδ¹û¡£ËùÒÔת¶øͶ½µcmake-gui,×îºó˳Àû±àÒë³É¹¦¡£Ç¿ÁÒÍƼöcmake-gui,¼òµ¥ÊµÓá£
1.°²×°cmake-gui  #sudo apt-get install cmake-qt-gui
2.ÔÚusr/localн¨Îļþ¼Ð
# mkdir opencv
°ÑÏÂÔصÄOpenCV-2.0.0.tar.bz2½âѹµ½ usr/local/opencv Ŀ¼ÏÂ
3¡¢È»ºóÔÚusr/local/opencv  н¨Ò»¸ö opencv-arm Îļþ¼Ð£¬×÷ΪCMake±àÒëarm°æ±¾µÄ¹¤×÷Ŀ¼
# mkdir opencv-arm
linux系统安装步骤csdnÈçÏÂͼËùʾ£º
3¡¢ÔÚÖÕ¶ËÀïµ÷³öCMake gui½çÃ棺
# cmake-gui
°´ÕÕÏÂͼ·½Ê½Ñ¡ÔñÔ´ÂëĿ¼ºÍbuildĿ¼
È»ºóµã»÷Configure°´Å¥£¬±£³ÖgeneratorΪUnix Makefiles£¬Ñ¡ÔñSpecify options for cross-compiling£¬µã»÷Next
°´ÕÕÈçÏ·½Ê½ÅäÖãº
×¢£º/usr/local/arm/4.3.2 Ϊ½»²æ±àÒ빤¾ß arm-linux-g++/gcc µÄËùÔÚ°üº¬Îļþ¼Ð£¨ÔÚbinÎļþ¼ÐÀïÃ棩
×¢£ºTarget SystemÑ¡ÏîÀïOperationÎÒÈÏΪÊÇarm°å×ÓÉϵIJÙ×÷ϵͳ£¬¶ÔÓ¦ÎÒµÄVersionΪ2.6.30.4,ÉÏͼÖÐûÓиü¸Ä
È»ºóµã»÷ “Finish” °´Å¥£»
È»ºóµã»÷Generate°´Å¥Éú³ÉMakefile£»
4./usr/local/opencv/opencv-arm目录下$sudo make
(183%报错:
Linking CXX executable ../../bin/opencv_createsamples
../../lib/libopencv_core.so: undefined reference to `clock_gettime'
../../lib/libopencv_highgui.so: undefined reference to `_TIFFerrorHandler'

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。