資源簡介
利用枝切法實現相位解纏,實測可用,干涉相位條紋圖解纏。

代碼片段和文件信息
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%?BranchCuts.m?generates?branch?cuts?based?on?the?phase?residues.?This?is
%?done?using?the?Goldstein?method?as?described?in?“Two-dimensional?phase?
%?unwrapping:?theory?algorithms?and?software“?by?Dennis?Ghiglia?and?
%?Mark?Pritt.
%?“residue_charge“?is?a?matrix?wherein?positive?residues?are?1?and?
%?negative?residues?are?0.?residue_charge是一個矩陣,用來保存殘差值。
%?“max_box_radius“?defines?the?maximum?search?radius?for?the?balancing?of?
%?residues.?If?this?is?too?large?areas?will?be?isolated?by?the?branch
%?cuts.最大窗口半徑
%?“IM_mask“?is?a?binary?matrix.?This?serves?as?an?artificial?border?for?the
%?branch?cuts?to?connect?to.二進制矩陣
%?Created?by?B.S.?Spottiswoode?on?15/10/2004
%?Last?modified?on?18/10/2004
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function?branch_cuts=BranchCuts(residue_charge?max_box_radius?IM_mask);
[rowdim?coldim]=size(residue_charge);
branch_cuts=~IM_mask;???????????????????????????????%Define?initial?branch?cuts?borders?as?the?mask.
residue_charge_masked=residue_charge;
residue_charge(logical(~IM_mask))=0;????????????????%將不在掩膜中的殘差點去掉。Remove?all?residues?except?those?in?the?mask
cluster_counter=1;??????????????????????????????????%記錄每個群中的殘差點個數。Keep?track?of?the?number?of?residues?in?each?cluster
satellite_residues=0;???????????????????????????????%記錄衛星參差點個數?Keep?track?of?the?number?of?satellite?residues?accounted?for
residue_binary=(residue_charge~=0);?????????????????%邏輯矩陣標注了殘差點的位置,即正殘差點(+1標記)和負殘差點(-1標記)的位置全部用1表明,非殘差點不變是0。
residue_balanced=zeros(rowdim?coldim);?????????????%初始時假定所有的殘差點都是不平衡的。
[rowrescolres]?=?find(residue_binary);?????????????%找到殘差點的坐標Find?the?coordinates?of?the?residues
adjacent_residues=zeros(rowdim?coldim);????????????%定義搜尋窗口中找到的新殘差點的位置Defines?the?positions?of?additional?residues?found?in?the?search?box
missed_residues=0;??????????????????????????????????%記錄有效的殘差點的個數?Keep?track?of?the?effective?number?of?residues?left?unbalanced?because?of
disp(‘Calculating?branch?cuts?...‘);
tic;%開始計時
temp=size(rowres);%rowres中保存了殘差值的行號
for?i=1:temp(1);????????????????????????????????????%Loop?through?the?residues
????radius=1;???????????????????????????????????????%Set?the?initial?box?size
????r_active=rowres(i);?????????????????????????????%當前活動殘差點的行數和列數。Coordinates?of?the?active?residue
????c_active=colres(i);
????count_nearby_residues_flag=1;???????????????????%用于說明是否跟蹤周圍殘差點的標記。Flag?to?indicate?whether?or?not?to?keep?track?of?the?nearby?residues
????cluster_counter=1;??????????????????????????????%重置殘差點個數記錄Reset?the?cluster?counter
????adjacent_residues=zeros(rowdim?coldim);????????%重置鄰近的Reset?the?adjacent?residues?indicator
????charge_counter=residue_charge_masked(r_active?c_active);????????????????%保存初始殘差點電量Store?the?initial?residue?charge
????if?residue_balanced(r_active?c_active)~=1????????????????????????%Has?this?residue?already?been?balanced?
????????while?(ch
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????18098??2009-12-28?20:21??枝切法相位解纏\枝切法相位解纏\BranchCuts.m
?????文件??????12083??2009-02-11?14:58??枝切法相位解纏\枝切法相位解纏\FloodFill.m
?????文件???????2360??2010-01-22?12:31??枝切法相位解纏\枝切法相位解纏\GoldsteinUnwrap2D.m
?????文件???????6964??2008-12-22?10:05??枝切法相位解纏\枝切法相位解纏\GuidedFloodFill.m
?????文件???????4382??2008-12-22?10:05??枝切法相位解纏\枝切法相位解纏\PhaseDerivativeVariance.m
?????文件???????2086??2009-12-28?15:07??枝切法相位解纏\枝切法相位解纏\PhaseResidues.m
?????文件???????5744??2018-12-17?00:37??枝切法相位解纏\枝切法相位解纏\QualityGuidedUnwrap2D.m
?????目錄??????????0??2018-12-22?00:39??枝切法相位解纏\枝切法相位解纏
?????目錄??????????0??2018-12-22?00:39??枝切法相位解纏
-----------?---------??----------?-----??----
????????????????51717????????????????????9
評論
共有 條評論