PRTools contents

PRTools manual

savedatafile

SAVEDATAFILE

Save datafile

     B = SAVEDATAFILE(A,FEATSIZE,NAME,NBITS,FILESIZE)

Input
 A Datafile, or cell array with datafiles and/or datasets
 FEATSIZE Feature size, i.e. image size of a single object in B Default: as it is.
 NAME Desired name of directory
 NBITS # of bits in case of rescaling (8,16 or 32) Default: no rescaling
 FILESIZE # of elements stored in a single file  Default 10000000.

Output
 B New datafile
  The datafile A is completed by desired preprocessing and postprocessing.  It should therefore be convertable to a dataset. It is saved in the  directory NAME and B refers to it. If desired the data and target fields  are compressed (after appropriate rescaling) to NBITS unsigned integers.  The stored datafile can be retrieved by

      B = DATAFILE(NAME)

B is a 'mature' datafile, i.e. a dataset distributed over a number of  files with maximum size FILESIZE. This has only advantages over a 'raw'  datafile defined for a directory of images in case of substantial pre-  and postprocessing, due to the overhead of the dataset construct of B FEATSIZE can be used to reshape the size of object (e.g. from 256 to  [16 16])

If A is cell array with datafiles and/or datasets, they are first  horizontally concatenated before the datafile is written. The first  element in A should be a datafile.

The difference with CREATEDATAFILE is that SAVEDATAFILE assumes that  the datafile after completion by preprocessing can be converted into a  dataset and the data is stored as such and a sompact as possible.  CREATEDATAFILE saves every object in a separate file and is thereby  useful in case preprocessing does not yield a proper dataset with the  same number of features for every object.

See also

datafiles, datasets, createdatafile,

PRTools contents

PRTools manual