Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix segmentation camera color id computation with new math::Color clamping behavior (ogre2) #1040

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ogre2/src/Ogre2SegmentationMaterialSwitcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ math::Color Ogre2SegmentationMaterialSwitcher::LabelToColor(int64_t _label,
int b = distribution(this->generator);

math::Color color(
static_cast<float>(r),
static_cast<float>(g),
static_cast<float>(b));
static_cast<float>(r / 255.0f),
static_cast<float>(g / 255.0f),
static_cast<float>(b / 255.0f));

// if the label is colored before return the color
// don't check for taken colors in that case, all items
Expand Down
Loading