필터 지우기
필터 지우기

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 CenterFile Exchange에서 Discrete Multiresolution Analysis에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by