Detection of 3D blobs with flat surfaces

7 visualizaciones (últimos 30 días)
Roohollah Milimonfared
Roohollah Milimonfared el 25 de Ag. de 2019
Respondida: darova el 26 de Ag. de 2019
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 comentarios
darova
darova el 25 de Ag. de 2019
What do you mean by 'flat blob'?
11Untitled.png
Roohollah Milimonfared
Roohollah Milimonfared el 26 de Ag. de 2019
Editada: Roohollah Milimonfared el 26 de Ag. de 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.

Iniciar sesión para comentar.

Respuesta aceptada

Image Analyst
Image Analyst el 26 de Ag. de 2019
Editada: Image Analyst el 26 de Ag. de 2019
Try convhulln() and extract any blob that has points on the convex hull.
  4 comentarios
Roohollah Milimonfared
Roohollah Milimonfared el 26 de Ag. de 2019
Editada: Roohollah Milimonfared el 26 de Ag. de 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 el 26 de Ag. de 2019
Editada: Roohollah Milimonfared el 26 de Ag. de 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.

Iniciar sesión para comentar.

Más respuestas (1)

darova
darova el 26 de Ag. de 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

Categorías

Más información sobre Bounding Regions en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by