mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
Export: exporting with intensity for laser scans
This commit is contained in:
@@ -2485,6 +2485,12 @@ pcl::PointXYZRGB laserScanToPointRGB(const LaserScan & laserScan, int index, uns
|
||||
output.g = (unsigned char)((ptrInt[indexRGB] >> 8) & 0xFF);
|
||||
output.r = (unsigned char)((ptrInt[indexRGB] >> 16) & 0xFF);
|
||||
}
|
||||
else if(laserScan.hasIntensity())
|
||||
{
|
||||
// based on Velodyne/SICK specification of intensity 0-100
|
||||
int indexIntensity = laserScan.getIntensityOffset();
|
||||
output.b = output.g = output.r = (unsigned char)ptr[indexIntensity];
|
||||
}
|
||||
else
|
||||
{
|
||||
output.r = r;
|
||||
@@ -2539,6 +2545,12 @@ pcl::PointXYZRGBNormal laserScanToPointRGBNormal(const LaserScan & laserScan, in
|
||||
output.g = (unsigned char)((ptrInt[indexRGB] >> 8) & 0xFF);
|
||||
output.r = (unsigned char)((ptrInt[indexRGB] >> 16) & 0xFF);
|
||||
}
|
||||
else if(laserScan.hasIntensity())
|
||||
{
|
||||
// based on Velodyne/SICK specification of intensity 0-100
|
||||
int indexIntensity = laserScan.getIntensityOffset();
|
||||
output.b = output.g = output.r = (unsigned char)ptr[indexIntensity];
|
||||
}
|
||||
else
|
||||
{
|
||||
output.r = r;
|
||||
|
||||
@@ -792,6 +792,10 @@ pcl::PointCloud<pcl::PointXYZRGB>::Ptr removeNaNFromPointCloud(const pcl::PointC
|
||||
{
|
||||
return removeNaNFromPointCloudImpl<pcl::PointXYZRGB>(cloud);
|
||||
}
|
||||
pcl::PointCloud<pcl::PointXYZI>::Ptr removeNaNFromPointCloud(const pcl::PointCloud<pcl::PointXYZI>::Ptr & cloud)
|
||||
{
|
||||
return removeNaNFromPointCloudImpl<pcl::PointXYZI>(cloud);
|
||||
}
|
||||
|
||||
template<typename PointT>
|
||||
typename pcl::PointCloud<PointT>::Ptr removeNaNNormalsFromPointCloudImpl(
|
||||
@@ -812,6 +816,11 @@ pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr removeNaNNormalsFromPointCloud(
|
||||
{
|
||||
return removeNaNNormalsFromPointCloudImpl<pcl::PointXYZRGBNormal>(cloud);
|
||||
}
|
||||
pcl::PointCloud<pcl::PointXYZINormal>::Ptr removeNaNNormalsFromPointCloud(
|
||||
const pcl::PointCloud<pcl::PointXYZINormal>::Ptr & cloud)
|
||||
{
|
||||
return removeNaNNormalsFromPointCloudImpl<pcl::PointXYZINormal>(cloud);
|
||||
}
|
||||
|
||||
|
||||
pcl::IndicesPtr radiusFiltering(const pcl::PointCloud<pcl::PointXYZ>::Ptr & cloud, float radiusSearch, int minNeighborsInRadius)
|
||||
|
||||
Reference in New Issue
Block a user