function PROC_RecordWaveletPyramid(img,options);
%function PROC_RecordWaveletPyramid(img,options);
%
%

D.FileName = 'NoNameGiven';
D.ScaleRatio = 1.2;
D.SaveRoot = pwd;
D.MaxNScales = 16;
D.MinSize = [128 64];

if(nargin < 2), options = [];, end
options = ResolveMissingOptions(options,D);

cImgPyr{1} = img;
i = 1;
while ((i < options.MaxNScales)  &&  (all(size(cImgPyr{i}) > options.MinSize)));
  sz = size(cImgPyr{i});
  sz = floor(sz / options.ScaleRatio);
  if(any(sz < options.MinSize)), break;, end
  cImgPyr{i+1} = imresize(cImgPyr{i},sz);
  i = i+1;
end
savename = fullfile(options.SaveRoot, [options.FileName, '.mat']);
save(savename,'cImgPyr');
