bemd.m

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

M
55
字号
%   BEMD.m
%   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. 

clear all
clear functions
close all
clc

disp('BEMD')

warning off

nb_modes=6; % number of modes

ext_lpe=1   % if ext_lpe==1 interpolation by extrema
            % else                       by crest lines

SDmax=1;            %   standard deviation

precision=0.0003;     %   precision of stop criteria

t1=150;
t2=150;
t3=0;
t4=0;

I=imread('texture2.JPG');


I=mat2gray(double(I));
%figure, imagesc(I), colormap(gray), title('image'),truesize, drawnow

I=double(I)*255;

figure, imagesc(I), colormap(gray), title('image'),truesize, drawnow

[If,Ires,Imodes]=BEMD_RBF(I,nb_modes,SDmax,ext_lpe,precision);

Iori=I;

sz=size(Imodes);
nbmodes=sz(3);
for j=1:nbmodes
    figure
    subplot(121),imagesc(Imodes(:,:,j)), colormap(gray),title(['mode' num2str(j)])
    Iori=Iori-Imodes(:,:,j);
    subplot(122),imagesc(Iori), colormap(gray),title('residue image ' ), truesize, drawnow
    
end

return

⌨️ 快捷键说明

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