Automatic interpretation and classification of images