MATLAB Answers

0

Removing connecting pixel from corner-touching objects.

Asked by Rainer on 15 May 2014
Latest activity Answered by Image Analyst
on 15 May 2014
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

  0 Comments

Sign in to comment.

1 Answer

Answer by Image Analyst
on 15 May 2014

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.

  0 Comments

Sign in to comment.