ubuntu 10.10 编译 PTAMM
来源:互联网 发布:捷西网络官网地址 编辑:程序博客网 时间:2024/06/08 17:40
1 安装所需要的依赖库
通过cvs和ssh获得以下库(首先需要安装cvs:sudo apt-get install cvs,然后设置export CVS_RSH=ssh)
(1)安装blas和lapack库
sudo apt-get install libboost-dev libboost-doc
sudo apt-get install liblapack-dev
(2)安装libpng、libjpeg、libtiff、libdc1394
sudo apt-get install libpng-dev
sudo apt-get install libtiff-dev
sudo apt-get install libjpeg62-dev
sudo apt-get install libdc1394-22-dev
(3)安装opengl
sudo apt-get install mesa-common-dev
sudo apt-get install libgl1-mesa-dev
sudo apt-get install libglu1-mesa-dev
sudo apt-get install freeglut3-dev
测试opengl是否安装成功的例子test_gl.cpp:
运行:gcc test_gl.cpp -lglut# include <GL/glut.h> # include <stdlib.h> /**//* 初始化材料属性、光源属性、光照模型,打开深度缓冲区 */ void init ( void ) { GLfloat mat_specular [ ] = { 1.0, 1.0, 1.0, 1.0 }; GLfloat mat_shininess [ ] = { 50.0 }; GLfloat light_position [ ] = { 1.0, 1.0, 1.0, 0.0 }; glClearColor ( 0.0, 0.0, 0.0, 0.0 ); glShadeModel ( GL_SMOOTH ); glMaterialfv ( GL_FRONT, GL_SPECULAR, mat_specular); glMaterialfv ( GL_FRONT, GL_SHININESS, mat_shininess); glLightfv ( GL_LIGHT0, GL_POSITION, light_position); glEnable (GL_LIGHTING); glEnable (GL_LIGHT0); glEnable (GL_DEPTH_TEST); } /**//*调用GLUT函数,绘制一个球*/ void display ( void ) { glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glutSolidSphere (1.0, 40, 50); glFlush (); } /**//* 定义GLUT的reshape函数,w、h分别是当前窗口的宽和高*/ void reshape (int w, int h) { glViewport (0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode (GL_PROJECTION); glLoadIdentity ( ); if (w <= h) glOrtho (-1.5, 1.5, -1.5 * ( GLfloat ) h / ( GLfloat ) w,
1.5 * ( GLfloat ) h / ( GLfloat ) w, -10.0, 10.0 ); else glOrtho (-1.5 * ( GLfloat ) w / ( GLfloat ) h, 1.5 * ( GLfloat ) w / ( GLfloat ) h,
-1.5, 1.5, -10.0, 10.0); glMatrixMode ( GL_MODELVIEW ); glLoadIdentity ( ) ; } /**//* 定义对键盘的响应函数 */ void keyboard ( unsigned char key, int x, int y) { /**//*按Esc键退出*/ switch (key) { case 27: exit ( 0 ); break; } } int main(int argc, char** argv) { /**//* GLUT环境初始化*/ glutInit (&argc, argv); /**//* 显示模式初始化 */ glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); /**//* 定义窗口大小 */ glutInitWindowSize (300, 300); /**//* 定义窗口位置 */ glutInitWindowPosition (100, 100); /**//* 显示窗口,窗口标题为执行函数名 */ glutCreateWindow ( argv [ 0 ] ); /**//* 调用OpenGL初始化函数 */ init ( ); /**//* 注册OpenGL绘图函数 */ glutDisplayFunc ( display ); /**//* 注册窗口大小改变时的响应函数 */ glutReshapeFunc ( reshape ); /**//* 注册键盘响应函数 */ glutKeyboardFunc ( keyboard ); /**//* 进入GLUT消息循环,开始执行程序 */ glutMainLoop( ); return 0; }
./a.out
(4)TooN 线性代数库
下载:cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/toon co TooN
安装:./configure
make
sudo make install
(5)libCVD 图像处理、视频捕捉、计算机视觉库
下载:cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/libcvd co libcvd
这里下载到版本过旧,因此选择libcvd-20100511。
安装:
./configure
make
sudo make install
(6)Gvars3 libcvd的一个子工程
下载:cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/libcvd co gvars3
安装:./configure --disable-widgets
make
sudo make install
(7)lib3ds 处理3ds模型(版本是lib3ds-20080909)
下载网址:http://www.lib3ds.org
安 装:./configure; make; sudo make install
2 安装编译PTAMM库
make编译,修改makefile,使用VideoSource_Linux_V4L代替VideoSource_Linux_DV,目的所使用USE摄像头进行捕捉。
- ubuntu 10.10 编译 PTAMM
- ubuntu 12.04下编译PTAM和PTAMM
- PTAMM 编译经过
- 编译PTAM与PTAMM-记
- 【PTAMM】PTAMM编译过程若干非常见错误解决方法
- Windows 7 编译 PTAM and PTAMM
- PTAMM的Linux 编译与运行
- Uinity3D Visual Studio编译环境配置[For PTAMM in Unity]
- 开源Slam 代码PTAM与PTAMM的编译项目完整工程
- PTAM与PTAMM
- Ubuntu 10.10下编译vlc
- Ubuntu 10.10编译Bochs2.4.5笔记
- Ubuntu 10.10编译Android2.2 froyo 注意事项
- ubuntu 10.10 源码编译安装mysql 5.1
- ubuntu 10.10 源码编译安装mysql 5.5
- 在Ubuntu 10.10下编译Android源码
- Ubuntu 10.10 编译安装OpenCV 2.2
- Ubuntu 10.10下编译安装无线网卡
- 交换两个字符串
- 关于gcc,Binutils,Make, gdb 和 glibc
- Prime Land
- zen cart与magento是目前世界上最为流行的两大外贸网店系统
- c++学习11
- ubuntu 10.10 编译 PTAMM
- php图片识别
- WIN7 X64 SSDT函数获得
- irp的处理,免得忘了
- XPath(5) Use axis, nodetest and predicate to define path expression
- Windows NT 驱动程序开发人员提示 -- 应注意避免的事项
- cocos2d-x中CCSprite更换图片
- Javascirpt的strict模式
- uva 10152 - ShellSort