Fitting a plane through a 3D point data

조회 수: 18 (최근 30일)
ha ha
ha ha 2018년 5월 6일
편집: Matt J 2018년 5월 6일
For example, i have 3d point cloud data [xi, yi, zi] as the attachment .txt file. I want to fit a plane to a set of 3D point data. What kind of method to do that?
  댓글 수: 1
Matt J
Matt J 2018년 5월 6일
How does one know that M and L are different planes and not just noise? Is there a known upper bound on the noise? A known lower bound on the separation distance between M and L?

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

채택된 답변

Matt J
Matt J 2018년 5월 6일
You will probably have to implement a RANSAC plane fitting routine.
  댓글 수: 5
ha ha
ha ha 2018년 5월 6일
Thanks.
Matt J
Matt J 2018년 5월 6일
편집: Matt J 2018년 5월 6일
One approach you might consider is to take planar cross sections of your data. This will give 2D data for a line, with outliers. Then you can apply a ready-made RANSAC line-fitter, like the one I linked you to. From line fits in two or more cross-secting planes you should be able to construct the desired plane K.

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

추가 답변 (2개)

Walter Roberson
Walter Roberson 2018년 5월 6일
data = load('1.txt');
coeffs = [data(:,1:2), ones(size(data,1),1)]\data(:,3);
The equation of the plane is then coeffs(1)*x + coeffs(2)*y - coeffs(3) = z
  댓글 수: 1
ha ha
ha ha 2018년 5월 6일
편집: ha ha 2018년 5월 6일
From your answer, I plot the surface as below image. But That plane is not same as my expected plane. If we use the formulas as your proposed method, the plane is fitting through all points & will be slightly different with my expected plane K(=plane M)

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


Matt J
Matt J 2018년 5월 6일
편집: Matt J 2018년 5월 6일
xyz=load('1.txt');
xyz(xyz(:,2)>40, :)=[];
mu=mean(xyz,1);
[~,~,V]=svd(xyz-mu,0);
normal=V(:,end).';
d=normal*mu';
The equation of the plane is then xyz*normal.' = d
  댓글 수: 3
ha ha
ha ha 2018년 5월 6일
In my question: Plane M contains a large number of point data when compared with plane L(i.e., 90%). I wanna find the plane can cover large number points as plane M. Example: in the general, there are some outlier(or noise) points. So, the result will be affected significantly. Because you are using "least square regression method" as I guessed
Matt J
Matt J 2018년 5월 6일
How does one know that M and L are different planes and not just noise? Is there a known upper bound on the noise? A known lower bound on the separation distance between M and L?

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

카테고리

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