Azzera filtri
Azzera filtri

Detection of 3D blobs with flat surfaces

4 visualizzazioni (ultimi 30 giorni)
I have a 3D gray-scale array that represents a bag with several objects inside. I need to find (segment) any object with flat surface/s in the bag. Knowing the approximate intensity range of these objects, I binarized the volume, and removed objects with volumes below a threshold.
The result was getting some of those objects as individual blobs and some attached to nearby objects.
Now, I would like to detect blobs with flat surfaces. Any suggestion?
  2 Commenti
darova
darova il 25 Ago 2019
What do you mean by 'flat blob'?
11Untitled.png
Roohollah Milimonfared
Roohollah Milimonfared il 26 Ago 2019
Modificato: Roohollah Milimonfared il 26 Ago 2019
That's right. Only expand it to 3D. An example of a 3D blob with flat surfaces is a cylinder (flat surfaces at its two ends).
In my problem, the blobs have more complicated shapes, but some have flat surfaces that I would like to use as a characteristic to detect them.

Accedi per commentare.

Risposta accettata

Image Analyst
Image Analyst il 26 Ago 2019
Modificato: Image Analyst il 26 Ago 2019
Try convhulln() and extract any blob that has points on the convex hull.
  4 Commenti
Roohollah Milimonfared
Roohollah Milimonfared il 26 Ago 2019
Modificato: Roohollah Milimonfared il 26 Ago 2019
stats = regionprops3(blob,'ConvexImage','ConvexHull','VoxelList');
The binary blob (right) and its ConvexImage (left):
blob.png
C = intersect(stats.ConvexHull{1,1},stats.VoxelList{1,1},'rows');
C is empty which means the blob has no point on its convex hull.
Below is the plot of voxels (red) and convex hull points (blue). On the top surface, the convex hull points are located at the edges. Can we use this fact to say it is a (nearly) flat surface?
blob1.png
Roohollah Milimonfared
Roohollah Milimonfared il 26 Ago 2019
Modificato: Roohollah Milimonfared il 26 Ago 2019
I have come up with this trivial solution.
In this problem, the direction of the flat surface is fixed (y-axis is always the axis normal to the flat surface). Sort the y-coordinates (the first column in ConvexHull) in descending order:
ConvexHull = stats.ConvexHull{1,1};
ConvexHull = sortrows(ConvexHull,1,'descend');
Find the Standard Deviation of the first 10% of the ConvexHull coordinates.
threshold = size(ConvexHull,1) * 0.1;
y_coor = ConvexHull(1:threshold,1);
x_coor = ConvexHull(1:threshold,2);
z_coor = ConvexHull(1:threshold,3);
y_std = std(y_coor) % 0.948
x_std = std(x_coor) % 23.676
z_std = std(z_coor) % 49.474
The value of y-std found to be significantly lower than its counterparts (x_std & z_std).
The positions of the 10% of the ConvexHull points in the blob indicates there should be a lower STD for y-coordinates:
Still, need to verify this for my other random-shaped blobs with flat surfaces.
Thoughts and opinions on this is much appreciated.

Accedi per commentare.

Più risposte (1)

darova
darova il 26 Ago 2019
What about boundary()?
BoundaryOf3DPointCloudExample_02.png
Once you have boundary faces: find all neighbour faces for each node
If angles between surfaces is about zero then we have a flat face
12Untitled.png

Categorie

Scopri di più su Bounding Regions in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by