Skip to content

Commit

Permalink
Fix segmentation camera color id calculation
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 committed Aug 19, 2024
1 parent 8edd14f commit 9a478d1
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 9a478d1

Please sign in to comment.