1. A computer implemented method for extracting an integral histogram from sampled data, comprising: acquiring a set of samples from a real-word signal; scanning the set of samples in a predetermined order; and constructing, for each current sample, an integral histogram, the integral histogram integrating a histogram of the current sample and the integral histograms of previously scanned samples.