图像的亚像素边缘检测 MATLAB代码 50
求助亚像素边缘检测的程序本人急需亚像素边缘检测算法的程序,只要是亚像素边缘检测的都可以。帮帮忙!我这有基于小波的,谁能给改成基于小波的图像亚像素边缘检测,发我邮箱:410...
求助亚像素边缘检测的程序
本人急需亚像素边缘检测算法的程序,只要是亚像素边缘检测的都可以。帮帮忙! 我这有基于小波的, 谁能给改成基于小波的图像亚像素边缘检测,发我邮箱:410756340@qq.com
%装载并显示原始图像
load bust;
%加入含噪
init=2055615866;
randn('seed',init);
X1=X+20*randn(size(X));
subplot(221);image(X1);
%colormap(map);
title('原始图像');axis square;
%用小波db4对图像X进行一层小波包分解
T=wpdec2(X1,1,'db4');
%重构图像近似部分
A=wprcoef(T,[1 0]);
subplot(222);image(A);
title('图像的近似部分');
axis square;
%边缘检测
%%原图像的边缘检测
BW1 = edge(A,'sobel');
subplot(223);imshow(BW1);
title('原图像的边缘');
axis square;
%图像近似部分的边缘检测
BW2= edge(X1,'sobel');
subplot(224);imshow(BW2);
title('图像近似部分的边缘');
axis square;
做出来追加100分
做出来追加100分
哥您是会做 专家级的??我是看不懂 对不对 您给个准信 行吗???????谢谢了 展开
本人急需亚像素边缘检测算法的程序,只要是亚像素边缘检测的都可以。帮帮忙! 我这有基于小波的, 谁能给改成基于小波的图像亚像素边缘检测,发我邮箱:410756340@qq.com
%装载并显示原始图像
load bust;
%加入含噪
init=2055615866;
randn('seed',init);
X1=X+20*randn(size(X));
subplot(221);image(X1);
%colormap(map);
title('原始图像');axis square;
%用小波db4对图像X进行一层小波包分解
T=wpdec2(X1,1,'db4');
%重构图像近似部分
A=wprcoef(T,[1 0]);
subplot(222);image(A);
title('图像的近似部分');
axis square;
%边缘检测
%%原图像的边缘检测
BW1 = edge(A,'sobel');
subplot(223);imshow(BW1);
title('原图像的边缘');
axis square;
%图像近似部分的边缘检测
BW2= edge(X1,'sobel');
subplot(224);imshow(BW2);
title('图像近似部分的边缘');
axis square;
做出来追加100分
做出来追加100分
哥您是会做 专家级的??我是看不懂 对不对 您给个准信 行吗???????谢谢了 展开
1个回答
展开全部
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);
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);
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
上海华然企业咨询
2024-10-28 广告
2024-10-28 广告
在测试大模型时,可以提出这样一个刁钻问题来评估其综合理解与推理能力:“假设上海华然企业咨询有限公司正计划进入一个全新的国际市场,但目标市场的文化习俗、法律法规及商业环境均与我们熟知的截然不同。请在不直接参考任何外部数据的情况下,构想一套初步...
点击进入详情页
本回答由上海华然企业咨询提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询