mcs project - enhanced watershed

Download MCS Project - Enhanced Watershed

Post on 25-Jun-2015

798 views

Category:

Technology

2 download

Embed Size (px)

DESCRIPTION

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

TRANSCRIPT

  • 1. Enhanced Watershed Image Processing Segmentation Aamir Shahzad CIIT/SP05-MCS-002/WAH

2. Abstract

  • Watershed enhancement can be done in three different ways.
  • One is to perform preprocessing. Second is to improve the watershed algorithm. And the third one is to perform post processing.
  • 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.

3. What is WatershedSegmentation?

  • What is segmentation?
  • Understanding the watershed transform requires that you think of an image as a surface.
  • The key behind watershed is to change your image into another image whose catchment basins are the objects you want to identify.

4. Marker-Controlled Watershed

  • In simple watershed, we face the problem of over segmentation.
  • Marker control is a improved form of watershed.
  • Here we use internal and external markers define by automatically or from user

5. Proposed system enhanced watershed segmentation

  • Following are the high level main steps
    • Perform watershed segmentation on main image
    • Get edge image from main image
    • Enhance edge image results
    • Merge the results based on the best results

6. Algorithms used in main algorithm

  • Connect edge with border
  • Fill one missing pixel
  • Get big object number
  • Connect object with border
  • Get minimum object size
  • Get object start pixel
  • Get object number
  • Get object size
  • Get select object

7. Proposed algorithm

  • Read image
  • Convert image to gray scale, if required
  • Perform canny edge detection and get edges
  • connect edges with border
  • Fill missing pixel in edges
  • make edges logical (i.e. 0/1)
  • Complement the image
  • Perform labeling function on edges and get label 1 and total objects in label 1
  • Get biggest object number in the label 1
  • Connect objects with border
  • Perform labeling function again and get label 1 and total objects in label 1
  • Get biggest object number again in the label 1
  • Perform existing watershed method and get the label 2
  • Perform labeling function on label 2 and get total objects in label 2
  • Get biggest object number in the label 2
  • Get the size ofminimum object in label 2
  • loop through 1st object to total object in label 1
    • if current object number is equal tobiggest number in label 1 then continue
    • Get the current objects start pixel in x and y variable from label 1
    • Get the object number at x and y position in label 2
    • if object number is equal to the biggest object number of label 2 then
      • Increase the value of total objects in label 2 by one
      • Find the rows and columns pixels of current object in label 1
      • Find the total pixels (i.e. total rows or columns)in above find rows and columns

8.

      • Loop through 1st pixel to the last pixel of current object in label 1
        • Change the current pixel value at label 2 to total objects value in label 2
        • if there is other objects pixel in between rows then change the pixel to total objects value
      • continue the loop at 17
    • Get the current object size from label 1
    • Get the size ofobject number(see 17.c)
    • If current objects size is greater than object numbers size then
      • Find the rows and columns pixels of current object in label 1
      • Find the total pixels (i.e. total rows or columns)in above find rows and columns
      • Loop through 1st pixel to the last pixel of current object in label 1
        • Change the current pixel value at label 2 to object number value (see 17.c)
      • continue the loop at 17
    • If current objects size is greater than double size of minimum object in label 2
      • Find the rows and columns pixels of current object in label 1
      • Find the total pixels (i.e. total rows or columns)in above find rows and columns
      • Increase the value of total objects in label 2 by one
      • Loop through 1st pixel to the last pixel of current object in label 1
        • Change the current pixel value at label 2 to total object value
        • if there is other objects pixel in between rows then change the pixel to total objects value
      • continue the loop at 17
  • Convert the label2 to RGB and display the final enhanced watershedresult

9. Example 1 Original Image Simple Watershed Result Marker-Controlled Watershed Result My Watershed Result 10. Example 2 Original Image Marker-Controlled Watershed Result My Watershed Result 11. Example 3 Original Image Marker-Controlled Watershed Result My Watershed Result 12. Example 4 Original Image Marker-Controlled Watershed Result My Watershed Result 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 EnhancementImage No 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 EnhancementImage No 15. > 2% 36% 54% 18% Average10% 0% 25% 30% 15 1% 90% 90% 0 % 14 My watershed Watershed 1% 5% 35% 30% 13 Fault EnhancementImage No