資源簡介
枝切法進行相位消跳變(解包裹),有示例圖。
代碼片段和文件信息
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%?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中保存了殘差值的行號
fprintf(‘residues?numbe?%d‘temp(1));
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?al
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????328758??2014-01-10?06:17??枝切法\100.bmp
?????文件?????328758??2014-01-10?06:17??枝切法\101.bmp
?????文件?????328758??2014-01-10?06:17??枝切法\102.bmp
?????文件?????328758??2014-01-10?06:17??枝切法\103.bmp
?????文件?????328758??2014-01-10?06:17??枝切法\104.bmp
?????文件??????18100??2013-12-03?12:28??枝切法\BranchCuts.asv
?????文件??????18137??2014-01-04?01:11??枝切法\BranchCuts.m
?????文件??????12081??2013-12-04?07:58??枝切法\FloodFill.asv
?????文件??????12081??2013-12-04?07:58??枝切法\FloodFill.m
?????文件???????3709??2013-12-14?06:34??枝切法\GoldsteinUnwrap2D.m
?????文件???????2086??2009-12-29?06:07??枝切法\PhaseResidues.m
?????文件???????3698??2013-12-04?07:53??枝切法\xiugai.asv
?????文件???????3894??2014-07-04?19:28??枝切法\xiugai.m
?????目錄??????????0??2014-07-13?13:25??枝切法
-----------?---------??----------?-----??----
??????????????1717576????????????????????14
評論
共有 條評論