Interpolating points of a 3D point cloud

조회 수: 4 (최근 30일)
Meghana Dinesh
Meghana Dinesh 2015년 6월 4일
댓글: Gaurav 2016년 3월 7일
I have two questions:
1. I have a 3D point cloud which isn't continuous. There are a few gaps in it. I want to interpolate this data and fill in those gaps.
(I have attached the point cloud and code to display it on MATLAB here .)
I came across functions like triscatteredInterp and scatteredInterpolant. I did not understand how to proceed with this in my case. Kindly help me here. I am getting a blank output.
This is what I am doing:
figure,
x = PointCloud(:,:,1);
x_max = max(x(:))
x_min = min(x(:))
y = PointCloud(:,:,2);
y_max = max(y(:))
y_min = min(y(:))
z = PointCloud(:,:,3);
[xi,yi] = meshgrid(x_max:0.01:x_min, y_max:0.01:y_min);
xyz_2D = cat(2,x(:),y(:),z(:));
pointcloud_2D = xyz_2D(~any(isnan(xyz_2D)|isinf(xyz_2D),2),:);
zi = griddata(pointcloud_2D(:,1),pointcloud_2D(:,2),pointcloud_2D(:,3),xi,yi);
surf(xi,yi,zi); xlabel('x') ylabel('y') zlabel('Depth')
2. My second question is: looking at the point cloud, I want to remove those parts which have lesser number of connected pixels. The way we have bwlabel for 2D Images, is there any function in MATLAB which outputs labels for 8 connected objects? This way, I can disregard the one with lesser number of points connected.
  댓글 수: 1
Gaurav
Gaurav 2016년 3월 7일
Hi @Meghana did you found a good approach for your first question? If yes Can you please tell how you solved it.
Thanks

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

답변 (1개)

Fabio Freschi
Fabio Freschi 2015년 6월 4일
Does triscatteredinterp make the job?
  댓글 수: 1
Meghana Dinesh
Meghana Dinesh 2015년 6월 5일
Nope, I wasn't able to execute it using this function as well.

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

카테고리

Help CenterFile Exchange에서 Point Cloud Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by