---
# System prepended metadata

title: 影像處理期末 速記

---

# 影像處理期末 速記

[TOC]


### ==Model of Image Degradation/Restoration==

>If H is a linear, position-invariant process, then the degraded image is given in the spatial domain by:
> $g(x,y)=h(x,y)*f(x,y)+ \eta \{x,y\}$
> 退化函數 H 與 input(x,y)卷積 加上 additive noise達成 restoration
> h(x, y) is the spatial representation of the degradation function
> The more we know about 𝐻 and 𝜂, the closer 𝑓 ̂(𝑥,𝑦)  will be to 𝑓(𝑥, 𝑦).

### filter

#### median filter

> ![image](https://hackmd.io/_uploads/rkCQiVd_p.png)
> 使用中值取代中心像素
> 廣泛用於消除「椒鹽」噪聲，能有效減少 impulse noise


#### Max and min filter

![image](https://hackmd.io/_uploads/ByishV_dp.png)
> 使用最大或最小值取代window內的像素
> 能突出亮部或暗部並保留邊緣像素

#### midpoint filter

![image](https://hackmd.io/_uploads/rJGyAVOdT.png)
>This filter works best for randomly distributed noise, like Gaussian or uniform noise.
>譯: 濾波器最適合消除隨機分佈的噪點

#### alpha-trimmed mean filter

![image](https://hackmd.io/_uploads/HyKQyB__T.png)
> The alpha-trimmed filter is useful in situations involving multiple types of noise, such as a combination of salt-and-pepper and Gaussian noise
> 可以有效抑制混合的噪點，並有可調動的參數

### Local Binary Pattern(LBP)

![image](https://hackmd.io/_uploads/r1aZYZYO6.png)

![image](https://hackmd.io/_uploads/BJgl9WYda.png)


**局部二值模式（Local Binary Pattern, LBP）是一種用於紋理辨識的特徵描述子。 它透過比較中心像素與其周圍鄰域像素的灰階值來運作。 如果鄰域像素的灰階值大於或等於中心像素，則將其賦值為1，否則為0。 這樣，對於每個中心像素，都會得到一個二進制數，進而可以轉換成十進制來表示該中心像素的紋理特徵。**

公式如下：

>$LBP_{P,R} = \sum_{p=0}^{P-1} s(g_p - g_c) \cdot 2^p$

其中：
- \( P \) 是鄰域中的像素數量，
- \( R \) 是鄰域的半徑，
- \( $g_c$ \) 是中心像素的灰階值，
- \( $g_p$ \) 是鄰域內第 \( p \) 個像素的灰階值，
- \( s(x) \) 是符號函數，當 \( x $\geq$ 0 \) 時，\( s(x) = 1 \)，否則 \( s(x) = 0 \)。

透過這個方法，我們可以提取出影像的局部紋理訊息，這對於影像分析和處理非常有用。

### Otsu’s method for optimal global thresholding

![image](https://hackmd.io/_uploads/Bk-x6ztOT.png)



### ==Correcting tonal imbalances==

>> Describe the typical transformations used for correcting three common tonal imbalances, namely, flat, light, and dark images, in RGB color space

![image](https://hackmd.io/_uploads/BJxlzfK_6.png)

### polygonal approximation

![image](https://hackmd.io/_uploads/SJPNwzFO6.png)
![image](https://hackmd.io/_uploads/SJ97PfY_6.png)


### 3 types of ADIs

![image](https://hackmd.io/_uploads/rkHHeQYu6.png)

### Canny edge operator

![image](https://hackmd.io/_uploads/H1LNW7Fd6.png)















###### 