0

I am trying to implement the Watershed algorithm for image segmentation. I applied in the pre-processing phase Median filter and Morphological Gradient, but the results are way too over segmented as seen in the pictures above. After some research on web I found that adaptive thresholding might be a solution. Otsu's method is not desirable for me, since I am trying to enhance the edges as well as possible, for a further extraction of the objects from the background.

Original elephant image:

enter image description here

Oversegmented image:

enter image description here

Thank you and hopefully you can give me an advice on how to make it work on Java since most of the solutions are in matlab!

lightstar
  • 61
  • 5
  • Try to use the https://en.wikipedia.org/wiki/Sobel_operator for the pre-processing. It is an approximation of the gradient and already contains smoothing. – maraca May 19 '17 at 01:08
  • Thank you! Still, my Morphological Gradient filter does a pretty good job at enhancing the edges, but what I would need would be a binarized version of any such filter. Applying different global threshold values, I obtained fair results for not so complex images, but a global value is clearly not the best option. Furthermore, the thresholding should be done automatically.. – lightstar May 19 '17 at 07:55

0 Answers0