I tried to use python to read points cloud data files, which with extension ".pcd". They store RGBA color information with just one numpy float32.
How can i convert the float32
data type into 4 uint8
numbers in python ?
For example, what is the rgb value hidden in number 4.51073351e-39 ?
In [13]: pc.pc_data["rgb"]
Out[13]:
array([ 4.51073351e-39, 4.41853788e-39, 4.87845245e-39, ...,
3.31220574e-39, 2.94594696e-39, 3.12997949e-39], dtype=float32)
Here is the link to download the dataset: http://rgbd-dataset.cs.washington.edu/dataset/rgbd-dataset_pcd_ascii/apple_1.tar
And i used pypcd to read the file: here is the pypcd github link:https://github.com/dimatura/pypcd