#include <iostream>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
int main()
{
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
if(pcl::io::loadPCDFile<pcl::PointXYZ>("/home/stone/Desktop/data/output-lidar/459.234350530.pcd", *cloud )== -1)
{
PCL_ERROR("Couldn't read file rabbit.pcd\n");
return -1;
}
std::cout << "Loaded "
<< cloud->points.size()
<< "data points from .pcd with the following fields: "
<< std::endl;
for (size_t i = 0; i < 5; i++)
{
std::cout << " " << cloud->points[i].x << " " << cloud->points[i].y << " " << cloud->points[i].z << std::endl;
}
system("pause");
return 0;
}
%YAML:1.0
K: !!opencv-matrix
rows: 3
cols: 3
dt: d
data: [424.945173, 0., 319.44412,
0., 425.020648, 183.77008,
0.,0.,1.]
d: !!opencv-matrix
rows: 4
cols: 1
dt: d
data: [ -0.029614, -0.096347,
0.000571, -0.002081]
Camera.width: 640
Camera.height: 360
grid_length: 0.15
corner_in_x: 7
corner_in_y: 5