PointCloudLibrary / PointCloudLibrary/pcl

[common] Make color tables of LUT_GLASBEY LUT_VIRIDIS constexpr public

Open
#4,490 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind: request status: stale status: triage
Dominant language
C++
Stars
11.1k
Forks
4.7k
Avg merge
4d 10h
Merged PRs (30d)
6

Description

Currently there exists ColorLUT to wrap both tables. As the API is really similar to to std::array we could remove the class and just publish the values as array somehow

Some steps which are necessary for it:

  • Use std::array instead of C arrays #4489
  • Make pcl::RGB constexpr (necessary for next step)
  • Change array from unsigned char to pcl::RGB, so the method ColorLUT<T>::at does not anymore need to add the dummy 4. value (as pcl::RGB is using 4 bytes and not 3)
  • Move arrays to header(s), so they can be really constexpr

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 reading the existing ColorLUT implementation and the definition of pcl::RGB, then review the completed std::array change in #4489. Trace how LUT_GLASBEY and LUT_VIRIDIS are declared and accessed. Done means pcl::RGB is constexpr, the tables use pcl::RGB, and the arrays are public constexpr in headers without the dummy fourth value.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-vision
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 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.