Thinning lines preserving 4-connectivity

3 ビュー (過去 30 日間)
Luis Rosety
Luis Rosety 2022 年 6 月 24 日
コメント済み: Image Analyst 2022 年 6 月 24 日
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.
This is part of the original image. Please notice the bottom double thick segments.
Result after bwmorph(BW,'skel');
Is there any similar function for thinning the lines but preserving 4-connectivity?
Thanks

回答 (1 件)

Image Analyst
Image Analyst 2022 年 6 月 24 日
There does not seem to be an option to skeletonize with bwskel or bwmorph to create a skeleton with 4-connectivity. It looks like 8-connectivity is the only option. Why do you need an option to have it be 4-connected?
  2 件のコメント
Luis Rosety
Luis Rosety 2022 年 6 月 24 日
Thanks for the information!
But this image needs 4-connectivity for futher processing being limited so far to this connectivity.
Image Analyst
Image Analyst 2022 年 6 月 24 日
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.

サインインしてコメントする。

製品


リリース

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by