python-pcl icon indicating copy to clipboard operation
python-pcl copied to clipboard

Saving XYZRGBA pointcloud to ply results in wrong colors

Open b-hahn opened this issue 6 years ago • 2 comments

I have a numpy array containing 3 values for XYZ coordinates and one RGBA value - a float32 generated by bitshifting the uint8 values for each color and the alpha value. Unfortunately this does not work since a float32 cannot with precision store the least significant 4 bits, i.e. the A value (or is it the B value? It seems values are actually stored as ARGB when I convert the point cloud back to a numpy array, but that might result from a mistake on my side). The result is that one color channel is lost when I want to save the value as a .ply file. If I'm not making some mistake and the issue is real then one solution would be to use float64 values or allow a uint32 for the RGBA value when calling PointCloud_XYZRGBA.from_array() and not a float32. Happy to hear about any alternative ways to go about saving an RGBA point cloud to .ply files.

b-hahn avatar Nov 03 '18 16:11 b-hahn

+1

Arnoldnuo avatar Mar 08 '19 09:03 Arnoldnuo

+1,is this bug still unsolved?

sunjay-lee avatar May 26 '22 01:05 sunjay-lee