From 7fb89288689bb83cd96350672bbf894d0ef5459d Mon Sep 17 00:00:00 2001
From: Andrews Sobral <andrewssobral@users.noreply.github.com>
Date: Tue, 12 Mar 2019 22:20:41 +0100
Subject: [PATCH] Update vibe-background-sequential.cpp

Fixed issue reported on https://github.com/andrewssobral/bgslibrary/issues/147
---
 package_bgs/ViBe/vibe-background-sequential.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package_bgs/ViBe/vibe-background-sequential.cpp b/package_bgs/ViBe/vibe-background-sequential.cpp
index 5bf33a6..31a7c27 100644
--- a/package_bgs/ViBe/vibe-background-sequential.cpp
+++ b/package_bgs/ViBe/vibe-background-sequential.cpp
@@ -758,7 +758,7 @@ int32_t libvibeModel_Sequential_Update_8u_C3R(
 
           historyImage[index_neighbor + position[shift] * (3 * width) * height] = r;
           historyImage[index_neighbor + position[shift] * (3 * width) * height + 1] = g;
-          historyImage[index_neighbor + position[shift] * (3 * width) * height + 2] = r;
+          historyImage[index_neighbor + position[shift] * (3 * width) * height + 2] = b;
         }
         else {
           int pos = position[shift] - NUMBER_OF_HISTORY_IMAGES;
-- 
GitLab