# Digital Image Processing¶

## Digital Image Fundamentals¶

### Structure of the Human Eye¶

#### Brightness Adaptation and Discrimination¶

Weber ratio

Two phenomena clearly demonstrate that perceived brightness is not a simple function of intensity:

Mach bands

simultaneous contrast
A region’s perceived brightness does not depend simply on its intensity.
optical illusions

### Light and the Electromagnetic Spectrum¶

$\lambda = \frac {c} {v}$

E = hv

Gamma 射线用于医学和天文成像, 以及核环境中的成像辐射. 超声波图像, 用于电子显微镜和图像合成的电子显微镜.

### Image Sensing and Acquisition¶

#### Image Acquisition Using Sensor Arrays¶

Noise reduction is achieved by letting the sensor integrate the input light signal over minuters or even hours.

#### A Simple Image Formation Model¶

f(x,y) = i(x,y)r(x,y)

### Image Sampling and Quantization¶

#### Representing Digital Images¶

$L = 2^k$

b = M * N * k

$b = N^2 * k$

#### Spatial and Intensity Resolution¶

spatial resolution
The smallest discernible detail in an image, can be stated in line pairs per unit distance, and dots (pixels) per unit distance. 这个定义里重要的一点是, 空间分辨率的度量必须相对于空间单元来说明, 图片大小本身并没有讲述完整的信息.

false contouring
The effect caused by the use os an insufficient number of intensity levels in smooth areas of a digital image. 叫假等高线, 因为看起来很像地图中的地形等高线. Image of size 256 * 256 pixels with 64 intensity levels and printed on a size format on the order of 5 * 5 cm are about the lowest spartial and intensity resolution images that can be expected to be reasonably free of objectionable sampling checkerboards and false contouring.
isopreference curves in the Nk-plane

#### Image Interpolation¶

interpolation

nearest neighbor interpolation

bilinear interpolation

bicubic interpolation

### Some Basic Relationships between Pixels¶

#### Neighbors of a Pixel¶

4-neighbors of p, $$N_{4}(p)$$
(x + 1, y), (x - 1, y), (x, y + 1), (x, y - 1)
four diagonal neighbors of p, $$N_{D}(p)$$
(x + 1, y + 1), (x + 1, y - 1), (x - 1, y + 1), (x - 1, y - 1)
8-neighbors of p, $$N_{8}(p)$$
$$N_{4}(p)$$$$N_{D}(p)$$

#### Adjacency, Connectively, Regions, and Boundaries¶

intensity value 在同一指定集合中的相邻像素点是毗邻的. 根据毗邻情况分为三种:

3. m-adjacency(mixed ajacency). 用来消除模棱两可. 两个值在 V 中的像素 p 和 q 是 m-ajacency 如果
1. q 在 $$N_{4}(p)$$ 中, 或者
2. q 在 $$N_{D}(p)$$ 中, 并且集合 $$N_{4}(p) \bigcap N_{D}(p)$$ 没有值在 V 中的像素.

$(x_{0}, y_{0}), (x_{1}, y_{1}), ..., (x_{n}, y_{n})$

// TODO

be connected in S

a connected component of S

a connected set

a region of the image

ajacent

We consider 4- and 8-ajacency when referring to regions. For our definition to make sense, the type of ajacent must be specified.

foreground, $$R_{u}$$
union of all disjoined regions.
background, :math::(R_{u})^c
foreground 的补集.
the boundary/border/contour of a region

border-following 算法通常跟随外边界, 为了得到一条 closed path.

edge

#### Distance Measures¶

1. D(p, q) >= 0 (D(p, q) = 0 if p = a), and
2. D(p, q) = D(1, p), and
3. D(p, z) <= D(p, q) + D(q, z).

Euclidean distance 欧几里得距离

$D_{e}(p, q) = [(x - s)^2 + (y - t)^2] ^ \frac {1} {2}$

$$D_{4}$$ distance (called the city-block distance)

$D_{4}(p, q) = |x - s| + |y - t|$

$$D_{8}$$ distance (called the chessboard distance)

$D_{8}(p, q) = max(|x - s|, |y - t|)$