C Watershed Implementation Slide 1 Gradient The gradient

  • Slides: 9
Download presentation
C++ Watershed Implementation Slide 1

C++ Watershed Implementation Slide 1

Gradient The gradient is used to build a topographical representation of the image. grayscale

Gradient The gradient is used to build a topographical representation of the image. grayscale gradient flooding through a gap in a contour dam is not built intensity=height above sea level The drawback is that if there any gaps in the ridges the algorithm will not know when to build a dam 9/5/2021 Slide 2

Gradient Watershed Segmentation Small changes in the gradient value cause the image to be

Gradient Watershed Segmentation Small changes in the gradient value cause the image to be oversegmented. The ideal situation would be to have a high value at the edges of the important features and to have zero everywhere else. We need to find a solution to both of these problems, one that will form a strong continous contour around the features and reduce the amount of noise edges that cause oversegmentation. 9/5/2021 Slide 3

Processing Methods Blur -reduces amount of noise edges -also reduces the strength of feature

Processing Methods Blur -reduces amount of noise edges -also reduces the strength of feature edges Thresholding -eliminates edges formed by small variations in intensity -weak feature edges can’t be distinguished from noise and will be removed -there is no universal parameters that will work for all images Marker-based approach -a marker approach uses some kind of a priori information to better segment the image -we can use the fact that connected areas of similar gray level should almost always be kept whole -there is still a problem over which data to trust. If the gradient results in an edge that splits a region of similar gray level which action is chosen? 9/5/2021 Slide 4

Processing Methods The best solution is one that segments the most useful features with

Processing Methods The best solution is one that segments the most useful features with minimal noise. How to define the best segmentation? This may be subjective, but we can start by assuming we only want to segment the face from our images. A perfect segmentation would be one object, the face, and the background. The worst segmentation would be one with many small areas segmented. Ideal Non-Ideal The difference between these two segments can be viewed statistically. For example if we throw out the largest and smallest regions and average the remaining regions the average of the ideal segmentation should be larger. 9/5/2021 Slide 5

Processing Methods • Theory is that if we can develop a metric for the

Processing Methods • Theory is that if we can develop a metric for the segmentation then we can use preprocessing to determine the best parameters to use in the final watershed. Example 1: selection based on largest average size of markers Q 128 64 32 16 8 4 Avg 30 43 61 100 351 Parameter: quantization levels of the grayscale image Output using selected parameter 9/5/2021 Slide 6

Processing Methods Example 2: selection based on largest average size of markers T 128

Processing Methods Example 2: selection based on largest average size of markers T 128 64 32 16 8 4 Avg 215 110 277 169 83 32 Parameter: threshold level of the gradient image Output using selected parameter 9/5/2021 Slide 7

Summary • Develop a metric to determine the effectiveness of segmentation using certain parameters

Summary • Develop a metric to determine the effectiveness of segmentation using certain parameters • Vary these parameters and find the ones that scores the highest • Use these parameters to preprocess the image • Perform watershed segmentation on the preprocessed image 9/5/2021 Slide 8

Power. Point Video Test Justin has also been helping me to work on displaying

Power. Point Video Test Justin has also been helping me to work on displaying image sequences in presentations. Here is an example/test. 9/5/2021 Slide 9