点云的一致法线计算 [英] Consistent normal calculation of a point cloud

查看:37
本文介绍了点云的一致法线计算的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

python 或 c++ 中是否有一个库能够以一致的方式估计点云的法线?以一致的方式,我的意思是法线的方向在表面上全局保留.

例如,当我使用 python open3d 包时:

<块引用>

downpcd.estimate_normals(search_param=o3d.geometry.KDTreeSearchParamHybrid(半径=4,max_nn=300))

我得到了不一致的结果,其中一些法线指向内部,而其余法线指向外部.

非常感谢

解决方案

如果您知道捕获每个点的视点,则可以使用它来定向法线.我认为情况并非如此 - 因此,鉴于您的情况,看起来相当不透水且采样均匀,网格重建很有希望.

PCL 库在 surface 模块中提供了许多替代方案.为了正常估计,我会从以下任一开始:

虽然很简单,但它们应该足以产生一个连贯的网格.

一旦有了网格,每个三角形就定义了一个法线(叉积).需要注意的是,网格不仅仅是独立面的集合.面是相连的,这种连通性在整个网格中强制一致的方向.

pcl::PolygonMesh 是一个半边数据结构".这意味着每个三角形面都由一组有序的顶点定义,这些顶点定义了方向:顶点顺序 => 叉积顺序 => 明确定义的法线

您可以使用网格(最近邻)的法线,也可以计算低分辨率网格并仅使用它来确定云的方向.

Is there a library in python or c++ that is capable of estimating normals of point clouds in a consistent way? In a consistent way I mean that the orientation of the normals is globally preserved over the surface.

For example, when I use python open3d package:

downpcd.estimate_normals(search_param=o3d.geometry.KDTreeSearchParamHybrid(
    radius=4, max_nn=300))

I get an inconsistent results, where some of the normals point inside while the rest point outside.

many thanks

解决方案

If you know the viewpoint from where each point was captured, it can be used to orient the normals. I assume that this not the case - so given your situation, which seems rather watertight and uniformly sampled, mesh reconstruction is promising.

PCL library offers many alternatives in the surface module. For the sake of normal estimation, I would start with either:

Although simple, they should be enough to produce a single coherent mesh.

Once you have a mesh, each triangle defines a normal (the cross product). It is important to note that a mesh isn't just a collection of independent faces. The faces are connected and this connectivity enforces a coherent orientation across the mesh.

pcl::PolygonMesh is an "half edge data structure". This means that every triangle face is defined by an ordered set of vertices, which defines the orientation: order of vertices => order of cross product => well defined unambiguous normals

You can either use the normals from the mesh (nearest neighbor), or calculate a low resolution mesh and just use it to orient the cloud.

这篇关于点云的一致法线计算的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆