<p>The authors investigate the use of a priori knowledge about a scene to coordinate and control bilevel image segmentation, interpretation, and shape inspection of different objects in the scene. The approach is composed of two main steps. The first step consists of proper segmentation and labeling of individual regions in the image for subsequent ease in interpretation. General as well as scene-specific knowledge is used to improve the segmentation and interpretation processes. Once every region in the image has been identified, the second step proceeds by testing different regions to ensure they meet the design requirements, which are formalized by a set of rules. Morphological techniques are used to extract certain features from the previously processed image for rule verification purposes. As a specific example, results for detecting defects in printed circuit boards are presented.</p>