资源简介
输入输出的是.PGM 格式的图。
输入左右图,生成视差图
带有良好的注释

代码片段和文件信息
#include “image.h“
IntImage::IntImage(const int wconst int hconst int b){
width=w;
height=h;
nBands=b;
}
//给对象的widthheightnBands赋值,并分配相应大小的内存空间
int IntImage::allocate(const int wconst int hconst int b){
if(w<=0||h<=0||b<=0)
return 0;
else{
width=w;
height=h;
nBands=b;
memory=new int[w*h*b];
return 1;
}
}
// 返回像素对应位置的地址
int* IntImage::pixel(const int wconst int hconst int b){
int* p;
p=&memory[h*width*nBands+w*nBands+b];
return p;//尚方注释:就是说它返回的是内存中的地址
}
FloatImage::FloatImage(const int wconst int hconst int b){
width=w;
height=h;
nBands=b;
}
int FloatImage::allocate(const int wconst int hconst int b){
if(w<=0||h<=0||b<=0)
return 0;
else{
width=w;
height=h;
nBands=b;
memory=new float[w*h*b];
return 1;
}
}
float* FloatImage::pixel(const int wconst int hconst int b){
float* p;
p=&memory[h*width*nBands+w*nBands+b];
return p;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2010-07-11 10:45 ActiveWindow\
文件 4616 2009-08-06 21:45 ActiveWindow\ActiveWindow.dsp
文件 549 2009-08-05 21:06 ActiveWindow\ActiveWindow.dsw
文件 74752 2010-01-10 10:52 ActiveWindow\ActiveWindow.ncb
文件 54784 2010-01-10 10:52 ActiveWindow\ActiveWindow.opt
文件 1620 2010-01-06 19:44 ActiveWindow\ActiveWindow.plg
目录 0 2010-07-11 10:45 ActiveWindow\Debug\
文件 779264 2010-01-06 19:44 ActiveWindow\Debug\ActiveWindow.bsc
文件 278596 2010-01-06 19:44 ActiveWindow\Debug\ActiveWindow.exe
文件 410272 2010-01-06 19:44 ActiveWindow\Debug\ActiveWindow.ilk
文件 43520 2009-10-12 21:31 ActiveWindow\Debug\ActiveWindow.opt
文件 2479440 2010-01-06 19:44 ActiveWindow\Debug\ActiveWindow.pch
文件 1393664 2010-01-06 19:44 ActiveWindow\Debug\ActiveWindow.pdb
文件 5898 2009-08-08 20:02 ActiveWindow\Debug\image.obj
文件 0 2009-08-08 20:02 ActiveWindow\Debug\image.sbr
文件 40643 2010-01-06 19:44 ActiveWindow\Debug\main.obj
文件 0 2010-01-06 19:44 ActiveWindow\Debug\main.sbr
文件 47676 2010-01-06 19:44 ActiveWindow\Debug\matchParameters.obj
文件 0 2010-01-06 19:44 ActiveWindow\Debug\matchParameters.sbr
文件 156672 2010-01-07 10:58 ActiveWindow\Debug\vc60.idb
文件 143360 2010-01-06 19:44 ActiveWindow\Debug\vc60.pdb
文件 996 2009-08-08 20:02 ActiveWindow\image.cpp
文件 781 2009-08-08 20:02 ActiveWindow\image.h
文件 755 2010-01-06 19:44 ActiveWindow\main.cpp
文件 7933 2010-01-06 19:44 ActiveWindow\matchParameters.cpp
文件 1726 2009-10-12 21:33 ActiveWindow\matchParameters.h
- 上一篇:安川DX200 高速Ethernet说明书日文
- 下一篇:深入理解ES6-文字高清版
相关资源
- VisualStudioUninstaller vs卸载工具
- 组态王驱动开发包3.0.0.7(中文)
- 多窗口后台鼠标连点器
- 使用选择性重传协议实现UDP可靠通信
- VC 获得文件属性 获取文件的创建时
- 读者写者问题(读者优先,写者优先
- 用VC 编写的仿QQ聊天室程序源代码
- 外点法程序
- 外罚函数程序
- qt-电子点菜系统
- 推箱子及人工智能寻路C 源代码
- 自己写的航空订票系统c 版--数据结构
- 数据结构实验魔王语言
- MUSIC算法c 实现
- C 餐厅叫号系统(QT平)
- 国际象棋c 完整版
-
ob
jectARX给Auto CAD加工具条 - 画图程序MFC/VC/VC CRectTracker 串行化
- MFC网络编程实例
- c 课程设计 职工信息管理系统
- VC 游戏编程—附源代码
- IpHlpApi.h&IpHlpApi.lib
- 清华大学 c 郑莉 ppt课件
- c 程序判断离散数学中命题公式
- 多项式求和(数据结构C 版)
- vc 6.0开发的流程图编辑器
- 自适应隐写算法wow
- VC 天空盒(skyBox)实现(附源代码)
- c MFC 画多边形
- 用C 实现的对网络上的ARP数据包进行
评论
共有 条评论