上一次讲了基于地图的约束测量画图,今天说一下点云的曲线重建。例如:
numpts = 192;
t = linspace( -pi, pi, numpts+1 )';t(end) = [];r = 0.1 + 5*sqrt( cos( 6*t ).^2 + (0.7).^2 );x = r.*cos(t);y = r.*sin(t);ri = randperm(numpts);x = x(ri);y = y(ri);dt = delaunayTriangulation(x,y);tri = dt(:,:);V = dt.voronoiDiagram();V(1,:) = [];numv = size(V,1);dt.Points(end+(1:numv),:) = V;delEdges = dt.edges();validx = delEdges(:,1) <= numpts;validy = delEdges(:,2) <= numpts;boundaryEdges = delEdges((validx & validy), :)';xb = x(boundaryEdges);yb = y(boundaryEdges);clf;triplot(tri,x,y);axis equal;hold on;plot(x,y,'*r');plot(xb,yb, '-r');xlabel('点云的曲线重建', 'fontweight','b');hold off;复制代码显示:
作者: curton, 来源:面包板社区
链接: https://mbb.eet-china.com/blog/uid-me-3876349.html
版权声明:本文为博主原创,未经本人允许,禁止转载!
文章评论(0条评论)
登录后参与讨论