3D Point Cloud - Gaussian Curvature
53 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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
0 Kommentare
Akzeptierte Antwort
darova
am 26 Nov. 2019
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)
10 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Point Cloud Processing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!