1 / 43

数位影像基本処理法

Chapter 2. 数位影像基本処理法. 数位影像処理 (Digital Image Processing). ・ 灰度(灰階)轉換. ・2値化処理; 閥値処理: 某個臨界灰度値. ・ Filter 処理. ・ 影像間演算. ・ 影像圧縮処理 (Data compression ). ・ 三維影像 顕 示. Digital Image Fundamentals. Image Enhancement in the Spatial Domain. Using the negative transformation. 空間域 (Spatial domain).

berny
Download Presentation

数位影像基本処理法

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 2 数位影像基本処理法

  2. 数位影像処理 (Digital Image Processing) ・灰度(灰階)轉換 ・2値化処理;閥値処理:某個臨界灰度値 ・Filter処理 ・影像間演算 ・影像圧縮処理(Data compression) ・三維影像顕示

  3. Digital Image Fundamentals

  4. Image Enhancement in the Spatial Domain Using the negative transformation

  5. 空間域(Spatial domain) • 空間域影像是我們一般肉眼可看出的影像。 • 在Spatial domain中,毎張數位影像都是由許多點所組合而成的,這些點又稱為pixel • 一張數位影像的資料通常是以二維陣列來存放的,毎一個像素的資料,皆相對應於二維陣列中的element

  6. 頻率域(Frequency domain) • ●頻率域影像是將一般影像由Spatial domain轉換成Frequency domain的結果。 • ●透過轉換處理後會將影像之不同頻率的部分分別濾出,而産生許多不同的高低頻帶。 • ●人的肉眼對於影像中低頻的部分較為敏感,對於高頻的部分較無感覺,因此通常重要的部分存在於低頻之中,而高頻處為影像較不重要之處。 • ●必要時可以除去或減少。目的是為了減少影像之儲存空間,及加速影像之傳輸速度

  7. Histogram:灰階影像的直方圖 Histogram 是影像的基礎統計圖表 直方圖就是計算毎一個像素値出現的次數,依此頻率所繪製的直線圖(bar圖)

  8. Why? Reason !! 濃度轉換(灰階処理) Histogram Contrast Improvement

  9. 0 (0≤z<a) Z’= Zm×(z-a)/(b-a) (a ≤z ≤b) Zm (b<z≤Zm 線性濃度(亮度)轉換曲線 Why? Prove it !

  10. Contrast Improvement 変暗 変亮 灰階処理 非線性灰階轉換例(examples)

  11. Image Enhancement in the Spatial Domain

  12. 灰階値轉換 影像Histogram

  13. Image Enhancement in the Spatial Domain

  14. Image Enhancement in the Spatial Domain

  15. Image Enhancement in the Spatial Domain

  16. 2値化処理、2値化影像

  17. 2値化処理

  18. 閾値処理(thresholding)

  19. 閾値選取方法 ・固定閾値法 ・P tile法 (百分比法)自動閾値法  ・Mode法 (雙峰法) ・判別分析法 (Otsu 法: 大津法)

  20. If f(x,y) T = 0, otherwise 固定閾値法 f (x,y):original image g(x,y):処理後影像 T=131

  21. 百分比法自動閾値法: p tile p-分位数法(也称p-tile法)可以説是最古老的一種閾値選取方法。該方法使目標或背景的像素比例等於其先験probability来設定閾値,簡単高效,但是対於先経概率難於估計的図像却無能為力。 Example:影像全体的面積為 S、対象図形の面積為S0、対象影像是全体影像面積 p%.

  22. Mode法 (雙峰法) (自動閾値選取法) 此方法的基本思維是:假設図像中有明顕的目標和背景,則其灰度直方図呈双峰分布,当Histogram具有双峰特性時,選取両峰之間的谷対応的灰度級(gray level)作為閾値

  23. 判別分析法 最大類間方差法 (Otsu法; 大津法;自動閾値選取法) 判別分析2値化法是一種自動閾値選取法 Otsu法是由日本学者大津于1979年提出的,是一種自適応的閾値確定法,又叫大津法,簡称OTSU Method。 它是按図像的灰度特性,将図像分成背景和目標2部分。背景和目標之間的類間方差越大,説明構成図像的2部分的差別越大,当部分目標錯分為背景或、部分背景錯分為目標都会導致2部分差別変小。因此,使類間方差最大的分割意味着錯分probability最小。

  24. Filtering: 図像濾波方法 Filtering在信號處理、影像處理中是一種相當基本且重要的課題。 Filtering被用來提取影像中某些特定的視覺特徴、 而這些特徴則可能傳達了某些重要的資訊 。 ・Spatial filtering ・Smoothing (平滑処理) ・Edge detection ・Spatial frequency filtering

  25. 空間迴旋積(Spatial Convolution ) 影像可以在 頻率域(frequency domain)或 空間域(spatial domain)進行濾波。 各種用在空間域率波的運算子: 均値濾波器(averaging filter; mean filter) 中値濾波器(median filter) 高斯濾波器(Gaussian filter) 索貝爾濾波器(Sobel filter) 拉普拉斯濾波器(Laplacian filter)

  26. 空間迴旋積(Spatial Convolution )的運算過程 ・対応的pixel数値相乗、 ・然後加総 ・移到下一格(pixel),做同  様運算 ・以下依此類推

  27. 空間濾波器(spatial filter)h(x,y) 又稱為 Mask ;Kernel ; Window 影像f(x,y)經過空間濾波器的運算,得到濾波後的影像g(x,y),此一運算称為迴旋積(convolution) 影像濾波就是 影像與一個適当的filter做Convolution運算

  28. 空間濾波 Convolution(迴旋積)的運算模式為“shift-multiply-summation”: shift指由左到右、由上到下移動濾波器h(x,y),針對毎一次濾波器視窗所涵蓋的原始影像的區域進行相乘,最後累加所有乘積,得到濾波影像g(x,y)上一個像素的値。假設空間濾波器的大小是 2K×2L,則我們可以寫成 濾波器⇔演算子⇔operator)

  29. Original image Operator, Filter, mask 空間filtering 的方法

  30. 平均値filter 以一点(像画)做中心。計算出事先指定的平方領域内的各点(像素)的濃度(亮度)的平均値。此値即為平滑化影像的新濃度(亮度)。

  31. 中値filter (median filter) For example,将3×3的全領域中的9個像素的濃度按照大小順序排列出来。把正中間(第5位)的像素的濃度当做3×3 領域的中心位置的新濃度(影像処理後)。 中値濾波器: 藉由毎一個pixel鄰近pixel灰階値排序的中間値來取代該pixel的灰階値。中値的計算是先將鄰近pixel(濾波器視窗範圍)灰階値排序,在取出排序居中的値作為濾波器中間位置影像的像素値。

  32. 均値濾波器  (Averaging filter; mean filter)

  33. 2 2 2 3 11 2 2 2 2 2 処理後影像 原始影像 平均値濾波器(Averaging filter; mean filter)

  34. 加權平均濾波器(weighted smoothing filter) 高斯濾波器是一個平滑濾波器,平滑程度是由標準差σ來控制,σ値越大,平滑程度越高,相對的,影像越模糊。

  35. Image Enhancement in the Spatial Domain

  36. 25 25 25 25 25 25 25 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 1 25 25 25 25 25 25 25 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 0 2 25 25 25 25 25 25 25 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 1 25 25 25 25 25 25 25 0 0 0 0 0 0 0 0 0 0 0 0 0 25 25 25 25 25 25 25 0 0 0 0 0 0 0 0 0 0 0 0 0 25 25 25 25 25 25 25 0 0 0 0 0 0 0 0 0 0 0 0 0 25 25 25 25 25 25 25 0 0 0 0 0 0 0 0 0 0 0 0 0 25 25 25 25 25 25 25 0 0 0 0 0 0 0 0 0 0 0 0 0 25 25 25 25 25 25 25 0 0 0 0 0 0 0 0 0 0 0 0 0 25 25 25 25 25 25 25 0 0 0 0 0 0 0 0 0 0 0 0 0 b Computation h a

  37. Example of Edge Filter Original image Edge filter, then brightened

  38. Image Filtering: Edge Detection

  39. 邊縁偵測濾波器 (edge detection filter)

  40. 影像合成 • 把3張影像合成為1張

  41. Q & A

  42. 判別分析法【discriminant analysis method】(Otsu Method)分離度(separation metrics)最大時的閾値。分離度:Class間分散(between-class variance)       與Class内分散(within-class variance)的比。 class間分散σb2 class内分散σw2 全分散(total variance)σt 分離度 最大値時的t 値 閾値

More Related