フィルターのクリア

help with matlab code

3 ビュー (過去 30 日間)
Alma o.a
Alma o.a 2012 年 2 月 7 日
編集済み: sixwwwwww 2013 年 10 月 13 日
hi everyone i'm very much new to matlab and need help. I have a 512*512 grayscale image. I need to find the second level dwt coefficients first and then need to find the standard deviation of the second level mid frequency coefficients.
i=imread('file.extension');
[c s]=wavedec2(i,2,'haar');
k=std(c);
is this code correct?

採用された回答

Wayne King
Wayne King 2012 年 2 月 7 日
Then from the line I gave you:
[H,V,D] = detcoef2('all',C,S,2);
std(reshape(V,size(V,1)*size(V,2),1))
std(reshape(H,size(H,1)*size(H,2),1))
  1 件のコメント
Alma o.a
Alma o.a 2012 年 2 月 15 日
Thanks a lot wayne..That helped!!!!

サインインしてコメントする。

その他の回答 (1 件)

Wayne King
Wayne King 2012 年 2 月 7 日
Hi Alma, You don't want std(c) because that gives you the standard deviation of all the wavelet and approximation coefficients.
You want:
x = randn(16,16);
[C,S] = wavedec2(x,2,'haar');
[H,V,D] = detcoef2('all',C,S,2);
Now you have to be clear on which wavelet coefficients you want the standard deviation of. I'm not clear on what you mean by "second level mid frequency" Do you mean highpass filtering followed by lowpass, or lowpass followed by highpass?
The diagonal details are obtained by highpass filtering the rows (followed by downsampling) and then highpass filtering the columns followed by downsampling.
The vertical details are obtained by highpass filtering the rows followed by lowpass filtering the columns. (with downsampling)
The horizontal details are obtained by lowpass filtering the rows and highpass filtering the columns (with downsampling)
  1 件のコメント
Alma o.a
Alma o.a 2012 年 2 月 7 日
hi wayne
i need to find the standard deviation of horizontal and vertical coefficients.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDiscrete Multiresolution Analysis についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by