PointCloud Color compression
- Dominant language
- C++
- Stars
- 7.5k
- Forks
- 1.1k
- Avg merge
- 47m
- Merged PRs (30d)
- 1
Description
I have used PointCloudBuilder to encode positions and colors using
```
draco::PointCloudBuilder pcBuilder;
pcBuilder.Start(pointCount);
int posId = pcBuilder.AddAttribute(draco::GeometryAttribute::POSITION, 3, draco::DT_FLOAT32);
pcBuilder.SetAttributeValuesForAllPoints(posId, positions.data(), sizeOfPosition);
int colId = pcBuilder.AddAttribute(draco::GeometryAttribute::COLOR, 3, draco::DT_UINT8);
pcBuilder.SetAttributeValuesForAllPoints(colId, colors.data(), sizeOfColor);
std::unique_ptr pc = pcBuilder.Finalize(false);
draco::Encoder encoder;
encoder.SetSpeedOptions(7, 7);
encoder.SetAttributeQuantization(draco::GeometryAttribute::POSITION, 16);
encoder.SetAttributeQuantization(draco::GeometryAttribute::COLOR, 6);
draco::EncoderBuffer encBuff;
encoder.EncodePointCloudToBuffer(*pc, &encBuff);
```
Unfortunately, it appears that there is no compression happening on colors... Is it something that will be added?!
To improve that, I have decided to encode colors with RGB565 manually.
Thus, I modified only the following line :
```
int colId = pcBuilder.AddAttribute(draco::GeometryAttribute::COLOR, 1, draco::DT_UINT16);
```
Unfortunately, colors are inconsistent after decompression by using RGB565 (I tested it without draco compression and it works).
Am I missing something ? Is there any issue there?!
Thank you for the great work, position compression is awesome!
Contributor guide
Assessment
This issue has not been assessed yet.