Difference between revisions of "OpenCV"

From ArmadeusWiki
Jump to: navigation, search
(Create page)
(No difference)

Revision as of 00:04, 5 June 2010

Page under construction... Construction.png Informations on this page are not guaranteed !!

Forewords

This page explains how to (cross-)compile OpenCV 2.1.0 for your APF-board.

Pre-requisite

You need to have CMake installed on your system.

Build OpenCV

  1. Edit your toolchain.cmake file
  2. Create source and build directories
    mkdir -pv opencv-on-armadeus/{src,build}
    
  3. Grab the source archive
    cd opencv-on-armadeus/src && wget http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.1/OpenCV-2.1.0.tar.bz2/dowload && tar xvvjf OpenCV-2.1.0.tar.bz2
    
  4. Run CMake (generate Makefiles)
    1. cd ../build && cmake -DCMAKE_TOOLCHAIN_FILE:PATH=/path/to/toolchain.cmake ../src/OpenCV-2.1.0
      
    2. It will certainly complain about unfound libraries and some other things, so adjust these things running:
      cmake-gui
      
  5. Compile OpenCV libraries
    VERBOSE=1 make
    


Note Note: cmake-gui
  • Click twice on Configure when you change something.
  • When configuring exit without any error, click on Generate to generate Makefiles.
  • If your configuration is too messy, reset it by deleting the cache (File/Delete Cache) or remove the CMakeCache.txt file in the build directory. Don't hesitate to do so if something (eg. paths) is wrong ;)
  • To see the cmake-command that corresponds to the configuration you have just set in cmake-gui: Tools/Show my changes


Available features

CMake looks for all required tool in the path specified in toolchain.cmake file; therefore, some options, targets, libraries, ... are not available:

  • Build:
    • Latex Doc  : Not available in Buildroot
    • New Python support  : Not available (require Python >=2.6, Buildroot provides Python 2.4)
    • Swing Python support : Not available (require Python >=2.6, Buildroot provides Python 2.4)
    • Octave support  : Not available in Buildroot
  • Python
    • Executable  : Not found (require Python >=2.6, Buildroot provides Python 2.4)
    • Include dirs.  : Found
    • Library  : Not found (require Python >=2.6, Buildroot provides Python 2.4)
  • With
    • V4L  : Disable it (Buildroot provides it, but linker failed)
  • OpenCV
    • 3rd party libs.  : You can enable it.


Note Note: You may need to enable some packages in your Armadeus configuration to get some libraries (libjpeg, libpng and libtiff) found by CMake.