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

15 visualizaciones (últimos 30 días)
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.

Respuesta aceptada

Bjorn Gustavsson
Bjorn Gustavsson el 25 de Nov. de 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 comentarios
Qasim Nazir
Qasim Nazir el 26 de Nov. de 2019
Editada: Qasim Nazir el 26 de Nov. de 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);

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Point Cloud Processing en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by