debian下编译PTAM

1、下载PTAM源代码
2、CVS下载相关库:
# export CVS_RSH=ssh
# cvs -z3 -d:pserver:[email protected]:/sources/toon co -D "Mon May 11 16:29:26 BST 2009" TooN
# cvs -z3 -d:pserver:[email protected]:/sources/libcvd co -D "Mon May 11 16:29:26 BST 2009" libcvd
# cvs -z3 -d:pserver:[email protected]:/sources/libcvd co -D "Mon May 11 16:29:26 BST 2009" gvars3
3、安装以下库及其devel:
 libblas, liblapack, perhaps libgfortran, libncurses and libreadline
(optional, for GVars3-没找到), libdc1394 (and maybe libraw1394 - 没装)
for firewire capture, optionally libtiff, libjpeg, libpng.

4、编译TooN,很简单,就是一些headers复制

5、编译libcvd
# export CXXFLAGS=-D_REENTRANT
# ./configure --without-ffmpeg

# make
convolution.cc 的15行报错:
     printf("In convolveSeparable, size must be odd.\n");
改为:
     cout << "In convolveSeparable, size must be odd" < 并添加include:
   #include

6、编译 GVars3
报错:
./gvars3/serialize.h:77: error: ‘EOF’ was not declared in this scope
./gvars3/serialize.h:92: error: ‘EOF’ was not declared in this scope
./gvars3/serialize.h: In static member function ‘static std::vector >, std::allocator > > > GVars3::serialize::FromStream >, std::allocator > > > >::from(std::istream&)’:
./gvars3/serialize.h:118: error: ‘EOF’ was not declared in this scope
./gvars3/serialize.h:133: error: ‘EOF’ was not declared in this scope
修改:
    在serialize.h添加#include

7、编译PTAM
1)复制PTAM/Build/Linux下所有文件到PTAM
2)make编译
报错:
OpenGL.h:6:19: error: GL/gl.h: 没有那个文件或目录
OpenGL.h:7:22: error: GL/glext.h: 没有那个文件或目录
In file included from OpenGL.h:20,
                 from GLWindow2.cc:1:
/usr/local/include/cvd/gl_helpers.h:39:20: error: GL/glu.h: 没有那个文件或目录
GLWindow2.cc:247:24: error: X11/keysym.h: 没有那个文件或目录
In file included from /usr/local/include/cvd/gl_helpers.h:40,
                 from OpenGL.h:20,
                 from GLWindow2.cc:1:
修正:
   安装 nvidia-glx-dev包

继续报错:
In file included from OpenGL.h:20,
                 from GLWindow2.cc:1:
/usr/local/include/cvd/gl_helpers.h:39:20: error: GL/glu.h: 没有那个文件或目录
In file included from OpenGL.h:20,
                 from GLWindow2.cc:1:
修正:

安装 libglu1-mesa-dev


默认视频源使用的是1394摄像头,修改Makefile,将video源改为普通摄像头:

VIDEOSOURCE = VideoSource_Linux_DV.o

继续编译,编译成功!

你可能感兴趣的:(增强现实,debian,cvs,iostream,makefile,file,include)