Thinning lines preserving 4-connectivity
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi
I have bw 4-connectivity images where some lines are too thick and I am looking for a method to thinning them but preserving 4-connectivity.
So far I only find the bwmorph 'skel' option but it converts to 8 connectivity.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1044675/image.png)
This is part of the original image. Please notice the bottom double thick segments.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1044680/image.png)
Result after bwmorph(BW,'skel');
Is there any similar function for thinning the lines but preserving 4-connectivity?
Thanks
0 Kommentare
Antworten (1)
Image Analyst
am 24 Jun. 2022
2 Kommentare
Image Analyst
am 24 Jun. 2022
When I asked "Why?", you basically said "because it does", which is not an explanation.
You can just scan the image and if you find certain patterns, like a diagonal pattern, to fill in a pixel. There should be just a handful of possible patterns that are not 4-connected.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!