how do I remove points from the outer edge of a point cloud?
이전 댓글 표시
I have several sets of point cloud data. All of them are almost perfectly planar, save for a small indentation near the center (cratering experiments). In a few of these, edge effects cause some of the points along the edge to be lower than the plain. This causes later code to mess up and identify that edge as the center of the crater (see the attached figures).
The simplest thing I can think of is to remove all of the points within some distance of the outer boundary of my point cloud, but I'm having trouble setting that up. The code would look something like this:
radius = 10;
xs = ptCloud(:,1).Location;
ys = ptCloud(:,2).Location;
zs = ptCloud(:,3).Location;
k = boundary(xs,ys);
for i = 1:length(k)
% something that sets points within 'radius' of xs(k), ys(k), & zs(k)
% to NaN
end
% make a temporary point cloud out of my NaNed points
ptCloud_temp = pointCloud([xs,ys,zs]);
ptCloud_new = removeInvalidPoints(ptCloud_temp);
What thoughts do y'all have on how to set those points to NaN?
Is there a better way to do this?
Thanks
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Process Point Clouds에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!