3D Point Cloud - Gaussian Curvature

조회 수: 52 (최근 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 CenterFile Exchange에서 Point Cloud Processing에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by