Template Function multisensor_calibration::utils::computeNormalVectorsForPointCloud

Function Documentation

template<typename PointInT, typename PointOutT>
inline void multisensor_calibration::utils::computeNormalVectorsForPointCloud(const typename pcl::PointCloud<PointInT>::Ptr &ipCloud, const int &nLidarRings, typename pcl::PointCloud<PointOutT>::Ptr &opCloud)

Function to compute normal vectors for point cloud of a rotating LiDAR sensor.

For each point in the point cloud, this function uses the nearest-neighbor on the same ring, as well as the nearest-neighbor on the neighboring ring to compute a normal vector by means of a cross product. This approach is very fast but does not ensure a spatial consistency of the normal vectors. Furthermore, as the method considers a ring-based neighborhood it requires point types that also encode the ring number.

Template Parameters:
  • PointInT – Point type of the input point cloud (needs to contain a ring number).

  • PointOutT – Point type of the output point cloud (needs to contain normal information).

Parameters:
  • ipCloud[in] Pointer to input cloud.

  • nLidarRings[in] Number of rings inside the input point cloud.

  • opCloud[out] Pointer to resulting output point cloud.