百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
P

pointcloudToMesh

> DevOps
开源

C++ 应用程序用于将 pcd 文件、ply 文件、txt 文件或 xyz 点云转换为网格表示(Gp3)。

186 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

C++ 应用程序用于将 pcd 文件、ply 文件、txt 文件或 xyz 点云转换为网格表示(Gp3)。

pointcloudToMesh

C++ application to convert a pcd, ply, txt or xyz point cloud data file into a MESH representation (Gp3/poisson). This projects is based in the Point Cloud Library 1.12.1 as backend.


Input file structure support

Format Description
.pcd Point Cloud Data file format
.ply Polygon file format
.txt Text file format
.xyz X Y Z Text file format

Output file structure

Mesh Cloud Description
.ply Polygon mesh file

Example

Compile

You can either build the project from source or download a docker image.

Compiling from source code

  1. Download source code:
bash
git clone https://github.com/codebydant/pointcloudToMesh
  1. Create a "build" folder
  2. Run CMake
bash
cd build/ && cmake ../src && make
  1. Run project
./pointcloudToMESH    
    
    surface method estimation:
        1 --> for poisson
        2 --> for gp3
        
    normal method estimation.
        1 --> for normal estimation
        2 --> for mls normal estimation
        
     example:
     ./pointcloudToMESH /home/xXx/PCD-PLY_Files/cloud.txt 2 1 /home/xXx/Desktop 

Docker image

  1. Download the docker image
bash
docker pull ghcr.io/codebydant/pcdtomesh:latest
  1. Run a docker container
bash
docker run --rm -it \
           --volume=/tmp/.X11-unix:/tmp/.X11-unix:rw \
           --volume=/tmp/.docker.xauth:/tmp/.docker.xauth:rw \
           --env="XAUTHORITY=/tmp/.docker.xauth" \
           --env="DISPLAY" \
           --name="mesh" \
           --volume=[PATH TO YOUR PCD FOLDER]:/tmp \
           -t ghcr.io/codebydant/pcdtomesh:latest /tmp/[YOUR PCD FILENAME] [surface method] [normal method] /tmp

The previous command will run a docker container with the ghcr.io/codebydant/pcdtomesh:latest image and will share a .pcd file from the host machine ([PATH TO YOUR PCD FOLDER]) to the tmp folder in the container.

If you get something like this after setting --display flag it might be related to this:

bash
No protocol specified

Try running with the following command belowe or use the provided .sh script:

bash
sudo -sE docker run --rm -it \
           --env="DISPLAY" \
           --volume=/tmp/.X11-unix:/tmp/.X11-unix:rw \
           --volume=/tmp/.docker.xauth:/tmp/.docker.xauth:rw \
           --name="dbscan" \
           --volume=[PATH TO YOUR PCD FOLDER]:/tmp \
           -t ghcr.io/codebydant/dbscan-octrees:latest --cloudfile /tmp/[YOUR PCD FILENAME] --display

If this still does not work to display, run: xhost +local:docker and then run the option 1 command.

Note

These parameters can be modify in "create_mesh" method to get better results!

for GP3:

setKSearch(100);                         //It was 20
gp3.setSearchRadius(10);                 //It was 0.025
gp3.setMu(5);                            //It was 2.5
gp3.setMaximumNearestNeighbors(100);     //It was 100
gp3.setMaximumSurfaceAngle(M_PI/4);      //45 degrees   
gp3.setMinimumAngle(M_PI/18);            //10 degrees 
gp3.setMaximumAngle(M_PI/1.5);           //120 degrees     
gp3.setNormalConsistency(false); 

for POISSON:

poisson.setDepth(depth);//7
poisson.setInputCloud(cloud_with_normals);
poisson.setPointWeight(pointWeight);//2
poisson.setDegree(2);
poisson.setSamplesPerNode(samplePNode);//1.5
poisson.setScale(scale);//1.1
poisson.setIsoDivide(isoDivide);//8
poisson.setConfidence(confidence);
poisson.setOutputPolygons(outputPolygons);
poisson.setManifold(manifold);
poisson.setSolverDivide(solverDivide);//8
poisson.reconstruct(triangles);

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C++meshpcdpclpcl-library

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类DevOps
定价开源

> 相关工具

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理