Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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). 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)

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). Is that properly done when using PCL? Is there any NULL standard value for PCL? I clearly dont want the algorithm to consider those NULL points when trying to align the data sets..

Thanks for your help

like image 967
Nicolai Avatar asked Feb 16 '23 03:02

Nicolai


1 Answers

If you are using PCL, default value of invalid data is not NULL, but is 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()'. 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. You may have to do a lot more parameter tweaking depending on your data.

like image 111
Kourosh Avatar answered Feb 27 '23 09:02

Kourosh