資源簡介
小波變換的一層、二層、三層分解,很好的資源
代碼片段和文件信息
clc;clear;close?all
x?=?imread(‘D:\Program?Files\MATLAB\R2010a\chengxu\1.jpg‘);
J=rgb2gray(x);
I=imcrop(J[41?0?255?255]);
%subplot(221);
subplot(221)imshow(I[]‘InitialMagnification‘100);
title(‘原始載體圖像---K=2‘)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%圖像的三級小波分解?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[cs]=wavedec2(double(I)3‘db1‘);
ca3?=?appcoef2(cs‘db1‘3);
ch3?=?detcoef2(‘h‘cs3);
cv3?=?detcoef2(‘v‘cs3);
cd3?=?detcoef2(‘d‘cs3);
ch2?=?detcoef2(‘h‘cs2);
cv2?=?detcoef2(‘v‘cs2);
cd2?=?detcoef2(‘d‘cs2);
ch1?=?d
評論
共有 條評論