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" <<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

繼續編譯,編譯成功!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章