필터 지우기
필터 지우기

How to filter certain points out of a 3D point cloud?

조회 수: 3 (최근 30일)
lucca k
lucca k 2015년 10월 26일
댓글: lucca k 2015년 11월 3일
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!

채택된 답변

Bjorn Gustavsson
Bjorn Gustavsson 2015년 10월 26일
Assuming that xyzPoints are an [nPoints x 3] array you might do this:
xyzPoints(xyzPoints(:,3)==0,:) = [];
HTH
  댓글 수: 2
lucca k
lucca k 2015년 10월 26일
the 3-D point cloud is returned as an M-by-N-by-3 matrix
lucca k
lucca k 2015년 11월 3일
and what if I want to delete the whole row then? not just the Z value. also the according x and y values.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by