简体   繁体   English

使用迭代最近点(ICP)时如何在点云库(PCL)中标记NULL数据

[英]How to mark NULL data in Point Cloud Library (PCL) when using Iterative Closest Point (ICP)

I´m trying to align 2 sets of point clouds using the Iterative Closest Point (ICP) algorithm integrated within Point Cloud Library (PCL). 我正在尝试使用集成在点云库 (PCL)中的迭代最近点 (ICP)算法来对齐2组点云。 I´m getting an error report saying that it cant find enough correspondence points. 我得到一个错误报告,说它找不到足够的通信点。 I have already relaxed the conditions for the parameters: setEuclideanFitnessEpsilon(-1.797e+5), setMaximumIterations(40) and setRANSACIterations(2000) and still having the same problem.. (I havent found much info about which or how these conditional values should be for a proper alignement, so any help in this regard would be really appreciated too) 我已经放宽了参数的条件:setEuclideanFitnessEpsilon(-1.797e + 5),setMaximumIterations(40)和setRANSACIterations(2000)并且仍然有相同的问题..(我没有找到关于这些条件值应该是哪个或如何应该有很多信息为了适当的对齐,所以在这方面的任何帮助也将非常感激)

I´m suspecting that this problem has to do with the fact that I have many NULL data points in my cloud, which I´ve marked with the value NULL (0). 我怀疑这个问题与我的云中有很多NULL数据点的事实有关,我的数据点标记为NULL(0)。 Is that properly done when using PCL? 使用PCL时是否正确完成? Is there any NULL standard value for PCL? PCL有任何NULL标准值吗? I clearly dont want the algorithm to consider those NULL points when trying to align the data sets.. 我显然不希望算法在尝试对齐数据集时考虑那些NULL点。

Thanks for your help 谢谢你的帮助

If you are using PCL, default value of invalid data is not NULL, but is NaN. 如果您使用的是PCL,则无效数据的默认值不是NULL,而是NaN。 So if you want to mark a point as invalid, you should first include <limits> file and then set the positions to 'std::numeric_limits::quiet_NaN()'. 因此,如果要将某个点标记为无效,则应首先包含<limits>文件,然后将位置设置为“std :: numeric_limits :: quiet_NaN()”。 It is usually done like this 通常这样做

const float bad_point = std::numeric_limits<float>::quiet_NaN();
if( is_invalid_point )
    p.x = p.y = p.z = bad_point;

But anyway, configuring ICP can be a pain. 但无论如何,配置ICP可能会很痛苦。 You may have to do a lot more parameter tweaking depending on your data. 您可能需要根据数据进行更多参数调整。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM