資源簡介
基于可變窗口的立體匹配C++程序代碼,沒有錯(cuò)誤,可以直接運(yùn)行,只需要把自己的圖像路徑改一下即可,用的是經(jīng)典tsukuba圖相對進(jìn)行匹配的,效果不錯(cuò),對新接觸立體匹配的同學(xué)很有幫助,我的主頁還有SAD SSD NCC 的經(jīng)典局部立體匹配算法,需要的話也可以去我的主頁下載

代碼片段和文件信息
#include?“image.h“
IntImage::IntImage(const?int?wconst?int?hconst?int?b){
width=w;
height=h;
nBands=b;
}
//給對象的widthheightnBands賦值,并分配相應(yīng)大小的內(nèi)存空間
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;
}
}
//?返回像素對應(yīng)位置的地址
int*?IntImage::pixel(const?int?wconst?int?hconst?int?b){
int*?p;
p=&memory[h*width*nBands+w*nBands+b];
return?p;//尚方注釋:就是說它返回的是內(nèi)存中的地址
}
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;
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????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
?????文件????7536640??2016-03-28?10:47??ActiveWindow\ActiveWindow.sdf
?????文件???????5632??2016-03-28?10:47??ActiveWindow\ActiveWindow.v12.suo
?????文件???????6562??2016-03-28?10:35??ActiveWindow\ActiveWindow.vcxproj
?????文件???????1315??2016-03-28?10:35??ActiveWindow\ActiveWindow.vcxproj.filters
?????文件????1862656??2016-03-28?10:46??ActiveWindow\Debug\ActiveWindow.bsc
?????文件????1091584??2016-03-28?10:46??ActiveWindow\Debug\ActiveWindow.exe
?????文件????2708796??2016-03-28?10:46??ActiveWindow\Debug\ActiveWindow.ilk
?????文件???????3109??2016-03-28?10:46??ActiveWindow\Debug\ActiveWindow.log
?????文件??????43520??2009-10-12?21:31??ActiveWindow\Debug\ActiveWindow.opt
?????文件????4975616??2016-03-28?10:46??ActiveWindow\Debug\ActiveWindow.pdb
?????文件????????182??2016-03-28?10:46??ActiveWindow\Debug\ActiveWindow.tlog\ActiveWindow.lastbuildstate
?????文件????????568??2016-03-28?10:46??ActiveWindow\Debug\ActiveWindow.tlog\BscMake.command.1.tlog
?????文件????????642??2016-03-28?10:46??ActiveWindow\Debug\ActiveWindow.tlog\bscmake.read.1.tlog
?????文件????????496??2016-03-28?10:46??ActiveWindow\Debug\ActiveWindow.tlog\bscmake.write.1.tlog
?????文件???????2078??2016-03-28?10:46??ActiveWindow\Debug\ActiveWindow.tlog\cl.command.1.tlog
?????文件??????19330??2016-03-28?10:46??ActiveWindow\Debug\ActiveWindow.tlog\CL.read.1.tlog
?????文件???????2574??2016-03-28?10:46??ActiveWindow\Debug\ActiveWindow.tlog\CL.write.1.tlog
?????文件???????3086??2016-03-28?10:46??ActiveWindow\Debug\ActiveWindow.tlog\li
?????文件???????8136??2016-03-28?10:46??ActiveWindow\Debug\ActiveWindow.tlog\li
?????文件????????756??2016-03-28?10:46??ActiveWindow\Debug\ActiveWindow.tlog\li
?????文件???????6541??2016-03-28?10:41??ActiveWindow\Debug\image.obj
?????文件??????????0??2016-03-28?10:41??ActiveWindow\Debug\image.sbr
?????文件?????272445??2016-03-28?10:46??ActiveWindow\Debug\main.obj
?????文件??????????0??2016-03-28?10:46??ActiveWindow\Debug\main.sbr
?????文件?????219345??2016-03-28?10:42??ActiveWindow\Debug\matchParameters.obj
............此處省略21個(gè)文件信息
評論
共有 條評論