3D Point Clouds: "findPointsInROI" and "select" not working

3 views (last 30 days)
Hi there!
I am working with LiDAR point cloud data and would like to select some points of my point cloud which are located within a region of interest (ROI).
I know that there are the functions findPointsInROI and select, and I used them before for "simple" point clouds (i.e. with only one frame).
However, now I have a more "complex" point cloud, i.e. one where I have put several frames (60 frames) into the same point cloud, see below:
If I try to use the same functions as I did with the "simple" point cloud for this point cloud, they are not working:
roi = [xlimits, ylimits, zlimits];
%Find indices of the points that lie within the cuboid ROI
indices = findPointsInROI(ptCloud,roi);
%put points of interest from original pt Cloud into new pt Cloud
ptCloudB = select(ptCloud,indices);
It is not that there is an error message, but the "indices" vector I get does not make any sense (i.e. it does not contain the number of the points which are within the ROI) and the resulting, selected point cloud "ptCloudB" only contains 1 (instead of 60) frames.
Is there any solution to make those functions work?
Thanks!

Accepted Answer

Raunak Gupta
Raunak Gupta on 29 Apr 2020
Hi,
From the file I can see that the point cloud that is read is essentially an organized point cloud. So, it is a single point cloud only. The selected point cloud ptCloudB that is outputted by findPointsInROI and select is an unorganized ptCloud but contains the points that are there in ROI and original point cloud.
I assume the frames that are mentioned in question are not meant to be different unorganized point clouds otherwise if that is the case, you need to give each point cloud separately to the findPointsInROI. If you are unsure that the original point cloud in the question is organized on not you may view the actual and selected point cloud using an example mentioned here.
Hope it clarifies the queries.
  2 Comments
Raffaele Spielmann
Raffaele Spielmann on 30 Apr 2020
Hi,
Thanks a lot for your answer. I am still quite confused about the organized / unorganized point cloud definition. I had a look at your example, but I still don't understand wheter my point cloud is organized or not.
What my point cloud is, is basically a MxNx3 array (60x129792x3) where I thought
  • M = number of frames (where each frame is different, because it was taken at a different time),
  • N = number of points per frame,
  • 3 = xyz-coord. of each frame.
Is this correct? And should it be an organized or unorganized point cloud now?
Thanks a lot!
Raunak Gupta
Raunak Gupta on 30 Apr 2020
Hi,
The point cloud that you working with is organized point cloud only. You can look at an answer that tell about how the organized point cloud are stored in reality and the benefits of organized point clouds. According to the point cloud documentation M is the width i.e. Number of points in a row and N is the height which specifies total number of rows in point cloud.
It is said organised because the structure is similar to a matrix or an image.
The point cloud can be in any form organized and unorganized so the algorithms works on both. Just the advantage of organized point cloud is due to a matrix like structure finding the nearest neighbour becomes easy as compared to organized point cloud.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!