图像的亚像素边缘检测 MATLAB代码
发布网友
发布时间:2022-04-26 22:11
我来回答
共1个回答
热心网友
时间:2023-11-09 10:23
Press the "Start" button to see a demonstration of
denoising tools in the Wavelet Toolbox.
This demo uses Wavelet Toolbox functions.
% Set signal to noise ratio and set rand seed.
sqrt_snr = 3; init = 2055615866;
% Generate original signal and a noisy version adding
% a standard Gaussian white noise.
[xref,x] = wnoise(3,11,sqrt_snr,init);
% Denoise noisy signal using soft heuristic SURE thresholding
% and scaled noise option, on detail coefficients obtained
% from the decomposition of x, at level 5 by sym8 wavelet.
% Generate original signal and a noisy version adding
% a standard Gaussian white noise.
lev = 5;
xd = wden(x,'heursure','s','one',lev,'sym8');
% Denoise noisy signal using soft SURE thresholding.
xd = wden(x,'rigrsure','s','one',lev,'sym8');
% Denoise noisy signal using fixed form threshold with
% a single level estimation of noise standard deviation.
xd = wden(x,'sqtwolog','s','sln',lev,'sym8');
% Denoise noisy signal using fixed minimax threshold with
% a multiple level estimation of noise standard deviation.
xd = wden(x,'minimaxi','s','sln',lev,'sym8');
% If many trials are necessary, it is better to perform
% decomposition one time and threshold it many times :
% decomposition.
[c,l] = wavedec(x,lev,'sym8');
% threshold the decomposition structure [c,l].
xd = wden(c,l,'minimaxi','s','sln',lev,'sym8');
% Load electrical signal and select a part.
load leleccum; indx = 2600:3100;
x = leleccum(indx);
% Use wdencmp for signal de-noising.
% find default values (see ddencmp).
[thr,sorh,keepapp] = ddencmp('den','wv',x);
% denoise signal using global thresholding option.
xd = wdencmp('gbl',x,'db3',2,thr,sorh,keepapp);
% Some trial examples without commands counterpart.
% Rand initialization: init = 2055615866;
% Square root of signal to noise ratio: sqrt_snr = 5;
% [xref,x] = wnoise(1,11,sqrt_snr,init);
% Some trial examples without commands counterpart (more).
% Rand initialization: init = 2055615866;
% Square root of signal to noise ratio: sqrt_snr = 4;
% [xref,x] = wnoise(2,11,sqrt_snr,init);
% Some trial examples without commands counterpart (more).
% Rand initialization: init = 2055615866;
% Square root of signal to noise ratio: sqrt_snr = 3;
% [xref,x] = wnoise(3,11,sqrt_snr,init);
% Some trial examples without commands counterpart (more).
% Rand initialization: init = 2055615866;
% Square root of signal to noise ratio: sqrt_snr = 3;
% [xref,x] = wnoise(3,11,sqrt_snr,init);
% Some trial examples without commands counterpart (more).
% Rand initialization: init = 2055615866;
% Square root of signal to noise ratio: sqrt_snr = 3;
% [xref,x] = wnoise(3,11,sqrt_snr,init);
% Some trial examples without commands counterpart (more).
% Rand initialization: init = 2055615866;
% Square root of signal to noise ratio: sqrt_snr = 3;
% [xref,x] = wnoise(3,11,sqrt_snr,init);
热心网友
时间:2023-11-09 10:23
Press the "Start" button to see a demonstration of
denoising tools in the Wavelet Toolbox.
This demo uses Wavelet Toolbox functions.
% Set signal to noise ratio and set rand seed.
sqrt_snr = 3; init = 2055615866;
% Generate original signal and a noisy version adding
% a standard Gaussian white noise.
[xref,x] = wnoise(3,11,sqrt_snr,init);
% Denoise noisy signal using soft heuristic SURE thresholding
% and scaled noise option, on detail coefficients obtained
% from the decomposition of x, at level 5 by sym8 wavelet.
% Generate original signal and a noisy version adding
% a standard Gaussian white noise.
lev = 5;
xd = wden(x,'heursure','s','one',lev,'sym8');
% Denoise noisy signal using soft SURE thresholding.
xd = wden(x,'rigrsure','s','one',lev,'sym8');
% Denoise noisy signal using fixed form threshold with
% a single level estimation of noise standard deviation.
xd = wden(x,'sqtwolog','s','sln',lev,'sym8');
% Denoise noisy signal using fixed minimax threshold with
% a multiple level estimation of noise standard deviation.
xd = wden(x,'minimaxi','s','sln',lev,'sym8');
% If many trials are necessary, it is better to perform
% decomposition one time and threshold it many times :
% decomposition.
[c,l] = wavedec(x,lev,'sym8');
% threshold the decomposition structure [c,l].
xd = wden(c,l,'minimaxi','s','sln',lev,'sym8');
% Load electrical signal and select a part.
load leleccum; indx = 2600:3100;
x = leleccum(indx);
% Use wdencmp for signal de-noising.
% find default values (see ddencmp).
[thr,sorh,keepapp] = ddencmp('den','wv',x);
% denoise signal using global thresholding option.
xd = wdencmp('gbl',x,'db3',2,thr,sorh,keepapp);
% Some trial examples without commands counterpart.
% Rand initialization: init = 2055615866;
% Square root of signal to noise ratio: sqrt_snr = 5;
% [xref,x] = wnoise(1,11,sqrt_snr,init);
% Some trial examples without commands counterpart (more).
% Rand initialization: init = 2055615866;
% Square root of signal to noise ratio: sqrt_snr = 4;
% [xref,x] = wnoise(2,11,sqrt_snr,init);
% Some trial examples without commands counterpart (more).
% Rand initialization: init = 2055615866;
% Square root of signal to noise ratio: sqrt_snr = 3;
% [xref,x] = wnoise(3,11,sqrt_snr,init);
% Some trial examples without commands counterpart (more).
% Rand initialization: init = 2055615866;
% Square root of signal to noise ratio: sqrt_snr = 3;
% [xref,x] = wnoise(3,11,sqrt_snr,init);
% Some trial examples without commands counterpart (more).
% Rand initialization: init = 2055615866;
% Square root of signal to noise ratio: sqrt_snr = 3;
% [xref,x] = wnoise(3,11,sqrt_snr,init);
% Some trial examples without commands counterpart (more).
% Rand initialization: init = 2055615866;
% Square root of signal to noise ratio: sqrt_snr = 3;
% [xref,x] = wnoise(3,11,sqrt_snr,init);