function im=loadobjectimages(number,index,scale)

basedir='~c340/web_docs/labs/labAssign2/images/objects';

if(exist('scale'))
  for(i=1:length(index))
   im(:,:,i)=imresize(imread(sprintf('%s/%d/%.4d.tif',basedir,number,index(i))),scale,'nearest');
  end;
else
  for(i=1:length(index))
   im(:,:,i)=imread(sprintf('%s/%d/%.4d.tif',basedir,number,index(i)));
  end;
end

im=double(im)/255;
