📄 denoisewpyr.m
字号:
function im_d = denoiseWpyr(im,noiseVar,noise,opts);% function im_d = denoiseWpyr(im,noiseVar,noise,opts);%% Denoise image using a quadrature mirror filter Wavelet decomposition with % oriented highpass residual bands. Called from 'denoise_main' %% 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;% The number of orientations is 3, regardless what the user specified. opts.nOrientations = 3;% noise without boundary extension to avoid bnry effect in the covariance% matrixnoise = sqrt(noiseVar) * randn(size(im));% build the pyramid representation ...[pyr,pind] = buildWpyr(im,opts.nLevels,'qmf9','circular');[pyrN,pind] = buildWpyr(noise,opts.nLevels,'qmf9','circular');pyrnew = pyr;numOfBands = size(pind,1);% For each subband ....for nband = 1:numOfBands-1 if verbose fprintf('processing band no %d\n',nband); end % ... decide on wether include the parent or not ... prnt = opts.parent & (nband+opts.nOrientations <= numOfBands-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 = reconWpyr(pyrnew,pind,'qmf9','circular');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -