資源簡(jiǎn)介
比較適合初學(xué)者,代碼包括Goldstein枝切法、質(zhì)量導(dǎo)向法、DCT最小二乘法
code man

代碼片段和文件信息
%%?************************************
%??????????作者:James_Ray_Murphy
%?*******************************************
clear?
close?all
clc
%%?*************初始相位**************
N?=?512;
G?=?20;
phi0?=?peaks(N)*G;?%模擬初始相位
figure(1)
surf(phi0‘FaceColor‘‘interp‘?‘EdgeColor‘‘none‘‘FaceLighting‘‘phong‘);
camlight?left?axis?tight
xlabel(‘X/Pixels‘‘FontSize‘14);ylabel(‘Y/Pixels‘‘FontSize‘14);zlabel(‘Phase/Radians‘‘FontSize‘14);%title(‘Initial?Phase‘‘FontSize‘14)
set(figure(1)‘name‘‘Initial?Phase?3D‘‘Numbertitle‘‘off‘);
phi?=?angle(exp(1i*phi0));?????????%包裹相位
figure(2);
imshow(phi[]);
xlabel(‘X/Pixels‘‘FontSize‘14);ylabel(‘Y/Pixels‘‘FontSize‘14);%title(‘Wrapped?Phase‘‘FontSize‘14)
set(figure(2)‘name‘‘Wrapped?Phase‘‘Numbertitle‘‘off‘);
axis?on
%%?*************相位解包裹**************
%********************對(duì)包裹相位求一階偏微分**************
[mn]?=?size(phi);
phidx?=?zeros(mn);
phidy?=?zeros(mn);
phidu?=?zeros(mn);
phidv?=?zeros(mn);
phidx(1:m-1:)?=?angle(exp(1i*(phi(2:m:)-phi(1:m-1:))));
phidy(:1:n-1)?=?angle(exp(1i*(phi(:2:n)-phi(:1:n-1))));
phidu(1:m-11:n-1)?=?angle(exp(1i*(phi(2:m2:n)-phi(1:m-11:n-1))));
phidv(1:m-11:n-1)?=?angle(exp(1i*(phi(2:m1:n-1)-phi(1:m-12:n))));
%********************對(duì)包裹相位求二階偏微分**************
Rou3?=?zeros(mn);
Rou3dx?=?zeros(mn);
Rou3dy?=?zeros(mn);
Rou3du?=?zeros(mn);
Rou3dv?=?zeros(mn);
Rou3dx(1:m-1:)?=?angle(exp(1i*(phidx(2:m:)-phidx(1:m-1:))));
Rou3dy(:1:n-1)?=?angle(exp(1i*(phidy(:2:n)-phidy(:1:n-1))));
Rou3du(1:m-11:n-1)?=?angle(exp(1i*(phidu(2:m2:n)-phidu(1:m-11:n-1))));
Rou3dv(1:m-11:n-1)?=?angle(exp(1i*(phidv(2:m1:n-1)-phidv(1:m-12:n))));
Rou3?=?Rou3dx?+?Rou3dy?+Rou3du?+?Rou3dv;
figure(3);
surf(Rou3‘FaceColor‘‘interp‘?‘EdgeColor‘‘none‘‘FaceLighting‘‘phong‘);
camlight?left?axis?tight
xlabel(‘X/Pixels‘‘FontSize‘14);ylabel(‘Y/Pixels‘‘FontSize‘14);zlabel(‘Phase/Radians‘‘FontSize‘14);%title(‘lou3‘‘FontSize‘14)
set(figure(3)‘name‘‘R(xy)?3D‘‘Numbertitle‘‘off‘);
figure(4);
imshow(Rou3[]);
xlabel(‘X/Pixels‘‘FontSize‘14);ylabel(‘Y/Pixels‘‘FontSize‘14);
set(figure(4)‘name‘‘R(xy)?2D‘‘Numbertitle‘‘off‘);
%***********************DCT求解泊松方程********************
tic
PP3?=?dct2(Rou3);
for?ii=1:m
????for?jj=1:n
????????k1=2*cos((ii-1)*pi/(m));
????????k2=2*cos((jj-1)*pi/(n));
????????KK?=?k1+k2?+?k1*k2?-?8;
????????PH3(iijj)?=?PP3(iijj)/KK;
????end
end
PH3(11)?=?-(PH3(12)?+?PH3(21)?-?PP3(11))/2;
phi333?=?idct2(PH3);
toc
phi333?=?phi333(1:m1:n);
figure(5);
surf(phi333‘FaceColor‘‘interp‘?‘EdgeColor‘‘none‘‘FaceLighting‘‘phong‘);
camlight?left?axis?tight
xlabel(‘X/Pixels‘‘FontSize‘14);ylabel(‘Y/Pixels‘‘FontSize‘14);zlabel(‘Phase/Radians‘‘FontSize‘14);%title(‘Four?LSBLS?Phase?Unwrapping‘‘FontSize‘14)
set(figure(5)‘name‘‘Four?LSBLS?Phase?Unwrapping‘‘Numbertitle‘‘off‘);
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????2949??2018-07-30?16:33??PhaseUnwrapping\LeastSquareMethod\LeastSquareMethod.m
?????文件??????????0??2018-04-13?11:17??PhaseUnwrapping\myPhaseUnwrapping\.gitignore
?????文件?????????79??2018-04-13?11:17??PhaseUnwrapping\myPhaseUnwrapping\main.m
?????文件??????16667??2018-04-13?11:17??PhaseUnwrapping\myPhaseUnwrapping\PhaseUnwrapping2D\BranchCuts.m
?????文件??????11896??2018-04-13?11:17??PhaseUnwrapping\myPhaseUnwrapping\PhaseUnwrapping2D\FloodFill.m
?????文件???????2290??2018-04-13?11:17??PhaseUnwrapping\myPhaseUnwrapping\PhaseUnwrapping2D\GoldsteinUnwrap2D.m
?????文件???????6859??2018-04-13?11:17??PhaseUnwrapping\myPhaseUnwrapping\PhaseUnwrapping2D\GuidedFloodFill.m
?????文件??????29683??2018-04-13?11:17??PhaseUnwrapping\myPhaseUnwrapping\PhaseUnwrapping2D\IM.mat
?????文件???????1531??2018-04-13?11:17??PhaseUnwrapping\myPhaseUnwrapping\PhaseUnwrapping2D\license.txt
?????文件???????4297??2018-04-13?11:17??PhaseUnwrapping\myPhaseUnwrapping\PhaseUnwrapping2D\PhaseDerivativeVariance.m
?????文件???????1920??2018-04-13?11:17??PhaseUnwrapping\myPhaseUnwrapping\PhaseUnwrapping2D\PhaseResidues.m
?????文件???????2783??2018-04-13?11:17??PhaseUnwrapping\myPhaseUnwrapping\PhaseUnwrapping2D\QualityGuidedUnwrap2D.m
?????文件????????257??2018-04-13?11:17??PhaseUnwrapping\myPhaseUnwrapping\PhaseUnwrapping2D\readme.txt
?????文件???????9662??2018-04-13?11:17??PhaseUnwrapping\myPhaseUnwrapping\pw_why\branchCut.m
?????文件????????287??2018-04-13?11:17??PhaseUnwrapping\myPhaseUnwrapping\pw_why\curl4.m
?????文件??????29683??2018-04-13?11:17??PhaseUnwrapping\myPhaseUnwrapping\pw_why\IM.mat
?????文件???????2172??2018-04-13?11:17??PhaseUnwrapping\myPhaseUnwrapping\pw_why\phaseResidue.m
?????文件????????786??2018-04-13?11:17??PhaseUnwrapping\myPhaseUnwrapping\pw_why\pwTest.m
?????文件????????288??2018-04-13?11:17??PhaseUnwrapping\myPhaseUnwrapping\pw_why\wrap.m
?????文件?????????81??2018-04-13?11:17??PhaseUnwrapping\myPhaseUnwrapping\Readme.md
?????文件????????789??2015-03-25?01:44??PhaseUnwrapping\sunwrap\example.m
?????文件?????487202??2015-03-25?01:44??PhaseUnwrapping\sunwrap\example.mat
?????文件???????1138??2015-03-25?01:44??PhaseUnwrapping\sunwrap\LICENSE.txt
?????文件????????699??2015-03-25?01:44??PhaseUnwrapping\sunwrap\README.txt
?????文件??????17159??2015-03-25?01:44??PhaseUnwrapping\sunwrap\sunwrap.m
?????文件???????1122??2017-12-30?14:41??PhaseUnwrapping\test\README.md
?????文件???????1558??2017-12-30?14:41??PhaseUnwrapping\test\test_unwrap_phase.m
?????文件???????5856??2017-12-30?14:41??PhaseUnwrapping\test\unwrap_phase.m
?????文件?????197120??2018-08-01?19:26??PhaseUnwrapping\枝切法1.doc
?????文件????3798324??2018-07-31?20:29??PhaseUnwrapping\用于MEMS器件精密測(cè)量的干涉相位解纏算法研究.pdf
............此處省略11個(gè)文件信息
評(píng)論
共有 條評(píng)論