MCS Project - Enhanced Watershed

1,071 views

Published on

This is presentation of my MCS degree project 'Enhanced Watershed'.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,071
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
62
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

MCS Project - Enhanced Watershed

  1. 1. Enhanced Watershed Image Processing Segmentation Aamir Shahzad CIIT/SP05-MCS-002/WAH
  2. 2. Abstract <ul><li>Watershed enhancement can be done in three different ways. </li></ul><ul><li>One is to perform preprocessing. Second is to improve the watershed algorithm. And the third one is to perform post processing. </li></ul><ul><li>I choose the last option for enhancement because this option has more opportunities for enhancement. In this option, I use the technique “Fusion of edge based enhanced watershed segmentation” or “edge based enhanced watershed segmentation”. </li></ul>
  3. 3. What is Watershed Segmentation? <ul><li>What is segmentation? </li></ul><ul><li>Understanding the watershed transform requires that you think of an image as a surface. </li></ul><ul><li>The key behind watershed is to change your image into another image whose catchment basins are the objects you want to identify. </li></ul>
  4. 4. Marker-Controlled Watershed <ul><li>In simple watershed, we face the problem of over segmentation. </li></ul><ul><li>Marker control is a improved form of watershed. </li></ul><ul><li>Here we use internal and external markers define by automatically or from user </li></ul>
  5. 5. Proposed system – enhanced watershed segmentation <ul><li>Following are the high level main steps </li></ul><ul><ul><li>Perform watershed segmentation on main image </li></ul></ul><ul><ul><li>Get edge image from main image </li></ul></ul><ul><ul><li>Enhance edge image results </li></ul></ul><ul><ul><li>Merge the results based on the best results </li></ul></ul>
  6. 6. Algorithms used in main algorithm <ul><li>Connect edge with border </li></ul><ul><li>Fill one missing pixel </li></ul><ul><li>Get big object number </li></ul><ul><li>Connect object with border </li></ul><ul><li>Get minimum object size </li></ul><ul><li>Get object start pixel </li></ul><ul><li>Get object number </li></ul><ul><li>Get object size </li></ul><ul><li>Get select object </li></ul>
  7. 7. Proposed algorithm <ul><li>Read image </li></ul><ul><li>Convert image to gray scale, if required </li></ul><ul><li>Perform canny edge detection and get edges </li></ul><ul><li>connect edges with border </li></ul><ul><li>Fill missing pixel in edges </li></ul><ul><li>make edges logical (i.e. 0/1) </li></ul><ul><li>Complement the image </li></ul><ul><li>Perform labeling function on edges and get label 1 and total objects in label 1 </li></ul><ul><li>Get biggest object number in the label 1 </li></ul><ul><li>Connect objects with border </li></ul><ul><li>Perform labeling function again and get label 1 and total objects in label 1 </li></ul><ul><li>Get biggest object number again in the label 1 </li></ul><ul><li>Perform existing watershed method and get the label 2 </li></ul><ul><li>Perform labeling function on label 2 and get total objects in label 2 </li></ul><ul><li>Get biggest object number in the label 2 </li></ul><ul><li>Get the size of minimum object in label 2 </li></ul><ul><li>loop through 1st object to total object in label 1 </li></ul><ul><ul><li>if current object number is equal to biggest number in label 1 then continue </li></ul></ul><ul><ul><li>Get the current object’s start pixel in x and y variable from label 1 </li></ul></ul><ul><ul><li>Get the object number at x and y position in label 2 </li></ul></ul><ul><ul><li>if object number is equal to the biggest object number of label 2 then </li></ul></ul><ul><ul><ul><li>Increase the value of total objects in label 2 by one </li></ul></ul></ul><ul><ul><ul><li>Find the rows and columns pixels of current object in label 1 </li></ul></ul></ul><ul><ul><ul><li>Find the total pixels (i.e. total rows or columns) in above find rows and columns </li></ul></ul></ul>
  8. 8. <ul><ul><ul><li>Loop through 1st pixel to the last pixel of current object in label 1 </li></ul></ul></ul><ul><ul><ul><ul><li>Change the current pixel value at label 2 to total objects value in label 2 </li></ul></ul></ul></ul><ul><ul><ul><ul><li>if there is other objects pixel in between rows then change the pixel to total objects value </li></ul></ul></ul></ul><ul><ul><ul><li>continue the loop at 17 </li></ul></ul></ul><ul><ul><li>Get the current object size from label 1 </li></ul></ul><ul><ul><li>Get the size of object number (see 17.c) </li></ul></ul><ul><ul><li>If current object’s size is greater than object number’s size then </li></ul></ul><ul><ul><ul><li>Find the rows and columns pixels of current object in label 1 </li></ul></ul></ul><ul><ul><ul><li>Find the total pixels (i.e. total rows or columns) in above find rows and columns </li></ul></ul></ul><ul><ul><ul><li>Loop through 1st pixel to the last pixel of current object in label 1 </li></ul></ul></ul><ul><ul><ul><ul><li>Change the current pixel value at label 2 to object number value (see 17.c) </li></ul></ul></ul></ul><ul><ul><ul><li>continue the loop at 17 </li></ul></ul></ul><ul><ul><li>If current object’s size is greater than double size of minimum object in label 2 </li></ul></ul><ul><ul><ul><li>Find the rows and columns pixels of current object in label 1 </li></ul></ul></ul><ul><ul><ul><li>Find the total pixels (i.e. total rows or columns) in above find rows and columns </li></ul></ul></ul><ul><ul><ul><li>Increase the value of total objects in label 2 by one </li></ul></ul></ul><ul><ul><ul><li>Loop through 1st pixel to the last pixel of current object in label 1 </li></ul></ul></ul><ul><ul><ul><ul><li>Change the current pixel value at label 2 to total object value </li></ul></ul></ul></ul><ul><ul><ul><ul><li>if there is other objects pixel in between rows then change the pixel to total objects value </li></ul></ul></ul></ul><ul><ul><ul><li>continue the loop at 17 </li></ul></ul></ul><ul><li>Convert the label2 to RGB and display the final enhanced watershed result </li></ul>
  9. 9. Example 1 Original Image Simple Watershed Result Marker-Controlled Watershed Result My Watershed Result
  10. 10. Example 2 Original Image Marker-Controlled Watershed Result My Watershed Result
  11. 11. Example 3 Original Image Marker-Controlled Watershed Result My Watershed Result
  12. 12. Example 4 Original Image Marker-Controlled Watershed Result My Watershed Result
  13. 13. Note: Results approximate 1% 20% 20% 0% 6 1% 30% 30% 0% 5 1% 70% 70% 0% 4 1% 10% 50% 40% 3 3% 20% 70% 50% 2 My watershed Watershed 1% 10% 80% 70% 1 Fault Enhancement Image No
  14. 14. 2% 30% 30% 0% 12 1% 705 70% 0% 11 1% 90% 90% 0% 10 2% 25% 30% 5% 9 1% 3% 53% 50% 8 My watershed Watershed 1% 70% 70% 0% 7 Fault Enhancement Image No
  15. 15.  << The End >>  2% 36% 54% 18% Average 10% 0% 25% 30% 15 1% 90% 90% 0 % 14 My watershed Watershed 1% 5% 35% 30% 13 Fault Enhancement Image No

×