txt以及pcd格式的点云文件在linux系统上如何查看 您所在的位置:网站首页 pcd格式点云数据如何查看 txt以及pcd格式的点云文件在linux系统上如何查看

txt以及pcd格式的点云文件在linux系统上如何查看

2024-06-22 04:23| 来源: 网络整理| 查看: 265

介绍一个特别好用的工具来可视化点云文件

cloudcompare

比用代码或者matlab来可视化真的方便太多

直接打开终端输入

sudo snap install cloudcompare

安装完毕后,打开

cloudcompare.ccViewer

或者

cloudcompare.CloudCompare 如果报错 第一种错误

QXcbConnection: Could not connect to display :0 Aborted (core dumped)

则需要安装

sudo snap install meshlab

2. 第二种错误 Error occurred while loading pcd file [Load] Can't guess file format: unhandled file extension'pcd'

解决,The stable version of CC can not open pcd file.

Switch it to edge version by

sudo snap refresh --edge cloudcompare

但是这种方法有个问题 NOTE: Edge verstion dosen’t stable when saving .pcd files

所以我们用下面的解决方法

git clone --recursive https://github.com/cloudcompare/trunk.git cd trunk mkdir build cd build cmake .. make -j4 sudo make install

Launch

./qCC/CloudCompare

如何将pcd转换成txt文件 pcd2txt.cpp

#include #include #include #include #include #include #include #include void pcd2txt(pcl::PointCloud::Ptr pcdPtr) { /*------------------ output pointcloud xyz as txt ----------------*/ /*----------------------------------------------------------------*/ std::ofstream xyz_txt("/home/gordon/feelEnvironment/data/segByCloudCompare/raw_pointcloud/pointcloud_xyz.txt", std::ios::out); for(int i = 0; i points.size(); i++) { xyz_txt fin >> temp; point.x = temp; fin >> temp; point.y = temp; fin >> temp; point.z = temp; pcdPtr->points.push_back(point); } if(row == pcdPtr->size()) std::cout PCL_INCLUDE_DIRS}) link_directories(${PCL_LIBRARY_DIRS}) add_definitions(${PCL_DEFINITIONS}) add_executable(pcd2txt pcd2txt.cpp) target_link_libraries (pcd2txt ${PCL_LIBRARIES})

NOTE: When saving .txt make sure to check number of points (seperate line)

**References:

[1] CloudCompare - Open Source project [2] Ubuntu18.04 cloudcompare安装 - 写东西仪式感极强(其实拖延症晚期晚期)的大龄小白 [3] ubuntu - QxcbConnection error - CloudCompare won’t launch - Stack Overflow [4] Still cannot open PCD files on Linux · Issue #536 · CloudCompare/CloudCompare · GitHub [5 经过CloudCompare保存的点云视点改变导致的问题_旅行在明天之前昨天之后的博客-CSDN博客**



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有