Friday, April 13, 2012

Install PTAM on Ubuntu 11.10

The PTAM is a nice augmented reality software, which is developed by Dr. Klein in 2008. It requires three dependencies: TooN, libcvd and gvars3. Since the ubuntu has upgraded to the 11.10 and libcvd also has its new version. When I try to install PTAM with new versions of ubuntu and dependencies, I have encountered some problems, such as " undefined reference to `typeinfo for CVD::V4L::RawV4LBuffer
" and “undefined reference to `dgesvd_’”.

The solution I found is from the website:
http://blog.icewu.tk/93/install-ptam-on-ubuntu-11-04.html

1. Edit the source file "cvd_src/v4l2buffer.cc:
 
 //      #error "Can't do v4l2 for this kernel version"
         #define K26(X) X
         #define K24(X)

2. Edit "cvd/v4l1frame.h" :

      #include 
      #include 
 
3. Edit "Makefile" in libcvd: 

     add cvd_src/Linux/v4lbuffer.o to CVD_OBJS
 
4. Install libcvd without the configuration (configure will change the makefile).

5. Edit "Makefile" in PTAM to include " -llapack -lblas": 

LINKFLAGS = -L MY_CUSTOM_LINK_PATH -lGVars3 -lcvd -llapack -lblas

6. Install PTAM