3D Point Clouds: "findPointsInROI" and "select" not working
3 views (last 30 days)
Show older comments
Raffaele Spielmann
on 24 Apr 2020
Commented: Raunak Gupta
on 30 Apr 2020
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!
0 Comments
Accepted Answer
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
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.
More Answers (0)
See Also
Categories
Find more on Point Cloud Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!