I want to apply DWT2 of Matlab with db4-20. What I get is that Subbands are not the exact halves of 2^n image. For example if the image is 1024x1024 then the Subbands are of size 515x515 for db4 and increases with each higher dbX.
"Let sx = size(X) and lf = the length of filters; then size(cA) = size(cH) = size(cV) = size(cD) = sa where sa = ceil(sx/2), if the DWT extension mode is set to periodization. For the other extension modes, sa = floor((sx+lf-1)/2)."
So you will only get subband images of half size if you set the extension mode to perdiodic:
will yield 512x512 subband images if X is 1024x1024.
You can also use dwtmode(..) to set the mode statically, but watch out it's documentation, its 'per' for periodic, not 'ppd' as written in my R2011b documentation..
Why exactly this behaviour is the case, I can't tell..