1 / 21

Image Processing & Computer Vision

Image Processing & Computer Vision. Texture Segmentation. Texture Segmentation.

yana
Télécharger la présentation

Image Processing & Computer Vision

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. Image Processing &Computer Vision Texture Segmentation

  2. Texture Segmentation • ลวดลายหรือ Texture เป็นส่วนสำคัญอย่างหนึ่งทางด้าน imageprocessing และ computer vision ที่ใช้ในการแบ่งแยกลวดลายต่าง ๆ ภายในภาพๆ หนึ่ง ออกเป็นส่วน ๆ อย่างชัดเจน ดังตัวอย่างจากภาพด้านล่าง จะสามารถแบ่งเป็นโซนใหญ่ ๆ ได้ 4 โซนเช่น • Texture of tiger • Texture of grass • Texture of water • Unmatched texture

  3. Texture Segmentation การแบ่งส่วนรูปภาพให้เป็นกลุ่ม (region) โดยดูจากลายของรูปภาพ หรือ Texture โดยใช้ Grey Level Co-occurrence Matrix (GLCM).

  4. Texture Segmentation • Example of Texture

  5. Grey Level Co-occurrence Matrix (GLCM) • Three different co-occurrence matrices for a gray-tone image. Horizontal Diagonal Vertical

  6. Grey Level Co-occurrence Matrix (GLCM) • GLCM คือ ตารางแสดงความแตกต่างระหว่าง pixel โดยใช้ความสว่าง (brightness) ในระดับ gray level ที่เกิดขึ้นในรูปภาพมาแสดงผลในตาราง Test image pattern (gray level) 4 gray level ตัดบางส่วนของ texture ออกมา เพื่อทำ GLCM 0  black 1  dark gray 2  light gray 3  white

  7. Grey Level Co-occurrence Matrix (GLCM) • การแบ่งช่วงสีเช่น 4-gray level • ช่วง pixel intensity 0 – 63  0 • ช่วง pixel intensity 64 – 127  1 • ช่วง pixel intensity 128 – 191  2 • ช่วง pixel intensity 192 – 255  4 • การแบ่งช่วงสีสามารถทำได้มากกว่า 4level ตามความละเอียดของ texture(ลวดลาย)

  8. Grey Level Co-occurrence Matrix (GLCM) (Count Matrix) Fill in Count Matrix (Right spatial Relationship or Horizontal Relationship) 0 2 1 3 0 1 2 3 Test image pattern Count Matrix

  9. Grey Level Co-occurrence Matrix (GLCM) • Transpose Matrix เพื่อทำให้ Matrix สมมาตร หรือ Symmetric Count Matrix Transpose Matrix + Count Matrix + Transpose Matrix = Symmetrical Matrix

  10. Grey Level Co-occurrence Matrix (GLCM) • Normalized symmetrical Horizontal GLCM Symmetrical Matrix / Sum of elements = Horizontal GLCM (1/24) * = Horizontal GLCM นี้จะแสดงเป็นค่า Probability

  11. Grey Level Co-occurrence Matrix (GLCM) นอกจากจะทำการนับค่า Co-occurrence ในระดับแนวนอน(Horizontal) แล้ว ยังสามารถที่จะทำในระดับแนวตั้ง(Vertical) หรือแนวทแยงมุม (Diagonal) ได้อีกด้วย ดังนี้ Diagonal Co-occurrence Vertical Co-occurrence

  12. Example of Vertical GLCM 0 1 2 3 0 1 2 3 Vertical Co-occurrence Count Matrix Transpose Matrix

  13. Example of Vertical GLCM(ต่อ) Symmetrical Matrix Vertical GLCM(Probability)

  14. Example of Diagonal GLCM 0 1 2 3 0 1 2 3 Count Matrix Diagonal Co-occurrence Transpose Matrix

  15. Example of Diagonal GLCM(ต่อ) Symmetrical Matrix Diagonal GLCM(Probability)

  16. Grey Level Co-occurrence Matrix (GLCM) • สร้าง Count Matrix • ดู relation ใน ส่วนของภาพที่ตัดมาระหว่างจุดอ้างอิงและจุดพิกเซลเพื่อนบ้านตามทิศทางที่กำหนด (Neighbour pixel) • นับจำนวนความสัมพันธ์ที่เกิดขึ้น (occurrence) และเติมลงใน Count Matrixจะเกิด Count Matrix ของจำนวนความสัมพันธ์ขึ้น • Transpose Matrixเพื่อทำให้เป็นสมมาตร (Symmetrical matrix) • ทำการบวก Count Matrixและ Transpose Matrix • แปลง Matrix ที่รวมกันแล้วให้เป็น Probability โดยนำเอาค่าของ Matrix แต่ละช่อง หารด้วยผลรวมทั้งหมด • เมื่อหา Probability Matrix ได้แล้ว ก็สามารถนำเอา Matrix นี้ไปหา Texture ในภาพจริงได้โดยต้องทำภาพจริงที่จะหา Texture ให้เป็น gray level ระดับเดียวกันกับ Matrix ที่สร้างขึ้นไว้ก่อน จากนั้นก็ทำการหา GLCM ของภาพจริง และนำมาเปรียบเทียบกับ GLCM ที่เราสร้างไว้เป็นต้นแบบ

  17. Grey Level Co-occurrence Matrix (GLCM) หา GLCM ในภาพจริง แล้วนำไปเปรียบเทียบ กับ Horizontal GLCM ที่สร้างไว้แล้ว ถ้ามีค่า Probability ใกล้เคียงกันหรือเหมือนกัน ในตำแหน่งเดียวกัน ถือว่าเป็นลายเดียวกัน Input image Horizontal GLCM

  18. Grey Level Co-occurrence Matrix (GLCM) • นอกจากจะใช้แค่ Probability Matrix ในการหา Texture แล้วเรายังสามารถหารายละเอียดของ Texture ได้อีก โดยการหา • Contrast (ความแตกต่างของสี) • Dissimilarity(ความแตกต่างของลวดลาย) • Homogeneity หรือ similarity(ความเป็นเนื้อเดียวกันหรือความเหมือนกัน) ได้อีกด้วย

  19. GLCM and Contrast weight * Contrast weight Horizontal GLCM = Contrast Matrix

  20. GLCM and Dissimilarity Weight * Dissimilarity weight Horizontal GLCM 0.083+0.084+0.083+0.084+0.042+0.042 = 0.418 = Dissimilarity Matrix

  21. GLCM and Homogeneity (Similarity) * similarity weight Horizontal GLCM 0.167+0.042+0.014+0.042+0.167+ 0.014+0.25+0.021+0.021+0.083 = 0.804 = Similarity Matrix

More Related