PointCloudLibrary / PointCloudLibrary/pcl

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

Open
#6,272 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind: bug module: io module: octree
Dominant language
C++
Stars
11.1k
Forks
4.7k
Avg merge
4d 10h
Merged PRs (30d)
6

Description

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]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with pcl::io::OctreePointCloudCompressionpcl::PointXYZI using the ASCII PCD values and compression profile shown in the report. Compare intensity values before and after compression and decompression; the work is done when intensity is preserved with reasonable error instead of becoming zero.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-vision
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.