How to filter certain points out of a 3D point cloud?
5 次查看(过去 30 天)
显示 更早的评论
Hello everybody,
I got a 3D point cloud which is already in the world coordinate system. I got the data from a Kinect sensor. As I want to build an occupancy grid out of the data, I need to filter out all points with Z=0. I need to do this because Z is the vertical and if Z = 0, there is no obstacle on the way. To get the point cloud I used
xyzPoints = depthToPointCloud(depthImage,depthDevice);
So in the end I want to have just the points left I can plot into the 2D grid.
Thank you very much for any help!
0 个评论
采纳的回答
Bjorn Gustavsson
2015-10-26
Assuming that xyzPoints are an [nPoints x 3] array you might do this:
xyzPoints(xyzPoints(:,3)==0,:) = [];
HTH
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Kinect For Windows Sensor 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!