env_rbf.m

来自「一个emd分解的matlab实现」· M 代码 · 共 49 行

M
49
字号
%   Env_Rbf.m
%   BEMD 
%   Interpolation by radial basis functions from extrema or crest lines
%
%   J.C. Nunes, Y. Bouaoune, E. Del閏helle, N. Oumar, and Ph. Bunel.
%   "Image analysis by bidimensional empirical mode decomposition".
%   Image and Vision Computing Journal (IVC), (to appear), 2003. 

function [Ienvmin,Ienvmax,nbr_extrema]=Env_Rbf(I,ext_lpe)
global name

%   si ext_lpe==1 interpolation par les extrema sinon par les lignes cr鑤es

[t1 t2]=size(I);
CONN=8;
h=1;
I2=double(I);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Calcul de l'image des minima
if ext_lpe==1
    IMin=imregionalmin(I2);
    IMin=double(IMin);
    Imin=IMin.*I2;
else
    I2_inv=double(imcomplement(double(I2)))*255;
    IMin=watershed(I2_inv,CONN);
    IMin=IMin==0;
    IMin=double(IMin);
    Imin=IMin.*I2;
    clear I2_inv
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   Calcul de l'image maxima
if ext_lpe==1
    IMax=imregionalmax(I2);
    IMax=double(IMax);
    Imax=IMax.*I2;
else
    IMax=watershed(I2,CONN);
    IMax=IMax==0;
    IMax=double(IMax);
    Imax=IMax.*I2;
end

%%%%%%%%%%%%%%%%%%%%%%  Les minima  %%%%%%%%%%%%%%%%%%%%%%%
% Calcul enveloppe min
[x,y,z] = find(Imin);   % on calcule l'env inf 

⌨️ 快捷键说明

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