We propose a compositionality architecture for perceptual organization which establishes a novel, generic, algorithmic framework for feature binding and condensation of semanticemm information in images. The underlying algorithmic ideas require a hierarchical structure for various types of objects and their groupings, which are guided by gestalt laws from psychology. A rich set of predefined feature detectors with uncertainty that perform real-valued measurements of relationships between objects can be combined in this flexible Bayesian framework. Compositions are inferred by minimizing the negative posterior grouping probability. The model structure is founded on the fundamental perceptual law of Prägnanz. The grouping algorithm performs hierarchical agglomerative clustering and it is rendered computationally feasible by visual pop-out. Evaluation on the edgel grouping task confirms the robustness of the architecture and its applicability to grouping in various visual scenarios.