18 Jan 2022
In a scene, there are many rays of light coming from many different directions. If we attempt to capture all of the rays, we will end up with a superposition of rays from many different points in the scene for each point on the sensor. This superposition results in a blurry image.
One way around this is to block off some of the light, i.e. we let some light in through a pinhole and block all other incoming rays.
The opening in this barrier is called the aperature. In the pinhole model,
Notice in the illustration that the ray from the top of the scene ends up at the bottom of the sensor, and the bottom ray at the top. The pinhole camera captures an inverted view of the world.
What would happen to:
Using similar triangles, we can compute the change in projected object height,
Therefore, if we were to double the image distance we would double the projected height.
In the image above, suppose we were to translate the sensor such that it lies units away from the COP and kept the sensor size the same. Assuming that at units away, we captured unit of light, then what happens at ?
Keep in mind that the illustration above is a 1D representation, the sensor in actuality is a 2D square.
Therefore, the amount of light captured at is a quarter of that at .
The camera takes in a 3D scene and transforms it into a 2D image. In this reduction, we lose:
Using the following 1D representation,
we can derive as follows:
has the same relationship to as to i.e.:
Finally, perspective transformation from to is given by
This is also called parallel projection, here we simply drop the coordinate,
This is typically used in technical drawings and computer aided design (CAD). Unlike perspective projection, the length of lines can be trusted in orthographic.
We can reduce blurriness in an image by reducing the aperature size, however, this is not always practical as it also reduces the amount of light hitting the sensor. To get around the reduced light, we can increase the exposure time; this is not without caveat, as this can introduce motion blur. Finally, we can also get banding from diffraction effects with a small enough aperature. For these reasons, we instead use lenses.
With lenses, there is a specific distance at which objects are in focus. Other points project into a circle of confusion on the sensor.
Ideally, we want to have the focal plane on the object, thus reducing the size of the circle of confusion. In the above illustration, we achieve this by moving the sensor closer to the lens.
If we want to focus at infinity, we need to move the sensor to be the focal distance away from the lens.
Focal Length
The focal length is defined to be the distance between the sensor and the lens when focused at infinity.
At the focal length, all parallel lines converge to the same point.
In the above image,
The thickness of the lens is negligible in comparison to the curvature radii. For well-behaved lenses, we can simplify the geometrical optics:
For every image plane there is a focal plane. For all ray originating from the same point on the focal plane, they converge to a single point on the image plane.
Assuming that we have a thin lens, we can find a formula for the relation between the image, object, and focal distances.
Using similar triangles from the above illustration, we get the relation
Then, with some algebraic steps:
We get the relation,
At Infinity
If , or we want to focus at infinity:
The Impossible
Sps. and and we want to have a focal plane close to the camera.
Notice that this implies which is absurd; i.e. there exists a minimum focusable distance.
The depth of field (DoF) is a region for which objects appear to be focused in the image.
We can increase DoF by reducing the size of the aperature, the DoF is directly proportional to the aperature diameter; i.e. increasing DoF by 2 corresponds to a decrease of diameter by 2.
Again, using similar triangles:
Finally, we can note that the depth of field is directly proportional to the focusing distance, i.e. if we focusing distance by 3, the DoF decreases by a factor of 3 as well.
Aperature
The aperature is the lens opening, which is controlled by the diaphram.
Typically, the diameter of the aperature is expressed as a fraction of the focal length.
Going from f/2.0 to f/4.0 causes the area to be divided by 4.
Typical F-numbers:
Each increase in F-number in the above sequence roughly correlates to a halving of the aperature area.
Field of View
The field of view (FoV) is defined to be the angle of which the camera is able to see the world.
FoV depends on two factors,
We can find the relation between FoV, focal distance and sensor size as follows:
Modern phone and DSLR cameras have similar FoV, but phones have considerably smaller sensors and focal distances.
Notice the fraction inside the arctangent, in cameras the smaller focal distances cancels out the effect of the smaller sensors which yields in a similar FoV to DSLRs.
(todo: add picture)
Vertigo
In the movie Vertigo, they extensively used the dolly zoom effect in which the subject remains the same size but the background appears to be moving away.
This is achieved by increasing focal length and simultaneously moving away from the subject.
Exposure
Exposure is the amount of light that hits the sensor, affected by shutter speed and aperature size.
Exposure can be approximated by shutter time times lens area.
Shutter Speed
The shutter speed controls how long the sensor is exposed, nearly a linear effect on exposure.
Typically, we use the following shutter times:
Each stop corresponds to a halving or doubling of light that hits the sensor.
To increase by one stop, we can either increase the aperature by 2 or shutter speed by 2.
As a rule of thumb, the limit of the shutter speed is inversely proportional to the focal length, i.e. 1/500s for focal length of 500mm.
Global shutters take a snapshot of the entire scene at a single moment in time, these cameras are very rare.
Rolling shutters progressively scans the scene either vertically or horizontally.
(todo: add other notes on image formation and quantisation)