clique_energy_ho.m

来自「%%% Demos for PUMA algorithms %%% We 」· M 代码 · 共 27 行

M
27
字号
function e=clique_energy_ho(d,p,th,quant)
%clique_energy_ho  Computes clique energy: e=th^(p-2)*d.^2.*mask + d.^p.*(1-mask)
%        e=clique_energy_ho(d,p,th,quant)
%
%  Input arguments --------------------
%  d             -> clique difference
%  p             -> power law exponent
%  th            -> it defines a region over which the potential grows quadratically
%  quant         -> it defines whether or not the potential is quantized

switch quant
    case 'no'        % non quantized potential
        d=abs(d);
    case 'yes'       % quantized potential (2pi Quantization of phase difference)
        d=abs(round(d/2/pi)*2*pi);
end;
%

if th~=0
    mask = (d<=th);
    e = th^(p-2)*d.^2.*mask + d.^p.*(1-mask);
else
    e = d.^p;
end
return

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?