# Camera Introduction <style> figure { padding: 4px; margin: auto; text-align: center; } figcaption { background-color: black; color: white; font-style: italic; padding: 1px; text-align: center; } </style> ## Pinhole Camera Let's design a camera. The simplest way is to curve out a hole on a curtain. The light beams ejected from the object pass through this pinhole, projecting onto the image plane. <figure> <img src="https://hackmd.io/_uploads/Sym-YHOtp.png"> </figure> The relationship between projected height and real object's height is written as follow: $$ y = f \frac{Y}{Z} $$ ### Drawback The obvious drawback of pinhole model is that the pinhole (or technically named **aperture**) has to remain small, otherwise the projection will blur out. However, when the pinole is set too small, other issues pop out like **lack of light** and **diffraction**. It is hard to figure out the proper size for aperture. <figure> <img src="https://hackmd.io/_uploads/BJaY0HOKp.png" width="400"> </figure> ## Cameras with Lenses Lenses are introduced to solve the issues pinhole model may encounter. With lenses, light beams can be aggregated without blurring and diffraction. <figure> <img src="https://hackmd.io/_uploads/BkIyM8OYT.png" width="400"> </figure> ### Thin Lens Formula - Focal length: $f$ - Distance of the object from the optical center $D$ - Distance at which the object will be in focus $D'$ ![image](https://hackmd.io/_uploads/BJ0IXIuK6.png) Combine two equations we can get the relationship of $f, D, D'$: $$ \frac{1}{D} + \frac{1}{D'} = \frac{1}{f} $$ ### Depth of field Depth of field is the distance between the nearest and farthest objects in a scene that appear acceptably sharp in an image. ![image](https://hackmd.io/_uploads/ryHm_D1cp.png) Changing the aperture size affects depth of field. A smaller aperture enlarges depth of field, increasing the range in which the object is in focus. But small aperture reduces amount of light. May need to increase exposure to solve the issue. <figure> <img src="https://hackmd.io/_uploads/ByPHtwJ96.png"> <figcaption>Smaller aperture has less blurring projection</figcaption> </figure> ### Field of view The field of view is the angular extent of the world observed by the camera. Focal length $𝑓$, length of the sensor $𝑑$ determines the FOV. ![image](https://hackmd.io/_uploads/r1hCcvk56.png) Larger focal length results in smaller FOV: ![image](https://hackmd.io/_uploads/SyHujP1qp.png) ### Lens aberrations #### Issue 1: Vignetting A reduction of an image's brightness or saturation toward the periphery compared to the image center. <figure> <img src="https://hackmd.io/_uploads/rkSJ6wyca.png" width="400"> </figure> #### Issue 2: Radial distortion Caused by imperfect lenses. Distortion is stronger towards the edges of the photo. <figure> <img src="https://hackmd.io/_uploads/HyDqXP_Y6.png" width="400"> </figure> #### Issue 3: Spherical aberration Lenses don’t focus light perfectly. <figure> <img src="https://hackmd.io/_uploads/H108pvycp.png" width="500"> </figure> #### Issue 4: Chromatic aberration Lens has different refractive indices for different wavelengths: causes color fringing. <figure> <img src="https://hackmd.io/_uploads/r1cpTPJ5a.png" width="500"> </figure> ## Reference - http://luthuli.cs.uiuc.edu/~daf/courses/CV23/Slides/lec11_camera.pdf