<p>Aerial images constitute an important data source for geoinformation systems. With the goal of getting actual data at reasonable costs, the development of (semi)automatic tools has been an active research topic in photogrammetry and image processing in recent years. Based on established techniques for low-level syntactic operators such as filters, feature extraction, line detectors, and simple pattern matchers, explicit models are needed to better identify semantically meaningful objects. From the pixel to the object level, these models apply several representation formalisms, such as graphs of extracted image features, aspect graphs, and constructive solid geometry. Constraint logic programming (CLP) is an adequate representation formalism and implementation language for building the necessary experimental environment, specifying the models on the different levels, expressing strong heuristics, and approaching the complex search problem involved in object detection. This article focuses on the detection of buildings. The authors discuss model representation by CLP program fragments and the required adaptation and extensions of the finite-domain constraint solver of Eclipse, the Prolog/CLP platform underlying their implementation.</p> <p>The authors give special emphasis to handling uncertainty and unobservability of building parts by a combination of constraint relaxation and variable elimination. Illustrating examples show how CLP techniques address problems that arise in the detection of buildings.</p>