hello everyone i'm doing a project on image watermarking. According to my algorithm i've to select sub-blocks from LH and HL sub-bands of an image. Is this possible? I have a 512*512 grayscale image and need to select 64*64 sub-blocks from the LH and HL sub-bands of the image. thanks in advance!

댓글 수: 1

the cyclist
the cyclist 2012년 2월 15일
I suggest you give your question a more meaningful title.

댓글을 달려면 로그인하십시오.

 채택된 답변

Wayne King
Wayne King 2012년 2월 16일

0 개 추천

Hi Alma, Yes you can. It is not clear from your question whether you want to select 64x64 blocks from the first level details, or whether you want to decompose the image until you get to level 3.
dwtmode('per');
load woman;
% level 1
[C,S] = wavedec2(X,3,'bior3.5');
[H,V,D] = detcoef2('all',C,S,1);
Now you can select blocks from H and V.
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)
Or
[H,V,D] = detcoef2('all',C,S,3);
If you want them from level 3.

댓글 수: 5

Alma o.a
Alma o.a 2012년 2월 18일
After the comment'level 1' you have given the level number as 3 in the syntax of wavedec2.Please clarify.
Wayne King
Wayne King 2012년 2월 18일
Because as I wrote in my post, it was not clear to me when you said 64x64, whether you wanted the level 3 detail coefficients, or you simply wanted to select 64x64 blocks from the level 1 coefficients.
Since I was not sure, I went ahead and decomposed the image down to level 3 (no harm in doing that)
Alma o.a
Alma o.a 2012년 2월 19일
thank you
Alma o.a
Alma o.a 2012년 2월 20일
i have changed the coefficients according to my algorithm. now i want to take the idwt so that i'll get the image with the changed dwt coefficients. can i directly use the function wavedec2?
Wayne King
Wayne King 2012년 2월 20일
Hi Alma, you want to use waverec2

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

제품

질문:

2012년 2월 15일

편집:

2013년 10월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by