Does dddtree always generate varying number of coefficients?

Hi all,
I have been working dddtree() function in MATLAB. I extract coefficients for 25 images for level =6. The code is as follows:
for i=1:1:trainInf
I = imread(strcat(infDir,'\infectedtrain',num2str(i),'.jpg')); %read image
I= rgb2gray(I);
I = reshape(I',1,size(I,1)*size(I,2)); %convert to vector
I = [I,zeros(1,2^L - rem(length(I),2^L))]; % pad zeros to make the dimension of image a multiple of 2^L as required by dddtree
I = double(I);
dt1 = dddtree('cplxdt',I,L,'dtf3'); %perform Dual-Treee Complex Wavelet Transform
dt1Cfs = (dt1.cfs{L}(:,:,1)+1i*dt1.cfs{L}(:,:,2)); %extract level 6 coefficients
infCfs.(strcat('infImage',num2str(i))) = dt1Cfs; %store each set in a separate field
mags = abs(dt1Cfs); %get maginutde of all coefficients of current image
phases = angle(dt1Cfs); %get phase of all coefficients of current image
fprintf('Number of coeefificents: %d for image %d\n',length(dt1Cfs),i);
end
As i analyze the infCfs struct variable, each of the fields in it have differing lengths. So, the dddtree() function seems to generate varying number of coefficients of each image at level 6? Is this expected behavior given that my set of 25 images have varying sizes?

Answers (0)

Products

Asked:

on 23 Sep 2015

Community Treasure Hunt

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

Start Hunting!