We present a computational framework for analysing data on the spatial integration of surface brightness. Our framework builds on the hypothesis, originating in Retinex theory, that brightness is computed by integrating induction signals generated at edges (log luminance ratios) in a scene. The model of Rudd and Arrington (2001 Vision Research 41 3649 - 3662) generalises Retinex theory by characterising how neighbouring edges can interact to partially block the flow of induction signals from one another. We show that both the Rudd-Arrington model and Retinex theory are special cases of a broader class of models in which opposite-polarity edges are parsed into separate half-wave rectified channels before spatial integration. Each model incorporates different polarity-specific constraints on the interactions between neighbouring edges. We fit these models to psychophysical data on spatial brightness integration (Hong and Shevell 2004 Visual Neuroscience 21 353 - 357; Hong and Shevell 2004 Vision Research 44 35 - 43), comparing performance using a statistical technique for quantifying goodness-of-fit relative to the number of model parameters. We find that a model which strongly impedes the flow of induction signals across neighbouring edges of the same polarity, but does not restrict or weakly restricts flow across edges of opposite polarity, is most likely to be correct. Our results are at odds with published variants of the filling-in theory of brightness perception, which predict either unrestricted flow across edges of the same polarity or no flow at all. The framework can also be used to quantitatively assess models of colour perception, where putative polarity-specific interactions can be defined in terms of cone-specific contrasts, as implied by Retinex theory, or cone-opponent contrasts.