This is an image from Richard Wiseman’s Quirky Mind Stuff. It’s an example of “the Ponzo Illusion”, where the images of all of these cars are the same size.
The ‘mechanics’ behind this illusion is that the brain sees the world in something that is sometimes called “2½D”, that is, 2D plus depth.
The two eyes send a pair of 2D image to the brain. From that, the brain constructs a 2½D model of the visual field. What we see is not light, but rather surfaces that are oriented in 3-space with depth.
The reason our visual perception would not be called full 3D is because we cannot see behind objects or inside their interiors, so we do not have full access to the 3D information in front of us. We only can see those 2D surfaces that are not covered (occluded) by something else.
We can also reason about 3D objects which we can hold and manipulate in our hands. However from the perspective of our brain, these are something approximating 2D surfaces wrapped around a sphere with indentations and protrusions. As we rotate the object in our hand, we are only able to see its visible surfaces. the more complex the object, the more difficult it is for us to reason about what we are seeing.
Scientists are still learning about how the 3D world is modeled and processed by the brain, so this is just a simplification based on what is known.
One of the explanations for the Ponzo illusion is the “perspective hypothesis“, which states that the perspective feature in the figure is obviously produced by the converging lines ordinarily associated with distance, that is, the two oblique lines appear to converge toward the horizon or a vanishing point. Another is the “framing-effects hypothesis“, which says that the difference in the separation or gap of the horizontal lines from the framing converging lines may determine, or at least contribute to the magnitude of the distortion.