Clear Filters
Clear Filters

help with dwt

2 views (last 30 days)
Alma o.a
Alma o.a on 15 Feb 2012
Edited: Azzi Abdelmalek on 17 Oct 2013
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 Comment
the cyclist
the cyclist on 15 Feb 2012
I suggest you give your question a more meaningful title.

Sign in to comment.

Accepted Answer

Wayne King
Wayne King on 16 Feb 2012
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 Comments
Alma o.a
Alma o.a on 20 Feb 2012
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 on 20 Feb 2012
Hi Alma, you want to use waverec2

Sign in to comment.

More Answers (0)

Categories

Find more on Discrete Multiresolution Analysis in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!