1. A method for classifying an image, comprising the steps that a computer or several interconnected computers are caused to: a) store, in the form of a pixel set, in which each pixel is associated with image information in at least one channel for light intensity, a first image to be classified onto a digital storage medium; b) carry out a first classification of the image, said first classification being based upon the image information of each respective pixel of the pixel set, said first classification creating a first association for each pixel of the pixel set with a certain class of a first set of classes, each of said first associations being stored in a first database; c) for each pixel of the image, determining a closest other pixel that has an association with a particular class of the first set of classes, and calculating a distance between said each pixel and the closest other pixel, said steps of determining and calculating performed for at least two classes of the first set of classes, thereby to store in a second database, for each said pixel, a set of distance data associated with each class of the at least two classes of the first set of classes; d) carry out a second classification on the data in the second database, said second classification using, for each pixel stored in the second database, the corresponding smallest distance data for each respective class of the first set of classes recorded in the second database as coordinates in a multi-dimensional feature space, thereby to create a second association for each pixel to a certain class in a second set of classes based upon the smallest distance data of the second database; and e) store a classified image in the form of a set of pixels onto a digital storage medium, where each pixel comprises data regarding the association of the pixel to the certain class in the second set of classes, and where the classified image has the same dimensions as the first image.