如图,使用matlab编程实现小波变换对一幅图像进行处理,从而得出4个座标图。
2个回答
展开全部
A = imread('image.bmp');
B = A(:,:,1);
[lowf,highfH,highfV,highfD,C,S] = wavelet2D(double(B),'morlet',2);
function[lowf,highH,highV,highD,C,S] = wavelet2D(signal,wavelet,level)
[C,S]=wavedec2(signal,level,wavelet);
lowf = appcoef2(C,S,wavelet,level);
highH=detcoef2('h',C,S,level);
highV=detcoef2('v',C,S,level);
highD=detcoef2('d',C,S,level);
A = wrcoef2('a',C,S,wavelet,level);
Dh =wrcoef2('h',C,S,wavelet,level);
Dv =wrcoef2('v',C,S,wavelet,level);
Dd =wrcoef2('d',C,S,wavelet,level);
subplot(2,2,1),image(A);
subplot(2,2,2),imshow(Dh);
subplot(2,2,3),imshow(Dv);
subplot(2,2,4),imshow(Dd);
B = A(:,:,1);
[lowf,highfH,highfV,highfD,C,S] = wavelet2D(double(B),'morlet',2);
function[lowf,highH,highV,highD,C,S] = wavelet2D(signal,wavelet,level)
[C,S]=wavedec2(signal,level,wavelet);
lowf = appcoef2(C,S,wavelet,level);
highH=detcoef2('h',C,S,level);
highV=detcoef2('v',C,S,level);
highD=detcoef2('d',C,S,level);
A = wrcoef2('a',C,S,wavelet,level);
Dh =wrcoef2('h',C,S,wavelet,level);
Dv =wrcoef2('v',C,S,wavelet,level);
Dd =wrcoef2('d',C,S,wavelet,level);
subplot(2,2,1),image(A);
subplot(2,2,2),imshow(Dh);
subplot(2,2,3),imshow(Dv);
subplot(2,2,4),imshow(Dd);
更多追问追答
追问
程序试过了吗,
追答
小波变换你明白什么意思吗?
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
A = imread('image.bmp');
subplot(2,2,1);
imshow (A);
hold on;
[C, S]=wavedec2(A, 5, 'db3' );
subplot(2,2,2);
plot (C);
title('wavelet coeffs' );
hold on;
zoom on;
zoom off;
B=sort(C, 2, 'descend' );
subplot(2,2,3);
plot (B);
title('(sorted)');
hold on;
D=log10(B);
subplot(2,2,4);
plot (D);
title('(log10(sorted))');
hold on;
subplot(2,2,1);
imshow (A);
hold on;
[C, S]=wavedec2(A, 5, 'db3' );
subplot(2,2,2);
plot (C);
title('wavelet coeffs' );
hold on;
zoom on;
zoom off;
B=sort(C, 2, 'descend' );
subplot(2,2,3);
plot (B);
title('(sorted)');
hold on;
D=log10(B);
subplot(2,2,4);
plot (D);
title('(log10(sorted))');
hold on;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询