Removing connecting pixel from corner-touching objects.
显示 更早的评论
I have a binary array that has thousands of irregularly shaped objects in it. Occasionally, the corners of two objects touch. How can remove that pixel so that this one object becomes 2 objects? I know i can erode all objects but that affects the area of the objects, which is important to me.
0 0 0 0 0 1 1 1 1 1 1
0 0 0 0 0 1 1 1 1 0 0
1 1 1 1 1 0 0 0 0 0 0
1 1 1 1 1 0 0 0 0 0 0
回答(1 个)
Image Analyst
2014-5-15
0 个投票
If you use four connected processing, it won't be touching. Look for that in the input. Most of the functions (e.g. bwlabel) assume 8-connected but will let you specify.
类别
在 帮助中心 和 File Exchange 中查找有关 3-D Volumetric Image Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!