RTAB-Map 0.23.10
Real-Time Appearance-Based Mapping
Loading...
Searching...
No Matches
Point Normal Filtering

Filters points in a point cloud based on the angle between their estimated surface normals and a given reference normal. More...

Functions

pcl::IndicesPtr RTABMAP_CORE_EXPORT rtabmap::util3d::normalFiltering (const pcl::PointCloud< pcl::PointXYZ >::Ptr &cloud, float angleMax, const Eigen::Vector4f &normal, int normalKSearch, const Eigen::Vector4f &viewpoint, float groundNormalsUp=0.0f)
 Point normal filtering for point cloud of type pcl::PointXYZ.
 
pcl::IndicesPtr RTABMAP_CORE_EXPORT rtabmap::util3d::normalFiltering (const pcl::PointCloud< pcl::PointXYZRGB >::Ptr &cloud, float angleMax, const Eigen::Vector4f &normal, int normalKSearch, const Eigen::Vector4f &viewpoint, float groundNormalsUp=0.0f)
 Point normal filtering for point cloud of type pcl::PointXYZRGB.
 
pcl::IndicesPtr RTABMAP_CORE_EXPORT rtabmap::util3d::normalFiltering (const pcl::PointCloud< pcl::PointXYZ >::Ptr &cloud, const pcl::IndicesPtr &indices, float angleMax, const Eigen::Vector4f &normal, int normalKSearch, const Eigen::Vector4f &viewpoint, float groundNormalsUp=0.0f)
 Point normal filtering for point cloud of type pcl::PointXYZ.
 
pcl::IndicesPtr RTABMAP_CORE_EXPORT rtabmap::util3d::normalFiltering (const pcl::PointCloud< pcl::PointXYZRGB >::Ptr &cloud, const pcl::IndicesPtr &indices, float angleMax, const Eigen::Vector4f &normal, int normalKSearch, const Eigen::Vector4f &viewpoint, float groundNormalsUp=0.0f)
 Point normal filtering for point cloud of type pcl::PointXYZRGB.
 
pcl::IndicesPtr RTABMAP_CORE_EXPORT rtabmap::util3d::normalFiltering (const pcl::PointCloud< pcl::PointXYZI >::Ptr &cloud, const pcl::IndicesPtr &indices, float angleMax, const Eigen::Vector4f &normal, int normalKSearch, const Eigen::Vector4f &viewpoint, float groundNormalsUp=0.0f)
 Point normal filtering for point cloud of type pcl::PointXYZI.
 
pcl::IndicesPtr RTABMAP_CORE_EXPORT rtabmap::util3d::normalFiltering (const pcl::PointCloud< pcl::PointNormal >::Ptr &cloud, const pcl::IndicesPtr &indices, float angleMax, const Eigen::Vector4f &normal, int normalKSearch, const Eigen::Vector4f &viewpoint, float groundNormalsUp=0.0f)
 Point normal filtering for point cloud of type pcl::PointNormal.
 
pcl::IndicesPtr RTABMAP_CORE_EXPORT rtabmap::util3d::normalFiltering (const pcl::PointCloud< pcl::PointXYZRGBNormal >::Ptr &cloud, const pcl::IndicesPtr &indices, float angleMax, const Eigen::Vector4f &normal, int normalKSearch, const Eigen::Vector4f &viewpoint, float groundNormalsUp=0.0f)
 Point normal filtering for point cloud of type pcl::PointXYZRGBNormal.
 
pcl::IndicesPtr RTABMAP_CORE_EXPORT rtabmap::util3d::normalFiltering (const pcl::PointCloud< pcl::PointXYZINormal >::Ptr &cloud, const pcl::IndicesPtr &indices, float angleMax, const Eigen::Vector4f &normal, int normalKSearch, const Eigen::Vector4f &viewpoint, float groundNormalsUp=0.0f)
 Point normal filtering for point cloud of type pcl::PointXYZINormal.
 

Detailed Description

Filters points in a point cloud based on the angle between their estimated surface normals and a given reference normal.

This function estimates surface normals for each point (or subset of points) in the input point cloud, and retains only those points whose normals are within angleMax radians from the given reference normal.

If groundNormalsUp is set, normals that are facing significantly downward (based on the Z-axis) may be flipped to point upwards before comparison, especially useful for handling sensors like Velodyne where some road-facing rays produce downward normals.

Parameters
cloudThe input point cloud to process. If the input cloud type doesn't have normals, the normals will be computed using normalKSearh and viewpoint parameters.
indicesOptional subset of indices in cloud to consider. If empty, the entire cloud is used.
angleMaxMaximum allowed angle (in radians) between estimated normals and the given reference normal.
normalThe reference normal vector to compare against (must be normalized).
normalKSearchNumber of nearest neighbors used for normal estimation, when input cloud doesn't have normals.
viewpointThe viewpoint position to be used in normal estimation (can affect direction of normals).
groundNormalsUpThreshold used to detect and flip ground-facing normals (set to 0.0f to disable). If the Z component of a normal is less than -groundNormalsUp and the corresponding point is below the viewpoint, the normal will be flipped.
Returns
The indices of points whose normals are within angleMax of the reference normal.
Note
This function uses PCL's NormalEstimationOMP for efficient multi-threaded normal estimation when input cloud doesn't have normals.
Normal flipping is typically used to correct misoriented normals on flat ground surfaces.