Current Matlab Watershed Implementation on a Simple Image
Current Matlab Watershed Implementation on a Simple Image
Introduction The goal of this exercise is to go through the steps used in the current implementation of watershed using Matlab functions. The preprocessing steps are used to remove noise from the image and also to create markers that will be used in the final watershed segmentation. Results are included for several different types of images. 10/29/2020 Slide 2
Step 1 Original 10/29/2020 Slide 3 Gray Scale
Step 2: Gradient Gray output of gradient 10/29/2020 Slide 4 Pseudocolor output of gradient
Step 3: Erode Original Gray output after erosion Pseudocolor output after erosion Original gray image is eroded by a round structuring element with radius of 20 10/29/2020 Slide 5
Step 4: Opening by Reconstruction Gray output after opening Pseudocolor output after opening imreconstruct(marker, mask) marker=eroded image mask=gray image marker is dilated until the contours meet the mask performs a morphological opening on the image which is used to eliminate small objects or noise opening= erosion followed by dilation 10/29/2020 Slide 6
Step 5: Dilation Gray output after dilation Pseudocolor output after dilation Dilation of opened image with a round structuring element with radius 20. This step eliminates most of the features because it takes the maximum value in the structuring element. The background is white so most of the objects are assigned white values. This is where the breakdown occurs. The structuring element is too large. This dilated image is used in the process of finding the image markers, so the output is not correct. 10/29/2020 Slide 7
Results • The process continues, but the image is fairly useless. Original 10/29/2020 Slide 8 Output with no preprocessing
Results The results of the simple image after direct watershed without preprocessing are good. For a simple image the algorithm will still perform well. However the face image is oversegmented. So preprocessing is necessary. The parameters and also the transformations used in the process were designed for a specific image that contained fruit in a bowl. A different approach will have to be used for face images. 10/29/2020 Slide 9
Results Original Output During preprocessing the macbeth chart is only given one marker boundary which covers the entire image. So the output is given one label. 10/29/2020 Slide 10
Results • The next step will be to find a preprocessing method for creating markers that is more suited to the human images or a generic image. 10/29/2020 Slide 11
- Slides: 11