PRTools contents

PRTools manual

histm

HISTM

Histogramming: mapping of dataset (datafile) to histogram

    W = HISTM(A,N)
    W = A*HISTM([],N)
    C = B*W

    C = HISTM(B,X)
    C = B*HISTM([],X)

Input
 A Dataset or datafile for defining histogram bins (training)
 N Scalar defining number of histogram bins (default 10)
 B Dataset or datafile to be transformed into a histogram with  predifined bins.
 X User defined histogram bins (centers)

Output
 C Dataset or datafile with histogram bin frequencies

Description

For every object in the dataset B the set of feature values is mapped  into a histogram, specifying for each bin the number of features having a  value as specified for that bin. This is particular useful if the objects  are images and the features are pixels. In that case for every image a  histogram is found.

The dataset A may be used to find the proper histogram bins. In that case  histograms with N bins are constructed between the minimum and maximum  values over all objects in A.

Formally HISTM([],N) is an untrained mapping, to be trained by A as the  dataset (datafile) A is used to determine the histogram bin centers.  In case the bins are given like in HISTM(B,X) then we have a trained mapping.  Consequently, if A is a datafile then in C = A*HISTM(A,10) all objects in  A are processed twice. Once for determining the bin positions and once for  filling them. If appropriate a command like C = A*HISTM(A(1,:),10) is  thereby significantly faster, as it determines the bin positions by just  a single object.

See also

datasets, datafiles, mappings, hist,

PRTools contents

PRTools manual