Detect multiple shapes in a point cloud
조회 수: 4 (최근 30일)
이전 댓글 표시
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
채택된 답변
Image Analyst
2020년 12월 22일
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Point Cloud Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!