% Load data structures saved with 'SavePicset.m' % % Inputs: filename- filename % % Outputs: N - number of images % width - width of each image % height - height of each image % lbl - image labels % picset - matrix of images (one image per column) in % 8-bit format. % clear N lbl width height picset global picset; tic fid=fopen(filename,'r','b'); N =fread(fid,1,'int32'); lbl =fread(fid,N,'int32'); width =fread(fid,1,'int32'); height =fread(fid,1,'int32'); disp(sprintf('Loading %s with %d %dx%d pictures',filename,N,width,height)) picset =fread(fid,[width*height,N],'uchar'); fclose(fid); disp(sprintf(' done... (%d sec)',round(toc)))