Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding color to vertex points in ply format

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

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:

this.

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.

like image 291
user2488669 Avatar asked Jun 15 '13 11:06

user2488669


1 Answers

The PLY format supports vertex color by defining

property uchar red                   
property uchar green
property uchar blue

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

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

like image 118
songuke Avatar answered Sep 25 '22 01:09

songuke