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

12 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

Bjorn Gustavsson
Bjorn Gustavsson il 25 Nov 2019
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 Commenti
Qasim Nazir
Qasim Nazir il 26 Nov 2019
Modificato: Qasim Nazir il 26 Nov 2019
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);

Accedi per commentare.

Più risposte (0)

Prodotti


Release

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by