util3d_filtering.h: started doc and test

This commit is contained in:
matlabbe
2025-05-03 17:33:01 -07:00
parent 61d9171844
commit 79dec73030
4 changed files with 464 additions and 7 deletions
+5 -1
View File
@@ -87,7 +87,10 @@ LaserScan commonFiltering(
if(!scan.isEmpty())
{
// combined downsampling and range filtering step
if(downsamplingStep<=1 || scan.size() <= downsamplingStep)
if(downsamplingStep<=1 ||
scan.size() <= downsamplingStep ||
(scan.data().rows > scan.data().cols && scan.data().rows <= downsamplingStep) ||
(scan.data().cols > scan.data().rows && scan.data().cols <= downsamplingStep))
{
downsamplingStep = 1;
}
@@ -325,6 +328,7 @@ LaserScan commonFiltering(
if(scan.size() && !scan.is2d() && scan.hasNormals() && groundNormalsUp>0.0f)
{
// FIXME: the viewpoint should be 0,0,0 here as we don't apply the local transform
scan = util3d::adjustNormalsToViewPoint(scan, Eigen::Vector3f(0,0,10), groundNormalsUp);
}
}