【IPMV】圖像處理與機器視覺
本系列為2025年同濟大學自動化專業**圖像處理與機器視覺**課程筆記
Lecturer: Rui Fan、Yanchao Dong
Lec0 Course Description
Lec3 Perspective Transformation
Lec7 Image Filtering
Lec8 Image Pyramid
持續更新中
文章目錄
- 【IPMV】圖像處理與機器視覺
- Image Pyramid 圖像金字塔
- 概述
- Pyramids
- Image Interpolation 圖像插值
- Repeated linear interpolation 重復線性插值
- Polynormial Fit 多項式擬合
- Down-sampling 降采樣
- Gaussian Pyramids 高斯金字塔
- Image Down-sampling v.s. Pooling 降采樣 v.s. 池化
- Up-sampling 上采樣
- 應用:Template Matching 模板匹配
- 總結
Image Pyramid 圖像金字塔
概述
本節主要解決:如何改變圖像分辨率以便進一步處理
首先介紹用于改變分辨率的圖像金字塔,上采樣(插值)和下采樣,
接下來介紹上采樣的線性插值方法,再介紹降采樣和上采樣;
最后簡要介紹圖像金字塔的應用——模板匹配
- Pyramids
- Image Pyramid
- Image Interpolation
- Image Down-sampling
- Image Up-sampling
Pyramids
圖像金字塔是圖像多尺度表達的一種,是一種以多分辨率來解釋圖像的有效但概念簡單的結構。
通常包括上采樣(up-sampling operation
)和降采樣(down-sampling operation
)。
- 大圖像,不斷降采樣,得到小圖像
- 小圖像,不斷上采樣,得到大圖像
本節我們主要介紹高斯金字塔(Gaussian pyramid)
Image Interpolation 圖像插值
圖像插值是上采樣的主要手段,給定圖片中相鄰的4個點,如何用1個點去代替。假如我們想得到未知函數 f f f 在點 P = ( x , y ) P = (x,y) P=(x,y) 的值,假設我們已知函數 f f f 在 Q 11 = ( x 1 , y 1 ) , Q 12 = ( x 1 , y 2 ) , Q 21 = ( x 2 , y 1 ) , Q 22 = ( x 2 , y 2 ) Q_{11}=(x_1 , y_1), Q_{12}=(x_1 , y_2), Q_{21}=(x_2 , y_1), Q_{22}=(x_2 , y_2) Q11?=(x1?,y1?),Q12?=(x1?,y2?),Q21?=(x2?,y1?),Q22?=(x2?,y2?) 四個點的值。
此處介紹兩種計算方法,重復線性插值(Repeated linear interpolation
) 、多項式擬合方法(Polynomial Fit
)
Repeated linear interpolation 重復線性插值
雙線性插值,又稱為雙線性內插。其核心思想:在兩個方向分別進行一次線性插值
首先在 x 方向進行線性插值,得到
f ( x , y 1 ) ≈ x 2 ? x x 2 ? x 1 f ( Q 11 ) + x ? x 1 x 2 ? x 1 f ( Q 21 ) , f ( x , y 2 ) ≈ x 2 ? x x 2 ? x 1 f ( Q 12 ) + x ? x 1 x 2 ? x 1 f ( Q 22 ) . {\displaystyle {\begin{aligned}f(x,y_{1})&\approx {\frac {x_{2}-x}{x_{2}-x_{1}}}f(Q_{11})+{\frac {x-x_{1}}{x_{2}-x_{1}}}f(Q_{21}),\\f(x,y_{2})&\approx {\frac {x_{2}-x}{x_{2}-x_{1}}}f(Q_{12})+{\frac {x-x_{1}}{x_{2}-x_{1}}}f(Q_{22}).\end{aligned}}} f(x,y1?)f(x,y2?)?≈x2??x1?x2??x?f(Q11?)+x2??x1?x?x1??f(Q21?