From 55f5c752327432922188920cb83bc596257c941e Mon Sep 17 00:00:00 2001 From: Andrews Cordolino Sobral Date: Sat, 4 Mar 2023 19:30:54 +0100 Subject: [PATCH] Enabled LBMixtureOfGaussians for OpenCV 4.x --- bgslibrary/algorithms/LBMixtureOfGaussians.cpp | 4 ---- bgslibrary/algorithms/LBMixtureOfGaussians.h | 6 ------ bgslibrary/algorithms/algorithms.h | 2 +- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/bgslibrary/algorithms/LBMixtureOfGaussians.cpp b/bgslibrary/algorithms/LBMixtureOfGaussians.cpp index eaa270979d..e57609d456 100644 --- a/bgslibrary/algorithms/LBMixtureOfGaussians.cpp +++ b/bgslibrary/algorithms/LBMixtureOfGaussians.cpp @@ -1,7 +1,5 @@ #include "LBMixtureOfGaussians.h" -#if CV_MAJOR_VERSION >= 2 && CV_MAJOR_VERSION <= 3 - using namespace bgslibrary::algorithms; LBMixtureOfGaussians::LBMixtureOfGaussians() : @@ -72,5 +70,3 @@ void LBMixtureOfGaussians::load_config(cv::FileStorage &fs) { fs["noiseVariance"] >> noiseVariance; fs["showOutput"] >> showOutput; } - -#endif diff --git a/bgslibrary/algorithms/LBMixtureOfGaussians.h b/bgslibrary/algorithms/LBMixtureOfGaussians.h index 4454adfc7e..aa4e327fdd 100644 --- a/bgslibrary/algorithms/LBMixtureOfGaussians.h +++ b/bgslibrary/algorithms/LBMixtureOfGaussians.h @@ -1,10 +1,6 @@ #pragma once #include "IBGS.h" - -#include "opencv2/core/version.hpp" -#if CV_MAJOR_VERSION == 2 || CV_MAJOR_VERSION == 3 - #include "lb/BGModelMog.h" namespace bgslibrary @@ -34,5 +30,3 @@ namespace bgslibrary bgs_register(LBMixtureOfGaussians); } } - -#endif diff --git a/bgslibrary/algorithms/algorithms.h b/bgslibrary/algorithms/algorithms.h index b6d92b9aee..ff566c8947 100644 --- a/bgslibrary/algorithms/algorithms.h +++ b/bgslibrary/algorithms/algorithms.h @@ -26,7 +26,7 @@ #include "FuzzyChoquetIntegral.h" #include "LBSimpleGaussian.h" #include "LBFuzzyGaussian.h" -#include "LBMixtureOfGaussians.h" // Only for OpenCV 2 or 3 +#include "LBMixtureOfGaussians.h" #include "LBAdaptiveSOM.h" #include "LBFuzzyAdaptiveSOM.h" #include "LBP_MRF.h" // Only for OpenCV 2 or OpenCV <= 3.4.7