denoisesfpyr.m

来自「MATLAB Denoising software for grayscale 」· M 代码 · 共 56 行

M
56
字号
function im_d = denoiseSFpyr(im,noiseVar,noise,opts);% function im_d = denoiseSFpyr(im,noiseVar,noise,opts);%% Denoise image using a seperable Steerable Wavelet pyramid. Called% from 'denoise_main' which is a wrapper function.%% where%   'im'        is the noisy image%   'noiseVar'  is the noise variance%   'noise'     a noisy image to estimate the covariance%   'opts'      a set of options, see 'newOptions'%% Peter-Vincent Gehler 15.March 2005verbose = 1;% ... for backward compability ...if ~isfield(opts,'adaptneighbours');    opts.adaptneighbours = 0;endif opts.adaptneighbours     blSzX = 3;    blSzY = 3;else    blSzX = opts.block(1);    blSzY = opts.block(2);endnOr = opts.nOrientations;[pyr,pind] = buildSFpyr(im,opts.nLevels,opts.nOrientations-1);[pyrN,pind] = buildSFpyr(noise,opts.nLevels,opts.nOrientations-1);pyrnew = real(pyr);numOfBands = size(pind,1);% ... for each subband ...for nband = 1:numOfBands-1    if verbose         fprintf('processing band no %d\n',nband);    end        % ... decide if to include the parent ...    prnt = opts.parent & (nband+nOr <= numOfBands-1) & (nband>1);    % ... denoise ...    newBand = denoise_band(pyr,pyrN,pind,nband,opts,prnt);    % ... and store the result.    pyrnew(pyrBandIndices(pind,nband)) = newBand(:);end% ... reconstruct the image and return. im_d = reconSFpyr(pyrnew,pind);

⌨️ 快捷键说明

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