1 / 20

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

形態學影像處理 膨脹 (Dilation) 、侵蝕 (Erosion). 計算攝影學─期末報告 601415056 電機所 周柏廷. 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

jeb
Download Presentation

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

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. 形態學影像處理膨脹(Dilation)、侵蝕(Erosion) 計算攝影學─期末報告 601415056 電機所 周柏廷

  2. Outline • Introduction toMorphology • Application of Morphology • ProgramFlow • Gray Image • Binary Image • Concept of Morphology Logic • Erosion • Dilation • Opening and Closing • Introduction to Qt UI Platform • Environment • Demo • Reference

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

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

  5. ProgramFlow User Interface Reset

  6. Gray Image • 彩色影像儲存方式為每個pixel由RGB三原色固定排列組成 • 灰階影像的pixel值則是由用RGB經過經驗權重得出,算式如下 • Gray = 0.299 * Red + 0.587 * Green + 0.114 * 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和背景就相當程度地被區隔開來了 Gray image Binary image Color 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的膨脹記為AB,定義為

  13. Dilation Source Gray Binary Result

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

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

  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) • http://qt-project.org/

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

  18. Demo 連結 • https://www.youtube.com/watch?v=wbJWRnxvnwY&feature=youtu.be

  19. Reference • 維基百科 Wikipedia, 形態學 • 數位影像處理 Digital Image Processing 3/e, Gonzalez Woods, 謬紹綱 • 形態學影像處理於指紋紋理分析之應用, 鐘世明 陳福來 李德福, 黎明技術學院 • 亦用灰階影像形態學於六角影像上之邊緣偵測, 蔡偉成, 國立中山大學 • 數學形態學 http://www.pws.stu.edu.tw/shchen/Handout/STU_DIP_CH10.pdf, Shi-Huang Chen • 二值化影像處理與分析 http://140.130.15.147/%E5%8D%8A%E5%B0%8E%E9%AB%94%E5%8F%8A%E5%85%89%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%8C%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 http://qt-project.org/ • 影像處理的13堂課, 林紀瑋

  20. Thanks for your attention

More Related