From 064bdf58c487640080a5bdc7933ce78bd5b41c9e Mon Sep 17 00:00:00 2001 From: Ashton Larkin <42042756+adlarkin@users.noreply.github.com> Date: Tue, 21 Sep 2021 21:27:36 -0400 Subject: [PATCH] Be consistent in RGB channel notation for ogre2 segmentation camera (#419) Signed-off-by: Ashton Larkin --- ogre2/src/Ogre2SegmentationCamera.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ogre2/src/Ogre2SegmentationCamera.cc b/ogre2/src/Ogre2SegmentationCamera.cc index 659a92cc3..bb9d1f8df 100644 --- a/ogre2/src/Ogre2SegmentationCamera.cc +++ b/ogre2/src/Ogre2SegmentationCamera.cc @@ -368,9 +368,9 @@ void Ogre2SegmentationCamera::LabelMapFromColoredBuffer( for (uint32_t j = 0; j < width; ++j) { auto index = (i * width + j) * 3; - auto r = this->dataPtr->buffer[index + 2]; + auto r = this->dataPtr->buffer[index]; auto g = this->dataPtr->buffer[index + 1]; - auto b = this->dataPtr->buffer[index]; + auto b = this->dataPtr->buffer[index + 2]; // get color 24 bit unique id, we don't multiply it by 255 like before // as they are not normalized we read it from the buffer in