Presentation is loading. Please wait.

Presentation is loading. Please wait.

形態學影像處理 膨脹(Dilation)、侵蝕(Erosion)

Similar presentations


Presentation on theme: "形態學影像處理 膨脹(Dilation)、侵蝕(Erosion)"— Presentation transcript:

1 形態學影像處理 膨脹(Dilation)、侵蝕(Erosion)
計算攝影學─期末報告 電機所 周柏廷

2 Outline Introduction to Morphology Application of Morphology
Program Flow Gray Image Binary Image Concept of Morphology Logic Erosion Dilation Opening and Closing Introduction to Qt UI Platform Environment Demo Reference

3 Introduction to Morphology
這裡指的非生物學上的形態學,而是數學上的形態學 使用多變的遮罩來達到改變偵測結果的一種方式,主要行為分為 侵蝕(Erosion) 膨脹(Dilation) 斷開(Opening) 閉合(Closing) 應用大多假設為二值化影像(Binary image),由二值化影像開始後 續處理。 若非二值化影像 侵蝕=最小化濾波器(Minimum Filter) 膨脹=最大化濾波器(Maximum Filter)

4 Application of Morphology
增強字跡 醫學影像檢視 (X光影像) 指紋的紋路特徵萃取

5 Program Flow User Interface Reset Input Source Image
Convert Source image to Gray Image Convert Gray image to Binary Image Do Dilation Do Erosion or Output Result Image

6 Gray Image 彩色影像儲存方式為每個pixel由RGB三原色固定排列組成
Gray = * Red * Green * Blue 得到的灰階值放回每個pixel值裡面的RGB位置,即可呈現灰階圖

7 Binary Image 二值化的動作是利用 pixel-by-pixel operation 把一張灰階圖(gray image)變成一張「只有黑、白」二值的圖 假定原來的灰階圖為 F,其中任何一個像素 f(i, j)的亮度值都是介於 [0, 255] 此外再假定二值化的過程用的 threshold 為T,且二值化以後的影像為 b(i, j) 。則實際的二值化運算是 二值化有時會被用來作為 segmentation(分離物件)的工具。

8 Binary Image 下圖中,Lena和背景就相當程度地被區隔開來了 Color image Gray image

9 Concept of Morphology Logic
Structuring Element表示成0 或1 的矩陣,在整個影像區域內平移,如 下圖所示,將一個3*3 矩陣的Structuring Element與二值化影像 (Source Image)作重疊,將 Structuring Element的像素值與Source Image的像素去做運算

10 Erosion 侵蝕目的為減少原先資料的一種方式 透過侵蝕的演算法可將雜訊侵蝕掉,如下圖左周圍的雜訊
對於Z2中的集合A和B,A被B侵蝕記為AϴB,定義為

11 Erosion Source Gray Binary Result

12 Dilation 膨脹亦稱為擴張、融合,侵蝕的相反 對於邊界偵測後結果作增強 對於Z2中的集合A和B,A藉由B的膨脹記為A B,定義為

13 Dilation Source Gray Binary Result

14 Opening and Closing 斷開與閉合,就是二值化影像透過侵食或膨脹做改善後,發現補償 或刪除動作做的太多,而做的調整輸出的結果。 斷開行為即是,先做侵蝕再膨脹,定義為: 閉合行為則是,先做膨脹再侵蝕,定義為:

15 Opening and Closing 以3*3十字遮罩(如右圖)進行斷開行為
Example: 先做侵蝕去雜訊,再做膨脹增強形狀長回原形(斷開opening) 1 Erosion Dilation

16 Introduction to Qt UI Platform
It’s Free Deploy everywhere Windows, Mac OS, Linux/X11, Embedded Linux, …… Useful C++ class library QtGui(GUIlibrary) QtMultimedia(Multimedia moulde) QtNetwork(HTTP, FTP and lower level protocol support) QtOpenGL(OpenGL, OpenGL ES) QtScript(ECMA standard script engine) QtWebkit(Web browser engine) QtXml(XML reader and parser)

17 Environment OS Environment: Ubuntu (GNU/Linux generic x86_64) Tool: Qt4 Compiler: Instructions of build a Qt project under Linux qmake –project qmake make

18 Demo 連結

19 Reference 維基百科 Wikipedia, 形態學
數位影像處理 Digital Image Processing 3/e, Gonzalez Woods, 謬紹綱 形態學影像處理於指紋紋理分析之應用, 鐘世明 陳福來 李德福, 黎明技術學院 亦用灰階影像形態學於六角影像上之邊緣偵測, 蔡偉成, 國立中山大學 數學形態學 Shi- Huang Chen 二值化影像處理與分析 %E9%9B%BB/%E8%AA%B2%E7%A8%8B%E6%95%99%E6%9D%90/%E8%87%AA%E5%8B %95%E5%8C%96%E5%85%89%E5%AD%B8%E6%AA%A2%E6%B8%AC/ch04_%E4%BA%8 C%E5%80%BC%E5%8C%96%E5%BD%B1%E5%83%8F%E8%99%95%E7%90%86%E8%88% 87%E5%88%86%E6%9E%90.pdf Qt Project 影像處理的13堂課, 林紀瑋

20 Thanks for your attention


Download ppt "形態學影像處理 膨脹(Dilation)、侵蝕(Erosion)"

Similar presentations


Ads by Google