?? examp16_23.m
字號:
%裝載并顯示原始圖像
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;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -