1. A method for processing images, comprising: receiving a group of the images having similar characteristics, the group comprising multiple classes, such that each image belongs to one of the classes and comprises a fixed portion common to all of the images in the class to which it belongs, and a variable portion, which distinguishes the image from the other images in the class; finding a reference area in the images, in which the fixed portion of the images in a first one of the classes differs consistently from the fixed portion of the images in a second one of the classes; and sorting the images into the classes based on the reference area.