欢迎来到天天文库
浏览记录
ID:16958300
大小:16.43 KB
页数:4页
时间:2018-08-26
《密集点匹配opencv程序》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、//由于cvut版本进行了更新,致使该工程不能在最新cvut版本下编译,请使用工程包含的cvut库进行编译#include"cv.h"#include"highgui.h"#include"cvut/cvut.h"#include#include#include#includeusingnamespacestd;usingnamespacecvut;#pragmacomment(lib,"cxcore")#pragmacomment(lib,"cv")#pra
2、gmacomment(lib,"highgui")//#defineREAL_TIME_MATCHING_SHOWintmain(intargc,char**argv){Imagetemp("image/Luxor02StereoSm2.jpg");Imageleft(temp.size().width/2,temp.size().height,8,3);Imageright(temp.size().width/2,temp.size().height,8,3);//分割图像inti,j
3、,t,k;for(i=0;i4、cktoJiangxi,andDirectorofthenewOfficeinJingdezhen,JiangxiCommitteeSecretary.Startingin1939servedasrecorderoftheWestNorthOrganization,SecretaryoftheSpecialCommitteeAfterthevictoryofthelongMarch,hehasbeentheNorthwestOfficeoftheFederationofStateenterprisesMinister,Shenm5、ufuguSARmissions,DirectorofNingxiaCountypartyCommitteeSecretaryandrecorderoftheCountypartyCommitteeSecretary,Ministersandleft.show("left");right.show("right",400,0);cvWaitKey();left.close();right.close();/**************************************************************6、**********特征匹配*************************************************************************/cout<<"特征匹配……";intdepth_count=0;vector>depth(left.width*left.height,vector(3));vectordepth_buf(3);//匹配窗口大小///////////////////////////////////////////////////7、/////////////////////intwin_size=9;Matrixleft_wins(left.width-win_size/2-win_size/2,win_size*win_size*3,1);Matrixright_wins(left.width-win_size/2-win_size/2,win_size*win_size*3,1);//设定最大可能视差///////////////////////////////////////////////////////////in8、tdepth_max=10;intdepth_min=left.height;boolis_match=false;intl,m,n;for(i=win_size/2;i
4、cktoJiangxi,andDirectorofthenewOfficeinJingdezhen,JiangxiCommitteeSecretary.Startingin1939servedasrecorderoftheWestNorthOrganization,SecretaryoftheSpecialCommitteeAfterthevictoryofthelongMarch,hehasbeentheNorthwestOfficeoftheFederationofStateenterprisesMinister,Shenm
5、ufuguSARmissions,DirectorofNingxiaCountypartyCommitteeSecretaryandrecorderoftheCountypartyCommitteeSecretary,Ministersandleft.show("left");right.show("right",400,0);cvWaitKey();left.close();right.close();/**************************************************************
6、**********特征匹配*************************************************************************/cout<<"特征匹配……";intdepth_count=0;vector>depth(left.width*left.height,vector(3));vectordepth_buf(3);//匹配窗口大小///////////////////////////////////////////////////
7、/////////////////////intwin_size=9;Matrixleft_wins(left.width-win_size/2-win_size/2,win_size*win_size*3,1);Matrixright_wins(left.width-win_size/2-win_size/2,win_size*win_size*3,1);//设定最大可能视差///////////////////////////////////////////////////////////in
8、tdepth_max=10;intdepth_min=left.height;boolis_match=false;intl,m,n;for(i=win_size/2;i
此文档下载收益归作者所有