Single objects from binary volume

I am using MATLAB.

I have a three dimensional array filled with booleans. This array represents data about a cylinder with N uniformly formed, but arbitrary oriented brackets in it. The volume is sampled in voxels (3-dimensional pixels), and a logical “1” means “at this point in the cylinder IS is part of the bracket”, and “0” means “air at this point in the cylinder”. The following figure contains ONE two-dimensional fragment of the full volume. Imagine a full volume consisting of such slices. White means "1" and black means "0". one slice of the volume

To my problem now: I have to separate each clip as best as possible. The output products must be N three-dimensional arrays, with only voxels belonging to a particular staple being "1", and everything else is "0". So I have arrays containing only data of one binding.

The biggest problem is that “1 of the different staples can lie next to each other (touch and tangled) , which makes it difficult to decide which main object they belong to. The simplification is that the staple boundary voxels can be trimmed , I can work with any output array that preserves the approximate shape of the original stitching.

Perhaps some of you can give an idea of ​​how you can solve such a problem or even call me algorithms that I can take a look at. Thanks in advance.

+4
source share
1 answer

Since paper clips are many pixel objects, you can reduce noise by using 3D median filtering or bwareaopen to get started. Then bwlabeln can be used to mark connected components in a binary array. Then you can use REGIONPROPS to further analyze each connected object and see if it is a standalone bond or more. This can be done using functions such as Perimeter to identify different cases, but you will have to examine these and other regionprops functions themselves.

+2
source

Source: https://habr.com/ru/post/1482863/


All Articles