KNOWLEDGE-BASED CONTEXTUAL RECOGNITION AND SIEVING OF DIGITAL IMAGES