PCD文件格式的转换
PCD文件格式的转换
1.PCD文件格式转PLY文件格式
bool
loadPCDCloud(const string &filename,pcl::PCLPointCloud2 &cloud)
{TicToc tt;print_highlight("Loading "); print_value("%s ", filename.c_str());pcl::PLYReader reader;tt.tic();if (loadPCDFile(filename, cloud) < 0)return (false);print_info("[done, "); print_value("%g", tt.toc()); print_info(" ms : "); print_value("%d", cloud.width * cloud.height); print_info(" points]\n");print_info("Available dimensions: "); print_value("%s\n", pcl::getFieldsList(cloud).c_str());return true;
}void
savePLYCloud (const std::string &filename, const pcl::PCLPointCloud2 &cloud, bool binary,bool use_camera)
{TicToc tt;tt.tic ();print_highlight ("Saving "); print_value ("%s ", filename.c_str ());pcl::PLYWriter writer;//传感器采集原点 获取方向 Identity() 1 0 0 0writer.write (filename, cloud, Eigen::Vector4f::Zero (), Eigen::Quaternionf::Identity (), binary,use_camera);print_info ("[done, "); print_value ("%g", tt.toc ()); print_info (" ms : "); print_value ("%d", cloud.width * cloud.height); print_info (" points]\n");
}bool format = 1;
bool use_camera = 1;
pcl::PCLPointCloud2 cloud;
if (!loadPCDCloud("4.pcd", cloud))return (-1);
savePLYCloud("4.ply", cloud, format,use_camera);
2.PLY文件格式转PCD文件格式
bool
loadPLYCloud(const string &filename,pcl::PCLPointCloud2 &cloud)
{TicToc tt;print_highlight("Loading "); print_value("%s ", filename.c_str());pcl::PLYReader reader;tt.tic();if (reader.read(filename, cloud) < 0)return (false);print_info("[done, "); print_value("%g", tt.toc()); print_info(" ms : "); print_value("%d", cloud.width * cloud.height); print_info(" points]\n");print_info("Available dimensions: "); print_value("%s\n", pcl::getFieldsList(cloud).c_str());return true;
}void
savePCDCloud (const std::string &filename, const pcl::PCLPointCloud2 &cloud, bool format)
{TicToc tt;tt.tic ();print_highlight ("Saving "); print_value ("%s ", filename.c_str ());pcl::PCDWriter writer;//传感器采集原点 获取方向 Identity() 1 0 0 0writer.write (filename, cloud, Eigen::Vector4f::Zero (), Eigen::Quaternionf::Identity (), format);print_info ("[done, "); print_value ("%g", tt.toc ()); print_info (" ms : "); print_value ("%d", cloud.width * cloud.height); print_info (" points]\n");
}bool format = 1;
if (!loadPLYCloud("4.ply", cloud))return (-1);
savePCDCloud("4.pcd", cloud, format);
PCD文件格式的转换相关推荐
- PCL——PCD文件格式分析
PCD文件格式分析 1. 格式分析 2. PCD格式的优势 1. 格式分析 # .PCD v0.7 - Point Cloud Data file format VERSION 0.7 FIELDS ...
- PCD文件格式(The PCD (Point Cloud Data) file format)
本文档描述PCD(点云数据)文件格式,以及它在点云库(PCL)中的使用方式. PCD文件格式图标 PCD文件格式图标 #为什么新的文件格式? PCD文件格式并不意味着重新发明轮子,而是补充现有文件格式 ...
- python实现文件格式转换_python实现快速文件格式批量转换的方法
用python实现文件夹下的成批文件格式转换 我们对于文件转换的需求很大,甚至于对于图片的格式,JPG和PNG格式在肉眼看来都没什么差别,但是对于计算机而言,它有时候就只接受这些肉眼看起来差不多的格式 ...
- python 文件批量转换格式_python实现快速文件格式批量转换的方法
用python实现文件夹下的成批文件格式转换 我们对于文件转换的需求很大,甚至于对于图片的格式,JPG和PNG格式在肉眼看来都没什么差别,但是对于计算机而言,它有时候就只接受这些肉眼看起来差不多的格式 ...
- Python xls文件和xlsx文件格式互相转换
Python xls文件和xlsx文件格式互相转换 1. xls文件另存为xlsx import win32com.client xls_path = 'D:\\1_Work_Task\\01_Int ...
- vpr文件转换flac_vpr文件格式怎么转换,划重点了
最近小编收到很多问题,其中一个就是下面小编为大家整理一下关于vpr文件格式怎么转换的步骤,希望这些方法能够帮助到大家. 工具/材料 电脑 操作方法 01 首先,以文本格式储存的数字,在更改单元格格式后 ...
- PCL 三维 CAD 模型 (obj、ply) 转点云 pcd 文件格式
PCL 三维 CAD 模型 (obj.ply) 转点云 pcd 文件格式 利用 PCL 自带的程序可以将三维 CAD 模型 (obj.ply) 文件转为点云 pcd 文件格式. 打开安装的 PCL 安 ...
- 音频文件格式怎么转换html,mp3格式转换 如何转换音频文件|手机录音转换mp3格式...
昨天晚上翻来覆去睡不着的时候随机播放软件推荐的歌曲时听到了一首我自己觉得很好听的歌,蔡健雅的一首<被驯服的象>,我也推荐给大家听一下.今天早上上班就发现太阳已经升起来了哦,正愁没衣服穿了. ...
- PCD文件格式详解及在PCL下读取PCD文件
一.PCD简介 1.1 PCD版本 在点云库PCL 1.0发布之前,PCD文件格式就已经发展更新了许多版本.这些新旧不同的版本用PCD_Vx来编号(例如PCD_V5.PCD_V6和PCD_V7等),分 ...
- python视频格式转换命令_python怎么实现文件格式的转换 批处理使用ffmpeg为mp4批量加入字幕...
ffmpeg怎么批量处理任意类型的视频文件 如何用python实现视频关键帧提取并保存为图片?我想要和你一直在一起.一直到世界的终结.可以看到花开的微笑. import cv2vc = cv2.Vid ...
最新文章
- Flask环境的配置
- szu cf套题训练Codeforces Round #602 (Div. 2, based on Technocup 2020 Elimination Round 3)A~D题解报告
- 共识算法的比较:Casper vs Tendermint
- Django 2.2 LTS 发布,长期支持版来了
- 系统管理员必学的30个Linux实用命令
- Task.Factory.StartNew 和 Task.Factory.FromAsync 有什么区别?
- 计数排序与桶排序python实现
- FLEX里的CSS样式设置教材
- 不借助任何变量进行变量交换
- English trip -- MC(情景课)3 C Do you have a sister?
- ajax请求上传数组
- d3.js中点可以用图片吗_拿什么拯救你,长英文命名——用中文(也许标点也可以)试试...
- android Activity设置透明主题样式方法
- mmorpg游戏服务器技能系统设计,对MMORPG职业技能设计的一些思考和方法总结
- python默认字体大小_如何设置PIL加载的默认字体的大小,使其适合我的8x8矩阵?...
- iOS 战斗机跑车效果
- 直接使用word模板生成word文件
- 乐观锁和悲观锁的简单理解
- Systrace 基础知识 - 锁竞争解读
- Android.网络连接状态(联网,2g,3g,wifi等)