MATLAB: Downsampling image

image processing

hello
i have an original image of size 288×360 ..i need to perform the decomposition of this image into constituent polyphase components of 144×180 frames..
please suggest some way in matlab to do it..
presently i am tring it with gtdecomp command without any success..

Best Answer

Hi, You can use dyaddown() from the Wavelet Toolbox.
x = randn(8,8);
% this gives you 1st row, 1st column, 3rd row, 3rd colum, etc
y = dyaddown(x,'m',1);
% now this gives you 2nd row, 2nd column, etc
y = dyaddown(x,'m',0);
Or you can use downsample() from the Signal Processing Toolbox. This gives you one polyphase matrix.
Y = downsample(x,2,0);
Y = (downsample(Y',2,0))';
This gives you the other:
Y1 = downsample(x,2,1);
Y1 = (downsample(Y1',2,1))';
Hope that helps,
Wayne