function [allmaxed] = initialmax(I, allfilter);

nimage = size(I, 2);    % number of training images
norient = size(allfilter, 2);     % number of orientations
allmaxed = cell(nimage, norient);  % filtered images
for i = 1 : nimage
   [sx, sy] = size(I{i});  % size of images
   for o = 1 : norient
       allmaxed{i, o} = zeros(sx, sy); 
   end
end

    

