以层格式为顶点添加颜色 [英] Adding color to vertex points in ply format

查看:113
本文介绍了以层格式为顶点添加颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个3D点云,每个点云的XYZ点的每个顶点都有不同的颜色/值属性.

I have a 3D point cloud each with different color/values attribute attached to each vertex of XYZ points.

原始数据以简单的.txt/csv格式显示在列中,即x,y,z,V1,V2,V3和下一行的新行,我正尝试使用.ply制作图像.我想创建一个3D图像,例如:

The Raw data is in simple .txt / csv form in columns i.e x, y, z, V1, V2, V3 and a new line for next point I am trying to use .ply to make images. I want to create a 3D image such as:

.

以层格式为基础,根据这些值中的每个为每个表面或顶点着色的合适代码是什么?我想创建多个具有相同形状但将不同颜色映射到表面的地图.

What is the appropriate code in ply format to color each surface or vertex based on each of these values? I want to create multiple maps with the same shape but mapping different colors to the surface.

推荐答案

PLY格式通过定义来支持顶点颜色

The PLY format supports vertex color by defining

property uchar red                   
property uchar green
property uchar blue

标题中的

.可以在每个顶点坐标之后添加[0,255]中的RGB值.

in the header. The RGB values in [0, 255] can be added after each vertex coordinates.

如果要定义附加到每个顶点的多个颜色值,请使用用户定义的元素.在此处查看示例: http://paulbourke.net/dataformats/ply/

If you want to define multiple color values attached to each vertex, use user-defined elements. See examples here: http://paulbourke.net/dataformats/ply/

这篇关于以层格式为顶点添加颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆