• 大小: 20KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-17
  • 语言: Matlab
  • 标签:

资源简介

matlab开发-BundleAdjustment。解束平差(共线方程)摄影测量的一个简单函数

资源截图

代码片段和文件信息

function BundleSimpleFull01()
% This function is developed by M. Davoodianidaliki as part of MSc thesis.
% Everyone can use it as long as they mention author name.
% Contact me by mdavoodian@ut.ac.ir mahmooddavoodian@gmail.com
% Use Help.txt file which is part of .zip file for more information

load BundleFull_911224_S06_Dual_Chk1.mat

close all
loop=true;
State=2; 
CamUnNum = 10;
StationUnNum = 6;
CamNum = length(CamData);
ChkUnNum=3;

RGBImgNum=length(StationData);

handle1=figure();tablenames{RGBImgNum*6+4}=‘‘;
for rtr=1:RGBImgNum
    tablenames{rtr*6-5+CamUnNum*CamNum}=[‘S‘num2str(rtr)];
end
table1 = uitable(handle1‘rowname‘tablenames‘position‘[00800600]);
looprtr = 0;
rowrtr = 0;
Xmatcell=[];

Cntrl = PointData(1).Cntrl;
ChkInds=find(~Cntrl);ChkNum=length(ChkInds);ChkIndX=zeros(1length(ChkInds));ChkIndZ=ChkIndX;
for Chktrtr=1:ChkNum
ChkIndX(ChkInds(Chktrtr)) = StationUnNum*RGBImgNum+CamNum*CamUnNum+(Chktrtr*ChkUnNum-ChkUnNum+1);
ChkIndZ(ChkInds(Chktrtr)) = StationUnNum*RGBImgNum+CamNum*CamUnNum+(Chktrtr*ChkUnNum);
end

Amat = zeros(RGBImgNum * length(PointData(1).XGr) * 3StationUnNum*RGBImgNum+CamNum*CamUnNum+ChkNum*ChkUnNum);
Lmat = zeros(RGBImgNum * length(PointData(1).XGr) * 31);
CamDataHist(CamNum*CamUnNum10)=0; CtrlHist(210)=0;
while loop
tic();
for rtrRGBImgNum=1:RGBImgNum 
PointId = Data(rtrRGBImgNum).PointId;
CamId = Data(rtrRGBImgNum).CamId;
StationId = Data(rtrRGBImgNum).StationId;
if ~StationData(StationId).active
    continue;
end

PointAvb = StationData(StationId).PointAvb;

fl = CamData(CamId).fvalue;
Kcoefs = CamData(CamId).Kcoefs;Pcoefs = CamData(CamId).Pcoefs;Bcoefs = CamData(CamId).Bcoefs;
BPK1 = Kcoefs(1);BPK2 = Kcoefs(2);BPK3 = Kcoefs(3);
BPK4 = Pcoefs(1);BPK5 = Pcoefs(2);BPK6 = Bcoefs(1);BPK7 = Bcoefs(2);
omega = StationData(StationId).omega;
phi = StationData(StationId).phi;
kappa = StationData(StationId).kappa;
XCntGr = StationData(StationId).Xcnt;
YCntGr = StationData(StationId).Ycnt;
ZCntGr = StationData(StationId).Zcnt;

XCoordGrMat = PointData(PointId).XGr;
YCoordGrMat = PointData(PointId).YGr;
ZCoordGrMat = PointData(PointId).ZGr;

Cntrl = PointData(PointId).Cntrl;
        
RGBPntNum=numel(XCoordGrMat);

trgxmat = Data(rtrRGBImgNum).trgxmat;
trgymat = Data(rtrRGBImgNum).trgymat;

ppcoord = CamData(CamId).ppcoord;
xCntImg = ppcoord(1);yCntImg = ppcoord(2);

ST = CamUnNum*CamId-CamUnNum+1:CamUnNum*CamId-0; 
CfC = ST(1);

CyCC = ST(end);

ST = (CamUnNum*CamNum)+StationUnNum*StationId-StationUnNum+1:...
    (CamUnNum*CamNum)+StationUnNum*StationId; 
SXC= ST(1);

SKC= ST(6);

for rtrRGBPntNum=1:RGBPntNum 
    if ~PointAvb(rtrRGBPntNum) || ~Cntrl(rtrRGBPntNum)
        if PointAvb(rtrRGBPntNum) && ~Cntrl(rtrRGBPntNum)
    ZCoordGr = ZCoordGrMat(rtrRGBPntNum);xCoordImg = trgxmat(rtrRGBPntNum);yCoordImg = trgymat(rtrRGBPntNum);
    CtrlHist(CamId*2-1looprtr+1)=XCoordGrMat(rtrRGBPntNum) - eval_FRLCEX(BPK1BPK2BPK3BPK4B

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件       14858  2013-08-25 18:07  Bundle(By M. Davoodianidaliki)\BundleFull_911224_S06_Dual_Chk1.mat
     文件       33252  2013-10-31 00:00  Bundle(By M. Davoodianidaliki)\BundleSimpleFull01.m
     文件        1340  2013-10-31 00:04  Bundle(By M. Davoodianidaliki)\Help.txt
     文件        1324  2014-02-12 14:38  license.txt

评论

共有 条评论