A similarity measurement method for the classification of architecturally differentiated image sections is described. The strength of the method is demonstrated by performing the complex task of assigning severity grading (Gleason grading) to histological slides of prostate cancer. As shown, all that is required to employ the method is a small set of preclassified images. The images can be real world images acquired by means of a camera, computer tomography, etc., or schematic drawings representing samples of different classes. The schematic option allows a quick test of the method for a particular classification problem.