A long-standing puzzle in visual perception is that the apparent extent of a spatial interval (e.g., the distance between two points or the length of a line) does not simply accord with the length of the stimulus but varies as a function of orientation in the retinal image. Here, we show that this anomaly can be explained by the statistical relationship between the length of retinal projections and the length of their real-world sources. Using a laser range scanner, we acquired a database of natural images that included the three-dimensional location of every point in the scenes. An analysis of these range images showed that the average length of a physical interval in three-dimensional space changes systematically as a function of the orientation of the corresponding interval in the projected image, the variation being in good agreement with perceived length. This evidence implies that the perception of visual space is determined by the probability distribution of the possible real-world sources of retinal images.A s the orientation of a linear stimulus in the retinal image changes, so does its apparent length. Thus, a line that projects vertically appears to be longer than the same line presented horizontally, the maximum length being seen when the stimulus is oriented 20-30°from the vertical axis (refs. 1-4; Fig. 1). This variation is evidently a particular manifestation of the general tendency to perceive the extent of any spatial interval differently as a function of its orientation in the retinal image. For instance, the apparent distance between a pair of dots varies systematically with the orientation of the imaginary line between them (5), and a perfect square or circle appears to be slightly elongated along its vertical axis (6, 7). Despite extensive study of these phenomena during the past 150 years (8-19), neither a quantitative explanation of these effects nor a generally accepted biological rationale has been forthcoming.The explanation we have examined here is that the variable perception of length as a function of stimulus orientation represents a solution to the problem presented by the inevitable ambiguity of retinal projections, namely that retinal images cannot uniquely specify their physical sources (20). Thus, a given line in the retinal image could have been generated by an infinite number of real-world objects with different lengths, located at different distances and in different 3D orientations. The physical source of a retinal stimulus nonetheless is what the observer must respond to with appropriate visually guided behavior. One solution to this dilemma would be to generate percepts according to the probability distribution of the possible physical sources of the retinal stimulus. To test this hypothesis with respect to the perception of visual space, the arrangement of objects in the physical world must be related to their projected images. Accordingly, we used a laser range scanner (21, 22) to acquire a database of natural scenes that included the location in 3D space of every pixe...