PCL-Cpp (70%)
PCL-Cpp์์๋ ์ ๊ตฐ ์ ์ถ๋ ฅ์ ์ํด์ ํ ํ๋ฆฟ ํด๋์ค๋ ๊ตฌ์กฐ์ฒด๋ฅผ ํ์ฉ ํ ์ ์์ต๋๋ค. ์์ธํ ๋ด์ฉ์ [์ด๊ณณ]์ ์ฐธ๊ณ ํ์๋ฉด ๋ฉ๋๋ค.
// template
pcl::PointCloud<pcl::PointXYZ>
// struct
Pcl::PointXYZ
Pcl::PointXYZI
Pcl::PointXYZRGB
Pcl::PCLPointCloud21. ์ฝ๊ธฐ
#include <iostream>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
int
main (int argc, char** argv)
{
//READ #1
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
pcl::io::loadPCDFile<pcl::PointXYZ> ("tabletop.pcd", *cloud); //๋ด๋ถ์ ์ผ๋ก reader.read() ํธ์ถ
//READ #2
//pcl::PointCloud<pcl::PointXYZ> cloud;
//pcl::io::loadPCDFile<pcl::PointXYZ>("tabletop.pcd", cloud) //๋ด๋ถ์ ์ผ๋ก reader.read() ํธ์ถ
//READ #3
//pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
//pcl::PCDReader reader;
//reader.read<pcl::PointXYZ>("tabletop.pcd", cloud);
std::cout << "Loaded " << cloud->width * cloud->height << std::endl; //cloud_filtered->points.size()
return (0);
}์๊ฐํ ํ์ธ
2. ์์ฑ & ์ฐ๊ธฐ
Last updated
Was this helpful?