B = SAVEDATAFILE(A,FEATSIZE,NAME,NBITS,FILESIZE)
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 = PRDATAFILE(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 as compact 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.