fitting a curve (3D) to pointcloud data
古いコメントを表示
Hello
I have a pointcloud from which I want to extract the border of a street. I have manually created sampling datapoints using the datacursor.
Now I have a list of x, y, z points from which I want to derive a curve (road boarder).
What is the best method of making such a curve given a list of x y z points. It should be smooth.
Thanks for any help!
採用された回答
その他の回答 (3 件)
Amir Suhail
2020 年 1 月 1 日
1 投票
Hi,
I have similar question. I want to take equdistant points (say N points ) on smooth approximating curve through my data points (x,y,z).
jigsaw
2019 年 9 月 21 日
Are Mjaavatten's answer works great for me. The following lines can be modified a bit to be more concise. Replace the
s = zeros(size(x));
for i = 2:length(x)
s(i) = s(i-1) + sqrt((x(i)-x(i-1))^2+(y(i)-y(i-1))^2+(z(i)-z(i-1))^2);
end
with
s = [0;cumsum(flip(sqrt((x(end:-1:2)-x(end-1:-1:1)).^2+(y(end:-1:2)-y(end-1:-1:1)).^2+(z(end:-1:2)-z(end-1:-1:1)).^2)))];
1 件のコメント
darova
2019 年 9 月 21 日
there is helpful function: diff()
deb.P
2019 年 11 月 8 日
0 投票
i have a question: i have fitted a curve to my 3 variable data set according to the code Are Mjaavatten has mentioned. Now i want to know what is the equation of the fitted curve.
1 件のコメント
Are Mjaavatten
2019 年 11 月 9 日
If you have used the polyfit version, px, py and pz give the coefficients for the fitted polynomials in s. See the docmentation for polyfit for details.
If you used spline, the expressions are piecewise cubic spline polynomials. Se the documentation for spline for details.
カテゴリ
ヘルプ センター および File Exchange で Vehicle Scenarios についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!