Skip to content

Commit

Permalink
Fix segmentation camera color id calculation (#1040)
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 authored Aug 20, 2024
1 parent 8edd14f commit f9e5a8d
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 f9e5a8d

Please sign in to comment.