Introduction to Computer Vision
Image Formation
How a Camera Sees the World
Before a computer can “see” an image, that image has to be created. This process starts with light. Light travels from a source, like the sun, bounces off objects in the world, and some of it streams into a camera. For our purposes, we can think of light as traveling in straight lines, called rays.
The simplest way to form an image is to let these rays pass through a tiny opening and project them onto a surface. This is the principle behind a camera obscura, or pinhole camera. It creates a naturally focused, but inverted, image of the outside world. This simple model is the foundation for understanding how all cameras, from your phone to a high-end DSLR, fundamentally work.
The Pinhole Model
To work with images computationally, we need a mathematical model. The pinhole camera model provides a simple geometric description of how a 3D scene is projected onto a 2D image. Imagine a box with a tiny hole (the aperture) on one side and a light-sensitive sensor (the image plane) on the opposite side. A ray of light from a point in the 3D world travels through the aperture and strikes a single point on the image plane.
The geometry of this setup can be described using similar triangles. The relationship between a 3D point's coordinates in the world and its projected 2D coordinates on the image plane is defined by the camera's focal length, .
The inversion is a real physical phenomenon, but for computational convenience, we often imagine a "virtual" image plane in front of the pinhole at a distance . This gets rid of the negative sign in the equations, making the math a bit cleaner while representing the same geometric projection.
Lenses and Light
A pinhole creates a perfectly focused image, but it lets in very little light, making the image dim. To capture brighter images, we need to gather more light. This is where lenses come in. A lens is a piece of curved glass that can bend light rays, converging them to a single point of focus.
Unlike a pinhole which has an infinite depth of field (everything is in focus), a lens can only perfectly focus objects at a specific distance. The relationship between the object distance, the image distance, and the focal length of a simple, ideal lens is described by the thin lens equation.
Measuring Light
Once light is focused onto the sensor, we need to measure it. The image sensor in a digital camera is a grid of millions of tiny light-sensitive elements called photosites. Each photosite measures the amount of light that hits it and converts that measurement into a digital value. This process is the domain of radiometry and photometry.
Radiometry
noun
The science of measuring electromagnetic radiation, including visible light, in terms of absolute power.
In simple terms, radiometry deals with the physics of light energy. Key quantities include:
- Radiant Flux (): The total energy radiated from a source per unit time, measured in watts (W).
- Irradiance (): The radiant flux received by a surface per unit area, measured in W/m². This is what the camera sensor measures—how much light power falls on each pixel.
- Radiance (): The radiant flux emitted or reflected by a point on a surface in a particular direction. This describes how bright a surface appears. An image is essentially a 2D map of the radiance of the scene from the camera's viewpoint.
The value of a pixel in a digital image corresponds to the irradiance at that point on the sensor, which is directly related to the radiance of the corresponding point in the scene.
Finally, to capture color, camera sensors use a color filter array. The most common is the Bayer filter, which places a red, green, or blue filter over each photosite, making it sensitive to only that color. The camera's processor then interpolates these values to create a full-color image. These fundamental principles of light, optics, and measurement are the building blocks of every image a computer vision system analyzes.
What is a key characteristic of an image formed by a simple pinhole camera (camera obscura)?
What is the primary advantage of using a lens instead of a pinhole in a camera?
These concepts form the physical and mathematical basis for how digital images are created.

