3D Point Cloud - Gaussian Curvature

6 ビュー (過去 30 日間)
RiHo
RiHo 2019 年 11 月 25 日
コメント済み: darova 2019 年 12 月 4 日
Hello All.
I have a 3D point cloud data (X [m]; Y[m]; Z[m]). And I want to calculate the value of some curvature (e.g. gaussian) in every point of the point cloud. Based on these curvature information I would select the points, that may belong to some geometric shape in the point cloud (e. g. to some planes, spheres etc.).
Is there a built in function for it in Matlab, like normals() for normal vector estimation? Or does anyone know a way how to do this? It should be fast and dont need to be really precise, because it is only a pre-processing step.
Thanks in Advance,
Richard

採用された回答

darova
darova 2019 年 11 月 26 日
one way
clc,clear
% generate some data
r = 3;
t = linspace(0,10)';
x = r*cos(t);
y = r*sin(t);
z = sin(1*t);
t1 = t(2:end) - diff(t)/2;
dv = diff([x y z])./diff([t t t]); % first derivative at midpoints
d2v= diff(dv)./diff([t1 t1 t1]); % second derivative at points [2:end-1]
dv = 1/2*( dv(1:end-1,:) + dv(2:end,:) );% first derivative at points [2:end-1]
[dx,dy,dz] = deal( dv(:,1),dv(:,2),dv(:,3) );
[d2x,d2y,d2z] = deal( d2v(:,1),d2v(:,2),d2v(:,3) );
% curvature
kk = (d2z.*dy - d2y.*dz).^2 + (d2x.*dz - d2z.*dx).^2 + (d2y.*dx - d2x.*dy).^2;
kk = sqrt(kk) ./ (dx.^2+dy.^2+dz.^2).^(3/2);
% radius
RR1 = 1./kk;
plot(t(2:end-1),RR1)
03b2b952dac167188878f3898be17b9861c3c86a
  10 件のコメント
RiHo
RiHo 2019 年 12 月 4 日
I dont think so, because scanned point clouds have really rugged surface, like when you imagine point cloud of complex objects like buildings and so on. There are lot of complicated surfaces.
That's why I'm fitting a local small plane in every point for point normal vector computation, like in pcnormals.
darova
darova 2019 年 12 月 4 日
If you can get normals for neighbouring points:
alpha = acos(dot(n1,n2));
123.png

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePoint Cloud Processing についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by