Skip to content

codebydant/cloudparse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cloudparse

travis license version

Description

Manage all your point cloud data in one place with cloudparse. An CMake library to handle point cloud into the Point Cloud Library.

This library provides an design pattern interface to read data from external files into a pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud

Supported formats

Format Description
.pcd Point Cloud Data file format
.ply Polygon file format
.txt Text file format
.xyz X Y Z Text file format

Usage

Include parser.hpp and you're good to go.

#include <cloudparse/parser.hpp>

To start parsing point cloud data, create an ParserCloudFile.

CloudParserLibrary::ParserCloudFile cloud_parser;

Load point cloud data into a pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud

pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZRGB>());

cloud_parser.load_cloudfile(path/to/cloud/data, cloud);

cloud->width = (int)cloud->points.size();
cloud->height = 1;
cloud->is_dense = true;

Print point cloud data

for (const auto& point: *cloud){
  std::cout << " " << point.x
            << " " << point.y
            << " " << point.z << std::endl;
}

License

The project is available under the MIT license.