From d2945cae87de66668e4ca995268b7452361f5875 Mon Sep 17 00:00:00 2001 From: Ashton Larkin Date: Tue, 21 Sep 2021 18:56:58 -0400 Subject: [PATCH] Be consistent in RGB channel notation for ogre2 segmentation camera 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