Detect multiple shapes in a point cloud
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Judith Fonken
el 22 de Dic. de 2020
Respondida: Image Analyst
el 22 de Dic. de 2020
Hi all,
For my PhD project, I need to convert CT segmentations of the abdominal aorta into a mesh. As a substep in my code, I need to detect bifurcation shapes. The input of this part of the code is a point cloud of N points with X,Y,Z coordinates. Initially, the points are not ordered (first image), but I can order them in a circular manner (second image). This point cloud represents a single shape, corresponding to a part of the aorta region. In figures 3 & 4, another slice is represented using scatter and plot respectively. This point clouds represents a part of the bifurcation region, in which the aorta splits into the left and right iliac arteries. Two separate shapes can be seen. However, I haven't been able to find of think of a good code to detect the difference between contour 1 (fig 1&2, one shape) and contour 2 (fig 3&4, two shapes). All I have so far is based on the distance between points. In figure 4, the distance between one point on the first shape to one point on the shape is a lot bigger than the distance between all other points. However, using this method, I'll need to work with a threshold, which could be quite hard to determine accurately.
Therefore, I was wondering if anyone has an idea (or code) to detect the number of shapes that are present in the point cloud. So the code should give a value of 1 for the red contour (fig 1&2) and a value of 2 for the flue contour (fig 3&4). If anyone has a good idea, I'm happy to hear!

0 comentarios
Respuesta aceptada
Image Analyst
el 22 de Dic. de 2020
You could take the points and use poly2mask() to make a binary image. Then measure the aspect ratio of the binary image using regionprops():
mask = poly2mask(x, y, rows, columns);
props = regionprops(mask, 'MajorAxisLength', 'MinorAxisLength');
aspectRatios = [props.MajorAxisLength] / [props.MinorAxisLength];
Obviously the two shapes have different aspect ratios so just threshold
for k = 1 : length(props)
if aspectRatios(k) > 2 % or whatever...
% It's long shape 2
else
% It's circular shape 1.
end
end
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Point Cloud Processing en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!