Search
 
SCRIPT & CODE EXAMPLE
 

CPP

pcl c++ read .pcd

1#include <iostream>
 2#include <pcl/io/pcd_io.h>
 3#include <pcl/point_types.h>
 4
 5int
 6main ()
 7{
 8  pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
 9
10  if (pcl::io::loadPCDFile<pcl::PointXYZ> ("test_pcd.pcd", *cloud) == -1) //* load the file
11  {
12    PCL_ERROR ("Couldn't read file test_pcd.pcd 
");
13    return (-1);
14  }
15  std::cout << "Loaded "
16            << cloud->width * cloud->height
17            << " data points from test_pcd.pcd with the following fields: "
18            << std::endl;
19  for (const auto& point: *cloud)
20    std::cout << "    " << point.x
21              << " "    << point.y
22              << " "    << point.z << std::endl;
23
24  return (0);
25}
Comment

PREVIOUS NEXT
Code Example
Cpp :: how to insert variable into string c++ 
Cpp :: Make them equal codechef solution in c++ 
Cpp :: C++ Function-style Casting 
Cpp :: c++ set value to inf 
Cpp :: ros pointcloud2 read_points c++ 
Cpp :: how to show c++ binary files in sublime text 
Cpp :: C++ Booleans 
Cpp :: #defie in c++ 
Cpp :: c++ CRL multiline string 
Cpp :: fibonacci search algorithm c++ 
Cpp :: appdivind c++ stuctures 
Cpp :: play sound opencv video c++ 
Cpp :: is plaindrome 
Cpp :: how to run c++ on cmd 
Cpp :: cpp console progressbar 
Cpp :: choose endianness in cpp 
Cpp :: string class cpp 
Cpp :: vprintf 
Cpp :: nested loop c++ program example 
Cpp :: return value optimization example 
Cpp :: 771. Jewels and Stones leetcode solution in c++ 
Cpp :: write c++ code using glbegin and gland() function 
Cpp :: pointers in c++ 
Cpp :: how to write hello world c++ 
Cpp :: what is push() c++ 
Cpp :: insert into a vector more than once c++ 
Cpp :: Dfs program in c++ 
C :: terminal size in c 
C :: c get time 
C :: how to find all the missing dates and increment the series in r 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =