VXL

De Pontão Nós Digitais

VXL is a collection of C++ computer vision libraries (and python bindings) with contributions from Kitware, GE, Brown University, and others. This wiki page contains unofficial notes from some developers.

Git Repo

Folow the instructions at https://sourceforge.net/p/vxl/wiki/Git/

Hacking

Apple OSX

There are a few bugs affecting compilation, see [1]

  • make -j9 is having a non-deterministic behavior - try running it a few times, but make -j5 sometimes works better as far as errors go. A plain make is always safer.
  • If you find an error related to ffmpeg, then I just left all FFMPEG-related entries in CMAKE blank. That removes support for video loading but thats about it.
  • A compilation error related to X11 means the headers from the wrong place are being used. I had to modify the cmake flag for x11 includes to point to /opt/local/include
  • My current CMake settings to compile in OSX are available on-line [2]

Patches to compile VXL in OSX

In addition to the above measures, a number of source code changes had to be implemented to get VXL to compile.

  • All the source code changes I had to do in order to get VXL to compile are available in my Github copy of vxl, branch osx-compile-fixes [3]
  • A link time error related to OpenGL acceleration in vgui/tests means this test is outdated and should be ignored. Comment out that file or the offending lines. Alternatively, you could point the OpenGL CMake variables to /opt/... since those opengl libs contain the desired symbols, but they're older.
  • The above link mentions a OPENJPEG2 work around
  • See also: General OSX-related development instructions

Writing a program that uses VXL

A simple example using CMake is hello-vxl:

git clone ssh://SOURCEFORGE_LOGIN@labmacambira.git.sourceforge.net/gitroot/labmacambira/hello-vxl

Read the README.

Setting up VxL Programming environment at IPRJ

This is Ricardo Fabbri's recommended workflow for working with the official VXL plus an internal repo (here named LEMSVXL)

  • download vxl git
    • place it into folder vxlprg/vxl
  • we use LEMSVXL - an internal (closed) repo of vxl-based libs from Brown
    • download lemsvxl git
    • place it into folder vxlprg/lemsvxl
  • create build directories lemsvxl-bin and vxl-bin inside vxlprg
mkdir lemsvxl-bin vxlprg-bin

Compiling

  • on the commandline, enter vxl-bin
  • type
ccmake ../vxl
  • type 'c' for "configure"
BUILD_SHARED_LIBS = ON (faster link time)
BUILD_UNMAINTAINED_LIBRARIES = ON
at first BUILD_VGUI = OFF
CMAKE_BUILD_TYPE = Debug (for now)
VNL_CONFIG_LEGACY_METHODS = on (needed for lemsvxl)
  • type 'c' once more
  • inspect any CMAKE variables that might have changed (they have a star * attached to them)
  • type 'c' again until no new variables show up and config is right
  • once 'g' appears, press 'g' (generate)
  • press 'q'
  • type 'make -j9'
  • if there is any error:
    • retry with simply 'make'
    • test your build
      • go inside 'core' and type 'make'. See if there are any errors. If not, good.
      • go inside contrib/brl and type 'make'. See if there are any errors. If so, you might not be able to build what you want from the internal lemsvxl repo. But keep going, at least core builds.
      • optionally if there are still errors just do 'make -j9 --keep-going' to

build as much as possible before moving on to your private lemsvxl repo

Compiling lemsvxl

  • enter lemsvxl-bin
  • ccmake ../lemsvxl
  • Fill in where your vxl-bin folder is as the VXL path, then press 'c', then
BUILD_SHARED_LIBS = ON (faster link time)
BUILD_UNMAINTAINED_LIBRARIES = ON
CMAKE_BUILD_TYPE = Debug (for now)
BUILD_CONTRIB = on (for now)
BUILD_ALGO = on
BUILD_CONTRIB = on
can be usefol to set USE_BOOST 
  • press 'c' and fill out info until you get a 'g'
  • try out a first make -j9 - it will likely have errors
  • if it does have errors, just make in your desired path:
    • For the symbolic edge linker, for instance, you just need to get 'brcv/seg/dbdet' to compile. All dependencies will be compiled.
      • cd brcv/seg/dbdet/tests
      • make
      • cd brcv/seg/dbdet/algo/tests
      • make
      • cd brcv/seg/dbdet
      • make
    • Once you compiled the key basic libs for your application, now move on to compile the GUI parts
    • In the case of edge detection:
      • cd contrib/edge_det/gui
      • make
      • backtrack and compile each lib separately to solve problems.
  • April 4 2014: I had to comment out anything related to bvis1_gl_codec, and vidl1, with no apparent harm to my research code
  • My current CMake settings to compile LEMSVxL in OSX are available on-line [4]

Links