matlab 小波变换

[C,L]=wavedec(X,N,'wname');%利用小波'wname'对信号X进行N层分解
[cA,cH,cV,cD]=dwt2(X,'wname');%使用小波'wname'对信号X进行单层分解,求得的近似系数存放在数组cA中,细节系数存放在数组cH,cV,cD中

那么问题来了

% Do the DWT
cwA = cell(1,nLevel);                 %Approximation coefficients
cwH = cell(1,nLevel);                 % Horizontal detail coefficients
cwV = cell(1,nLevel);                 % Vertical detail coefficients
cwD = cell(1,nLevel);                 % Diagonal detail coefficients    

for iLevel = 1:nLevel

    [cwA{iLevel},cwH{iLevel},cwV{iLevel},cwD{iLevel}] = dwt2(myImage, 'haar');
    myImage = cwA{iLevel};

end

利用循环,dwt2是不是就实现了wavedec多层分解的功能了呢?

你可能感兴趣的:(matlab,小波变换)