Compiling PTAM (Win32)

It took quite some time to get everything working. Here is a quick break-down. Compling works fine. But PTAM isn't doing anything meaningful so far. Everything was done using Visual Studio 2010 Ultimate.

  1. get the PTAM source code
    • unpack and read the containing README.txt
  2. get all dependencies named in the README.txt
    • fltk-2.0
    • gvars3 (see 3. )
    • jpeg-6b
    • libvcd (see 3. )
    • pthreads
    • TooN
    • 1394camera645
    • glew 1.6.0
    • lapack
  3. I noticed that the code revision for gvars3 and libvcd, which is referenced in the README.txt, dosen't work quite well. So I took the HEAD revision (date: 19.05.2011)
  4. unpack all dependencies (some come as self-extracting or install packages, so it is necessary to watch where the files go and move all the one place)
  5. adjust the include/library paths of libvcd and gvars3 and compile both (using the included VC2005 projects)
    • gvars3 include:
      $(ProjectDir)..\..;$(ProjectDir)..\..\..;$(ProjectDir)..\..\..\pthreads\Pre-built.2\include;$(ProjectDir)..\..\..\fltk-2.0;%(AdditionalIncludeDirectories)
    • libcvd include:
      ..\..;$(ProjectDir)..\..\..\jpeg-6b\include;$(ProjectDir)..\..\..\pthreads\Pre-built.2\include;$(ProjectDir)..\..\..\
    • libcvd lib:
      $(ProjectDir)..\..\..\jpeg-6b\lib;$(ProjectDir)..\..\..\pthreads\Pre-built.2\lib
  6. (from now on everything in the PTAN project) adjust the include/lib paths also
    • include paths:
      include;$(ProjectDir)..\ptam dependencies;$(ProjectDir)..\ptam dependencies\gvars3;$(ProjectDir)..\ptam dependencies\pthreads\Pre-built.2\include;$(ProjectDir)..\ptam dependencies\libcvd
    • lib paths:
      $(ProjectDir)..\ptam dependencies\pthreads\Pre-built.2\lib;$(ProjectDir)..\ptam dependencies\gvars3\lib;$(ProjectDir)..\ptam dependencies\libcvd\lib;lib
  7. open SymEigen.h and search for //calculate eigenvalues (at line 184)
    replace in the next line the two calls of sqrt from sqrt(3) to sqrt(3.0)
  8. add /FORCE:MULTIPLE to the linker options (suggested by JC) and compile
  9. copy the following dlls from the dependencies to the Release folder
    • pthread*.dll
    • glew32.dll
    • lapack_win32_MT.dll, blas_win32_MT.dll
  10. run PTAM.exe

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.