%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% FloodFill.m unwraps the phase image, avoiding all branch cuts.
% Created by B.S. Spottiswoode on 12/10/2004
% Last modified on 13/10/2004
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [IM_unwrapped, rowref, colref]=FloodFill(IM_phase, branch_cuts, IM_mask)
[r_dim, c_dim]=size(IM_phase);
figure; imagesc(immultiply(IM_phase, ~branch_cuts)), colormap(gray), axis square, axis off, title('Phase image');
uiwait(msgbox('选择一个已知的真实相位参考点','Phase reference point','modal'));
[xref,yref] = ginput(1);%鼠标选择一个点
colref = round(xref); rowref = round(yref);
close;
%如果选择的点为残差点
if (branch_cuts(rowref,colref)==1)
error('Selected point c
枝切法解包裹完整代码 matlab + 使用示例
于 2024-05-19 16:13:09 首次发布
本文提供了一种使用Matlab实现枝切法的完整代码,并附带了详细的使用示例,帮助读者理解和应用该算法。
摘要由CSDN通过智能技术生成