Skip to content

[module_name] OctreePointCloudCompression loses intensity when decompressing pcl::PointXYZI point type #6272

Open
@niltarkan

Description

@niltarkan

Describe the bug

I use pcl::io::OctreePointCloudCompression<pcl::PointXYZI> to compress and decompress a point cloud. I can see that it reads the intensity values, however when I decompressed the compressed stream, I lose intensity data. It writes only zeros instead of intensity.

Context

I use pretty simple code to generate encoder and decoder.
`
bool showStatistics = true;

pcl::io::compression_Profiles_e compressionProfile = pcl::io::HIGH_RES_OFFLINE_COMPRESSION_WITH_COLOR;

PointCloudEncoder = new pcl::io::OctreePointCloudCompressionpcl::PointXYZI (compressionProfile, showStatistics);
PointCloudDecoder = new pcl::io::OctreePointCloudCompressionpcl::PointXYZI ();
`

The input point data is like this:

345678.33 7027198.37 0.37 29512
345678.65 7027188.83 0.45 29206
345679.22 7027188.36 0.31 34296
345698.41 7027190.22 0.36 45830
345699.26 7027193.52 0.43 35847
347698.84 7027198.09 0.38 28070
345768.38 7027197.18 0.32 28005
345987.83 7027198.26 0.34 31260
345984.69 7027195.48 0.34 34471

But after compressine and decompressing, it turns into this:

345678.25 7027188.5 0.30900002 0
345678.81 7027198.5 0.33900002 0
345680.38 7027197 0.31900001 0
345698.69 7027195.5 0.33900002 0
345688.62 7027189 0.449 0
344527.31 7027198.5 0.37 0
345698.81 7027198 0.37900001 0
345985.25 7027193.5 0.43000001 0
345984.44 7027190 0.36000001 0

These are x, y, z, intensity values respectively.

Expected behavior

I expect to see intensity values too with some reasonable error or not.

Current Behavior

Intensity turns into 0 after compressing/decompressing with OctreePointCloudCompression.

To Reproduce

  1. Just create empty pcd file in ascii format and then open it in text editor and write the initial x, y, z, intensity values.
  2. Compress/decompress it via OctreePointCloudCompression with pcl::PointXYZI point type all over.
  3. Print the output and see if the intensity values are all zero or not.

Your Environment (please complete the following information):

  • OS: [e.g. Ubuntu 20.04]
  • Compiler: [:eg GCC 11.4.0]
  • PCL Version [e.g. 1.15, HEAD]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions