您的位置:首页 > 其它

debian下编译PTAM

2012-08-14 11:41 225 查看
1、下载PTAM源代码

2、CVS下载相关库:

# export CVS_RSH=ssh

# cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/toon co -D "Mon May 11 16:29:26 BST 2009" TooN

# cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/libcvd co -D "Mon May 11 16:29:26 BST 2009" libcvd

# cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/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" <<endl;

并添加include:

#include <iostream>

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::vector<T, std::allocator<_Tp1> >, std::allocator<std::vector<T, std::allocator<_Tp1> > > > GVars3::serialize::FromStream<std::vector<std::vector<T, std::allocator<_Tp1> >, std::allocator<std::vector<T,
std::allocator<_Tp1> > > > >::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 <stdio.h>

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

继续编译,编译成功!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: