1. A method for representing a class of objects, comprising: acquiring a set of positive training images of a class of objects; constructing a matrix A from the set of positive training images, each row in the matrix A corresponding to a vector of intensities of pixels of one positive training image; grouping correlated intensities into a set of segments of a feature mask image, each segment including a set of pixels with correlated intensities; selecting, from each segment, a subset of representative pixels; and assigning a set of features to each pixel in each subset of representative pixels of each segment of the feature mask image to represent the class of objects.