Page 1 of 1

Save cloud as PCD file with intensity field named as PCL expects it.

Posted: Wed May 13, 2020 6:51 am
by nikodeemus
Hello,

Is there a way to export a PCD cloud with intensities written in the "intensity" field? I noticed that PCL (point cloud library v1.8) was not able to find intensities when reading this file. Intensities seem to come in RGB fields. Still reading the PCD back with CC, the intensities are found from the scalar fields.

Thank you
Nikodeemus

EDIT:
Just changed the subject name to better describe the problem and solution.

Re: Save cloud as PCD file with intensity (not in RGB)

Posted: Wed May 13, 2020 10:32 am
by daniel
Maybe it's a problem of scalar field name? Maybe PCL expects the 'Intensity' field to have a specific name?

Re: Save cloud as PCD file with intensity (not in RGB)

Posted: Thu May 14, 2020 5:11 am
by nikodeemus
Yup that is the problem!

CC writes the field "Intensity" with capital "I" while PCL (pcl::PointXYZI) expects it written as lower case letter.

I figured out that in CC it is possible to change a scalar field name by first choosing the cloud and activating the scalar field to be renamed. Then go to ->tools->scalar fields->rename and save the file. This was the tool I was looking for. I thought I tried this before posting the question here, but I must have mixed with files or something. Well I hope this helps someone in the future.

PCD format is new for me. Apparently the field names are not specified in the pcd schema? At least intensity is not mentioned here https://pcl-tutorials.readthedocs.io/en ... ile-format.

-nikodeemus