How to graphicall​y/interact​ively select region of interest from 3D point cloud data

조회 수: 12 (최근 30일)
I am working with 3d point cloud data and interested in graphically selecting regions of interest from MATLAB figures. A possible scenario could be changing the view to one of the planes (e.g. XY plane) and drawing some contours or geometric shapes using cursor as shown below. Then selected datapoints should be stored in a workspace variable.
I found something similar for images (2d figures) but not sure how to that for 3d point cloud data.
Is something like this can be done in MATLAB?
Thanks.

채택된 답변

Bjorn Gustavsson
Bjorn Gustavsson 2019년 11월 25일
In newer versions of matlab there seems to be just such a feature, see: ROI.CUBOID
For older versions of matlab (I vaguely recall) there might be versions of ginput with extended 3-D capabilities on the file exchange: ginput-extensions
HTH
  댓글 수: 4
Qasim Nazir
Qasim Nazir 2019년 11월 26일
편집: Qasim Nazir 2019년 11월 26일
It worked out for me, thanks for your help. Final code is here.
ax = pcshow(ptCloud);
ax.View = [0,90];
%% draw roi
roi = images.roi.Polygon(ax) ;
draw(roi)
pause(3)
%% select points inside roi
x = ptCloud.Location(:,1);
y = ptCloud.Location(:,2);
mask = inROI(roi,x,y);
sub_ptCloud = select(ptCloud,mask);

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Point Cloud Processing에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by