Lec.02: Image Formation¶
Camera and lens¶
-
Pinhole camera
- Add a barrier to block off most of the rays, The opening known as the aperture
- 孔太小一方面亮度不够,另一方面会发生衍射现象diffraction

- Lens: \(\dfrac{1}{i}+\dfrac{1}{o}=\dfrac{1}{f}\)

- Magnification: \(m=\dfrac{h_i}{h_o}\)
-
Field of View: depend on focal length and sensor size
- 长焦会放大远处的物体。焦距越长,视角越窄,适合远摄;焦距越短,视角越宽,适合广角拍摄。
- FOV also depends on sensor size

-
F-number: More convenient to represent aperture as a fraction of focal length
- \(N=\dfrac{f}{D}\)
-
Lens Defocus
- From similar triangles: \(\dfrac bD=\dfrac{|i^{\prime}-i|}{i^{\prime}}\)
- Blur circle diameter: \(b=\dfrac D{i^{\prime}}|i^{\prime}-i|,b\propto D\propto\dfrac1N\)
- 如何认为image是well focused的,只要b的大小小于像素大小即可

- Depth of Field:图像足够聚焦的物体距离的范围
景深和哪些因素有关
- o 相机到物体的距离
- f 镜头焦距
- c 图像中可接受的最大模糊圈直径
- N 光圈的F-number

-
How to blur the background
- Large aperture
- Long focal length
- Near foreground
- Far Background
Geometric Image Formation¶
- Pin-hole camera model: Perspective Projection

- Perspective Projection in homogeneous coordinates
- Each point has an infinite set of homogeneous coordinates
- Vanishing points: 三维空间中平行线在照片中会收敛于同一点


- The ray from C through v is parallel to the lines
- v tells us the direction of the lines
- v may be outside the image frame or at infinity
-
Vanishing lines
- Any set of parallel lines on the plane define a vanishing point
- The union of all of these vanishing points is the vanishing line
- Note that different planes define different vanishing lines
- The direction of the vanishing line tells us the orientation of the plane


造成畸变的原因有哪些
-
Perspective distortion
- 向上倾斜照相机会导致垂直方向收敛
- 用一个普通的镜头来保持相机的水平,只能捕捉到建筑的底部
- 外部柱看起来更大
- 变形不是由于镜头的缺陷
-
Radial distortion
-
Caused by imperfect lenses(透镜)
-
More noticeable for rays that pass through the edge of the lens
对于通过透镜边缘的光线来说更为明显
-
广角容易导致桶形畸变
-
长焦容易导致枕形畸变
-

Photometric image formation¶
-
Shutter speed controls exposure time
-
The pixel value is equal to the integral of the light intensity within the exposure time
像素值等于光强\(\times\)曝光时间
-
Rolliing shutter effect:卷帘快门,逐行曝光,而非global shutter,即理想中的整张照片同时曝光,拍摄结果就可能出现"倾斜"、"摇摆不定"或"部分曝光"等情况,即果冻效应。
-
Color spaces: RGB, HSV(Hue色调, Value亮度, Saturation饱和度)
- HSV比RGB更接近人类对颜色感知,在图像处理中使用比较多
- 两者之间可以互相转换

- Bayer filter
- 绿色最多:人眼对绿色光的敏感度最高;绿色是自然界中最常见的颜色之一;绿色通道通常噪声较少

Shading¶
-
Compute light reflected toward camera at a specific point.
-
Inputs:
- Viewer direction, v
- Surface normal, n
- Light direction, I (for each of many lights.)
- Surface parameters 材质

- BRDF(Bidirectional Reflectance Distribution Function)
不考

- Diffuse (Lambertian) Reflection 漫反射

- Specular reflection 镜面反射

- Ambient Lighting 环境光

- Blinn-Phong Reflection Model
