# Computer Vision: 2. Perception

# 2.1 Properties of Light
## Light
- is an electromagnetic radiation (EMR)
- λ: wavelength

### Plenoptic Function
> R(X, Y, Z, θ, Φ, λ, t)
- 3 position, 2 angle, strength, time

### The Light Field
> R(u, v, s, t)
- where light captured between two plane (u, v) and (s, t)

## The Visible Light Spectrum
- has wavelength between 380 to 720nm

## Spectral Power Distribution (SPD)
- means how much the light source has light power relatively to wavelength

---

# 2.2 The Human Visual System
## 2.2.1 Color Perception
- light -> retina -> photosensitive cells
### Density of Rods and Cones
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1662526909044/0srJCezOL.png align="left")
- are not uniformly distributed on the retina
 - rods: responsible for intensity
 - cones: responsible for color
 - both adapt to be more sensitive in low light
### Visual Acuity
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1662527031263/DsR3QHZNi.png align="left")

## 2.2.2 Brightness Contrast
- depends on the surrounding region 
### Visual Dynamic Range
- depends on the luminance level
### Light Response is Nonlinear
- gamma correction
 - actual linear brightness != perceptual linear brightness (sRGB)

## 2.2.3 Fixational Eye Movement
- 3 types
 - Microsaccades: short and fast linear mov.
 - Ocular drift: constant slow mov.
 - Microtremors: tiny vibrations for seeing fine details

## 2.2.4 After Images
- occurs when tired photoreceptors send out negative response after a strong stimulus

---

# 2.3 Color Perception
### Three Types of Cones
- S, M, L
 - Short (S): blue
 - Medium (M): green
 - Long (L): red
- have different sensitivities: green > red
### Color Perception
- filtered color = multiply its response curve by the spectrum, integrate over all wavelengths
### Metamers

---

# 2.4 Camera and Optics
## 2.4.1 Camera Response Function
- eventually pixel values
### Recovering the camera response
1. Model every step
2. Calibrate (estimate) the response function
3. Calibrate the response function from several images

## 2.4.2 Image Formation
- just film?
### Pinhole camera
- pinhole barrier -> film
- produces blurring
- camera obscura (the first camera)
### Aperture
- too small -> blurring
- too big -> blurring as well
- need bright environment or more sensitive film
### Adding a Lens
- collect more rays
-  focal length; distance(center of lens, focal point)
- depth of field
 - small aperture -> less rays, clear and deep background
- **circle of confusion**

## 2.4.3 From Light to Pixels
- IR-blocking filter
 - necessary in RGB sensor system
 - unnecessary in brightness sensor system
- Color filters
 - sensors are color blind.
 - filtering colors to each sensor will be helpful.

### Bayer filters
- pixels of square grids
 - 1/4 of pixels -> see red light
 - 2/4 of pixels -> see green light
 - 1/4 of pixels -> see blue light

### Debayering
- is to interpolate missing values

### RGB images (of three channel)
- instead of bayer filters, we can take picture of each color and add together.
- no missing RGB values
- expensive

---

# Images From
- Wikipedia
- https://www.researchgate.net/figure/Distribution-of-cones-and-rods-in-a-typical-human-retina-14_fig1_235387264
