1. A computer-implemented method for determining whether an image is an image of a particular person, the method comprising: receiving an input image; computing a plurality of local patterns of the input image, each local pattern corresponding to a different pixel neighborhood of a different pixel in the input image, wherein when computing a local pattern for a neighborhood, pixels in the neighborhood are analyzed to determine if they match previously selected local patterns, and when a pixel is determined to not match any of the previously selected local patterns, computation of the local pattern is terminated; and using counts of the local patterns as features of a learning algorithm to determine whether or not the image is an image of the person.