Fitting a plane through a 3D point data
显示 更早的评论
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
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?
采纳的回答
更多回答(2 个)
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
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
类别
在 帮助中心 和 File Exchange 中查找有关 Process Point Clouds 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


