user2488669
user2488669

Reputation: 61

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.

Upvotes: 6

Views: 15120

Answers (1)

songuke
songuke

Reputation: 189

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/

Upvotes: 11

Related Questions