Why do all lenses, including the one in the human eye, flip an image upside-down? Or do they? It's far easier to understand than you might think.
Light is reflecting off of objects all around us, and although we are used to seeing diagrams with light being represented as a line, it's a bit misleading.
Light Rays Rarely Reflect in a Single Direction
If you shined a laser pointer at a mirror, you might draw it as a simple straight line because a straight beam of light is being emitted from a pointer and reflected off of the mirror, but the sun isn't a laser pointer, and most objects don't create perfect reflections; they scatter the light in all directions. If you shine a laser pointer at a tennis ball, you would be able to see the point of light from anywhere on this side of the ball because the light is radiating out in all directions.
Why Are Lenses Necessary?
Everyone knows that cameras require a lens to focus the light, but let's take a look at why. If you had a camera sensor or a piece of film without a lens, it would be picking up light rays from all directions. Every part of every object in the sensor's field of view would be shining light on the sensor at the same time. The sensor would be receiving a lot of light, but every pixel would have an almost identical reading.
How Pinhole Cameras Work
Pinhole cameras work without any lens, but their images are still flipped. They work by blocking the majority of the light rays that would be hitting the sensor from every angle and instead only allow the rays to enter from a single point. The waves of light being emitted from the top of an object will be blocked from hitting the top of the sensor, but will hit the bottom of the sensor. The waves being emitted from the bottom of your scene will be blocked from the bottom of your sensor, but will hit the top. And remember that these diagrams are all drawn in two dimensions, but this is happening in three dimensions: up, down, front, back, left, and right.
Another Way To Understand How Light Enters a Camera
If you're still having trouble understanding this, imagine you were looking through a peephole in a door and you wanted to see the ceiling on the other side of the door; you would have to crouch down and look up to see it because the light rays from the ceiling would be blocked from your eye. To see down, you would have to move to a higher position. To see left, you would need to move right, and to see right, you would need to move left.
Why Lenses Are Better Than Pinhole Cameras
Pinhole cameras don't allow very much light to enter the camera, and they don't produce very sharp images because they aren't focusing the light rays, they are simply blocking the majority of them. To focus the light rays, we can use a lens to accept many more light rays and focus them down onto a sensor. This creates a brighter, sharper image, but doesn't change the fact that light rays coming from above the lens are beaming onto the bottom of our sensors, and light rays coming from the bottom of our scene are shining on the top.
Lenses themselves are not flipping images upside down. Light rays bouncing off of objects in the upper portion of a scene will be blocked by the camera or lens housing (in the case of a pinhole camera) or focused (in the case of a lens) and only hit the bottom of the sensor, film, or back of our eye.