Watershed algorithm: why is my 4-connected watershed 8-connected?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Jennika Hammar
el 3 de Feb. de 2020
Respondida: Image Analyst
el 3 de Feb. de 2020
Hello,
I did watershed segmentation of my image using the distance transform. I wonder why I get a 8-connected watershed when specifying a 4-connectivty and vice versa?
i_ws4 = watershed(im, 4);
imshow(i_ws4)
![b4.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/269714/b4.png)
i_ws8 = watershed(im);
imshow(i_ws8)
![b8.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/269715/b8.png)
Thanks
0 comentarios
Respuesta aceptada
Image Analyst
el 3 de Feb. de 2020
With your top image, the four white blobs are separated according to 4-connectivity. That is, they touch at the pixel corners but that is not considered to be a connection like they're the same blob.
However with 8 connectivity they WOULD be connected, so it had to make the black lines larger so that the four white blobs don't touch each other, even at the pixel corners.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Image Processing Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!