PointCloudLibrary / PointCloudLibrary/pcl

PointCloudColorHandlerCustom ctor should accept colors in [0..1] range or have char arguments

Open
#2,328 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Currently PointCloudColorHandlerCustom accepts three doubles in constructor to define a custom color. Internally they are then casted (as-is) to char and used for coloring, meaning that expected range is 0..255. This is confusing, counter intuitive, and worse of all, not documented.

We should do either of the following:

  1. keep double arguments, but assume they are in [0..1] range
  2. switch to char arguments

I prefer the first option since the interface will be in line with the rest of the visualization module (e.g. specification of point cloud color through setPointCloudRenderingProperties). However, option (1) breaks existing visualization code. This can be mitigated to some extent by issuing a warning if the values are outside expected range. Option (2) should be safe and only cause type compiler type warnings.

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 with the PointCloudColorHandlerCustom constructor and compare its interface with setPointCloudRenderingProperties in the visualization module. Determine whether the constructor should use [0..1] doubles or character arguments, including how existing callers are affected. Done means the selected behavior is implemented consistently and the accepted range or compatibility warnings are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-vision
Issue type
Feature
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.