CS180 Project 0: Becoming Friends with Your Camera
Introduction
Understanding basic camera operations and settings is highly relevant (and really cool) for research in computer vision and image processing. This project will help us become familiar with our camera and its settings.
Part1: What is focal length?
Focal length is the distance between the lens and the image sensor when the subject is in focus. It is typically measured in millimeters (mm) and determines the field of view and magnification of the image.
Generally, a longer focal length results in a narrower field of view and greater magnification, while a shorter focal length provides a wider field of view and less magnification.
Part2: Is Changing Focal Length the Same as Simple Zooming?
If we just read the concept of "focal length", we may think that changing focal length is the same as simple zooming in and out. However, they are not the same. In fact, changing the focal length alters the perspective and composition of the image, while zooming simply crops the image without changing the perspective. Here are two interactive demos below to show the special of changing focal length.
Focal-length demonstration: portrait
Focal-length demonstration: landscape
It’s obvious that varying the focal length does more than just zoom in or out. So, what’s the key difference, and what explains it?
In portrait photography, it is evident that when the subject’s size in the frame is held constant, short focal lengths introduce pronounced distortions: the forehead and chin appear unnaturally compressed. At approximately 48 mm, the subject’s proportions appear natural and balanced. In contrast, at very long focal lengths, the face becomes noticeably flattened, with the overall facial structure appearing elongated.
In landscape photography, the choice of focal length also significantly impacts the composition and depth of the image. Wide-angle lenses (e.g., 14mm) capture expansive scenes, allowing photographers to include more of the foreground and sky. On the other hand, telephoto lenses (e.g., 120mm) compress the scene, bringing distant elements closer together and creating a sense of depth.
Part3: The confusing relationship between distortion and focal length
Part3.1: Understanding Perspective Distortion
To clarify the relationship, we need to introduce the concept of perspective.
The principle of perspective can be understood from the lens imaging equation \[ \tfrac{1}{s_i} + \tfrac{1}{s_o} = \tfrac{1}{f} \], where \(s_i\) is the image distance, \(s_o\) is the object distance, and \(f\) is the focal length. The lateral magnification is given by \(M = \tfrac{s_i}{s_o} = \tfrac{f}{s_o - f}\). For objects of finite depth, the axial magnification can be expressed as \(M_{ax} = \tfrac{M^2}{f}\). This shows that when the magnification \(M\) is held constant, using a longer focal length requires increasing the camera-to-subject distance, which decreases axial magnification and makes depth appear shallower. Conversely, with a shorter focal length, the camera must be positioned closer, increasing axial magnification and exaggerating depth.
The effects we previously observed when changing focal length actually arise because, in order to keep the subject the same size in the frame, we must adjust the distance between the camera and the subject. Once the distance changes, the perspective effect changes accordingly. With a short focal-length lens, in order to maintain the same subject size, the camera usually has to move closer to the subject. As a result, facial features such as the nose and chin appear more prominent and exaggerated, and the sense of depth in the scene becomes stronger. In contrast, a long focal-length lens allows the subject to be photographed from a greater distance while keeping its size unchanged. This reduces the exaggeration of facial features, making the contours of the face appear smoother and diminishing the sense of depth in the scene.
Here is another example of the relationship between perspective and the position of the camera.
Part3.2: Above perspective distortion
Except perspective distortion, there are other factors that can contribute to the overall distortion in an image, such as lens distortion.
Lens distortion refers to the optical aberrations introduced by a lens that cause straight lines or geometric shapes in the real world to appear curved or deformed in an image. Unlike perspective distortion, which arises from the relative position of the camera and subject, lens distortion is inherent to the optical design and construction of the lens. The most common types are barrel distortion, where straight lines bow outward; pincushion distortion, where they curve inward; and moustache (or wavy) distortion, which combines both effects. While these distortions are often more pronounced in wide-angle lenses, modern digital imaging pipelines frequently correct them automatically through software calibration and lens profiles.
Part4: The implication of perspective distortion -- Vertigo shot
The Vertigo shot, also known as the Dolly Zoom, is a cinematic technique that creates a surreal visual effect by simultaneously zooming in with the camera lens while physically moving the camera backward (or vice versa). This technique was famously used in Alfred Hitchcock's film "Vertigo" to convey a sense of disorientation and psychological tension.
The key to achieving the Vertigo shot lies in manipulating perspective distortion. As the camera moves away from the subject, the background appears to stretch and expand, while the subject remains relatively constant in size due to the zoom. This creates a striking visual effect where the background seems to change dramatically while the subject stays in focus.
Conclusion
In conclusion, understanding perspective distortion and its implications in cinematography is crucial for creating visually compelling narratives. Techniques like the Vertigo shot demonstrate how manipulating camera angles, distances, and focal lengths can profoundly impact the viewer's perception and emotional experience.