Giter Site home page Giter Site logo

andrewssobral / bgslibrary Goto Github PK

View Code? Open in Web Editor NEW
2.2K 131.0 739.0 83.84 MB

A C++ Background Subtraction Library with wrappers for Python, MATLAB, Java and GUI on QT

License: MIT License

CMake 1.68% C++ 85.72% Python 1.03% Shell 0.31% Java 9.65% C 0.27% Batchfile 0.02% QMake 0.16% MATLAB 0.55% Assembly 0.43% Dockerfile 0.18%
background-subtraction opencv bgs computer-vision foreground-detection pybgs moving-object-detection

bgslibrary's Introduction

BGSLibrary

A Background Subtraction Library

Release License: GPL v3 Platform: Windows, Linux, OS X OpenCV Wrapper: Python, MATLAB Algorithms

Last page update: 04/03/2023

Library Version: 3.3.0 (see Build Status and Release Notes for more info)

The BGSLibrary was developed in early 2012 by Andrews Sobral as a C++ framework (with wrappers available for Python, Java and MATLAB) for foreground-background separation in videos using OpenCV. The bgslibrary is compatible with OpenCV versions 2.4.x, 3.x and 4.x, and can be compiled on Windows, Linux, and Mac OS X. It currently contains 43 algorithms and is available free of charge to all users, both academic and commercial. The library's source code is available under the MIT license.

You can either install BGSLibrary via pre-built binary package or build it from source

Supported Compilers are:

GCC 4.8 and above
Clang 3.4 and above
MSVC 2015, 2017, 2019 or newer

Other compilers might work, but are not officially supported. The bgslibrary requires some features from the ISO C++ 2014 standard.

Algorithm compatibility across OpenCV versions


Algorithm OpenCV < 3.0 (42) 3.0 <= OpenCV <= 3.4.7 (41) 3.4.7 < OpenCV < 4.0 (39) OpenCV >= 4.0 (26)
AdaptiveBackgroundLearning ✔️ ✔️ ✔️ ✔️
AdaptiveSelectiveBackgroundLearning ✔️ ✔️ ✔️ ✔️
CodeBook ✔️ ✔️ ✔️ ✔️
DPAdaptiveMedian ✔️ ✔️ ✔️
DPEigenbackground ✔️ ✔️ ✔️
DPGrimsonGMM ✔️ ✔️ ✔️
DPMean ✔️ ✔️ ✔️
DPPratiMediod ✔️ ✔️ ✔️
DPTexture ✔️ ✔️ ✔️
DPWrenGA ✔️ ✔️ ✔️
DPZivkovicAGMM ✔️ ✔️ ✔️
FrameDifference ✔️ ✔️ ✔️ ✔️
FuzzyChoquetIntegral ✔️ ✔️ ✔️ ✔️
FuzzySugenoIntegral ✔️ ✔️ ✔️ ✔️
GMG ✔️
IndependentMultimodal ✔️ ✔️ ✔️ ✔️
KDE ✔️ ✔️ ✔️ ✔️
KNN ✔️ ✔️ ✔️
LBAdaptiveSOM ✔️ ✔️ ✔️ ✔️
LBFuzzyAdaptiveSOM ✔️ ✔️ ✔️ ✔️
LBFuzzyGaussian ✔️ ✔️ ✔️ ✔️
LBMixtureOfGaussians ✔️ ✔️ ✔️ ✔️
LBP_MRF ✔️ ✔️
LBSimpleGaussian ✔️ ✔️ ✔️ ✔️
LOBSTER ✔️ ✔️ ✔️ ✔️
MixtureOfGaussianV1 ✔️
MixtureOfGaussianV2 ✔️ ✔️ ✔️ ✔️
MultiCue ✔️ ✔️ ✔️
MultiLayer ✔️ ✔️
PAWCS ✔️ ✔️ ✔️ ✔️
PixelBasedAdaptiveSegmenter ✔️ ✔️ ✔️ ✔️
SigmaDelta ✔️ ✔️ ✔️ ✔️
StaticFrameDifference ✔️ ✔️ ✔️ ✔️
SuBSENSE ✔️ ✔️ ✔️ ✔️
T2FGMM_UM ✔️ ✔️ ✔️
T2FGMM_UV ✔️ ✔️ ✔️
T2FMRF_UM ✔️ ✔️ ✔️
T2FMRF_UV ✔️ ✔️ ✔️
TwoPoints ✔️ ✔️ ✔️ ✔️
ViBe ✔️ ✔️ ✔️ ✔️
VuMeter ✔️ ✔️ ✔️ ✔️
WeightedMovingMean ✔️ ✔️ ✔️ ✔️
WeightedMovingVariance ✔️ ✔️ ✔️ ✔️

Stargazers over time

Stargazers over time

Citation

If you use this library for your publications, please cite it as:

@inproceedings{bgslibrary,
author    = {Sobral, Andrews},
title     = {{BGSLibrary}: An OpenCV C++ Background Subtraction Library},
booktitle = {IX Workshop de Visão Computacional (WVC'2013)},
address   = {Rio de Janeiro, Brazil},
year      = {2013},
month     = {Jun},
url       = {https://github.com/andrewssobral/bgslibrary}
}

A chapter about the BGSLibrary has been published in the handbook on Background Modeling and Foreground Detection for Video Surveillance.

@incollection{bgslibrarychapter,
author    = {Sobral, Andrews and Bouwmans, Thierry},
title     = {BGS Library: A Library Framework for Algorithm’s Evaluation in Foreground/Background Segmentation},
booktitle = {Background Modeling and Foreground Detection for Video Surveillance},
publisher = {CRC Press, Taylor and Francis Group.}
year      = {2014},
}

Download PDF:

  • Sobral, Andrews. BGSLibrary: An OpenCV C++ Background Subtraction Library. IX Workshop de Visão Computacional (WVC'2013), Rio de Janeiro, Brazil, Jun. 2013. (PDF in brazilian-portuguese containing an english abstract).

  • Sobral, Andrews; Bouwmans, Thierry. "BGS Library: A Library Framework for Algorithm’s Evaluation in Foreground/Background Segmentation". Chapter on the handbook "Background Modeling and Foreground Detection for Video Surveillance", CRC Press, Taylor and Francis Group, 2014. (PDF in english).

Some references

Some algorithms of the BGSLibrary were used successfully in the following papers:

  • (2014) Sobral, Andrews; Vacavant, Antoine. A comprehensive review of background subtraction algorithms evaluated with synthetic and real videos. Computer Vision and Image Understanding (CVIU), 2014. (Online) (PDF)

  • (2013) Sobral, Andrews; Oliveira, Luciano; Schnitman, Leizer; Souza, Felippe. (Best Paper Award) Highway Traffic Congestion Classification Using Holistic Properties. In International Conference on Signal Processing, Pattern Recognition and Applications (SPPRA'2013), Innsbruck, Austria, Feb 2013. (Online) (PDF)

Videos

bgslibrary's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bgslibrary's Issues

fail on build

Hi,

I'm working with Ubuntu 14.04LTS and just downloaded openCV-3.1.0 and built it successfully. also checked it using the demo examples. When I try to build the bgslibrary I get the following error: (It happens after the cmake)

$ make
Scanning dependencies of target bgs
[ 1%] Building CXX object CMakeFiles/bgs.dir/home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.cpp.o
In file included from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.h:65:0,
from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.cpp:56:
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:97:7: error: ‘IplImage’ does not name a type
CVAPI(IplImage_) cvCreateImageHeader( CvSize size, int depth, int channels );
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/types_c.h:93:49: note: in definition of macro ‘CVAPI’

define CVAPI(rettype) CV_EXTERN_C CV_EXPORTS rettype CV_CDECL

                                             ^

/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:109:7: error: ‘IplImage’ does not name a type
CVAPI(IplImage_) cvInitImageHeader( IplImage* image, CvSize size, int depth,
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/types_c.h:93:49: note: in definition of macro ‘CVAPI’

define CVAPI(rettype) CV_EXTERN_C CV_EXPORTS rettype CV_CDECL

                                             ^

/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:125:7: error: ‘IplImage’ does not name a type
CVAPI(IplImage_) cvCreateImage( CvSize size, int depth, int channels );
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/types_c.h:93:49: note: in definition of macro ‘CVAPI’

define CVAPI(rettype) CV_EXTERN_C CV_EXPORTS rettype CV_CDECL

                                             ^

In file included from /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/utility.hpp:886:0,
from /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core.hpp:3165,
from /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/types_c.h:101,
from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.h:65,
from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.cpp:56:
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:140:36: error: variable or field ‘cvReleaseImageHeader’ declared void
CVAPI(void) cvReleaseImageHeader( IplImage_* image );
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:140:36: error: ‘IplImage’ was not declared in this scope
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:140:47: error: ‘image’ was not declared in this scope
CVAPI(void) cvReleaseImageHeader( IplImage** image );
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:154:30: error: variable or field ‘cvReleaseImage’ declared void
CVAPI(void) cvReleaseImage( IplImage** image );
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:154:30: error: ‘IplImage’ was not declared in this scope
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:154:41: error: ‘image’ was not declared in this scope
CVAPI(void) cvReleaseImage( IplImage** image );
^
In file included from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.h:65:0,
from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.cpp:56:
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:157:7: error: ‘IplImage’ does not name a type
CVAPI(IplImage_) cvCloneImage( const IplImage_ image );
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/types_c.h:93:49: note: in definition of macro ‘CVAPI’

define CVAPI(rettype) CV_EXTERN_C CV_EXPORTS rettype CV_CDECL

                                             ^

In file included from /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/utility.hpp:886:0,
from /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core.hpp:3165,
from /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/types_c.h:101,
from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.h:65,
from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.cpp:56:
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:169:29: error: variable or field ‘cvSetImageCOI’ declared void
CVAPI(void) cvSetImageCOI( IplImage* image, int coi );
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:169:29: error: ‘IplImage’ was not declared in this scope
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:169:39: error: ‘image’ was not declared in this scope
CVAPI(void) cvSetImageCOI( IplImage* image, int coi );
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:169:46: error: expected primary-expression before ‘int’
CVAPI(void) cvSetImageCOI( IplImage* image, int coi );
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:177:34: error: ‘IplImage’ does not name a type
CVAPI(int) cvGetImageCOI( const IplImage* image );
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:177:44: error: ISO C++ forbids declaration of ‘image’ with no type [-fpermissive]
CVAPI(int) cvGetImageCOI( const IplImage* image );
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:190:29: error: variable or field ‘cvSetImageROI’ declared void
CVAPI(void) cvSetImageROI( IplImage* image, CvRect rect );
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:190:29: error: ‘IplImage’ was not declared in this scope
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:190:39: error: ‘image’ was not declared in this scope
CVAPI(void) cvSetImageROI( IplImage* image, CvRect rect );
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:190:46: error: ‘CvRect’ was not declared in this scope
CVAPI(void) cvSetImageROI( IplImage* image, CvRect rect );
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:201:31: error: variable or field ‘cvResetImageROI’ declared void
CVAPI(void) cvResetImageROI( IplImage* image );
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:201:31: error: ‘IplImage’ was not declared in this scope
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:201:41: error: ‘image’ was not declared in this scope
CVAPI(void) cvResetImageROI( IplImage* image );
^
In file included from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.h:65:0,
from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.cpp:56:
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:208:7: error: ‘CvRect’ does not name a type
CVAPI(CvRect) cvGetImageROI( const IplImage* image );
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/types_c.h:93:49: note: in definition of macro ‘CVAPI’

define CVAPI(rettype) CV_EXTERN_C CV_EXPORTS rettype CV_CDECL

                                             ^

/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:218:7: error: ‘CvMat’ does not name a type
CVAPI(CvMat_) cvCreateMatHeader( int rows, int cols, int type );
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/types_c.h:93:49: note: in definition of macro ‘CVAPI’

define CVAPI(rettype) CV_EXTERN_C CV_EXPORTS rettype CV_CDECL

                                             ^

/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:254:7: error: ‘CvMat’ does not name a type
CVAPI(CvMat_) cvInitMatHeader( CvMat* mat, int rows, int cols,
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/types_c.h:93:49: note: in definition of macro ‘CVAPI’

define CVAPI(rettype) CV_EXTERN_C CV_EXPORTS rettype CV_CDECL

                                             ^

/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:272:7: error: ‘CvMat’ does not name a type
CVAPI(CvMat_) cvCreateMat( int rows, int cols, int type );
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/types_c.h:93:49: note: in definition of macro ‘CVAPI’

define CVAPI(rettype) CV_EXTERN_C CV_EXPORTS rettype CV_CDECL

                                             ^

In file included from /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/utility.hpp:886:0,
from /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core.hpp:3165,
from /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/types_c.h:101,
from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.h:65,
from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.cpp:56:
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:285:28: error: variable or field ‘cvReleaseMat’ declared void
CVAPI(void) cvReleaseMat( CvMat_* mat );
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:285:28: error: ‘CvMat’ was not declared in this scope
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:285:36: error: ‘mat’ was not declared in this scope
CVAPI(void) cvReleaseMat( CvMat** mat );
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:298:32: error: variable or field ‘cvDecRefData’ declared void
CV_INLINE void cvDecRefData( CvArr* arr )
^
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:298:32: error: ‘CvArr’ was not declared in this scope
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:298:39: error: ‘arr’ was not declared in this scope
CV_INLINE void cvDecRefData( CvArr* arr )
^
/home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.cpp:847:1: error: expected ‘}’ at end of input
}
^
make[2]: *** [CMakeFiles/bgs.dir/home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.cpp.o] Error 1
make[1]: *** [CMakeFiles/bgs.dir/all] Error 2
make: *** [all] Error 2
myuser@mylaptop:~/Downloads/bgslibrary-master/example_linux$

I'm not sure its a bug and might be something in my env settings but I think here is the best place to ask.

Cheers
MDreamer

could you provide the Help documentation?

I try to compile with vs2012 but without success.it has been a lot of errors.I had modified the code but still a lot of errors .I did not find the help documentation on the website and I do not know how to be able to successfully apply it,.would you be able to offer the user help documentation ? THX

Demo core dump on Ubuntu

Clean install of opencv 2.4.9 on an Ubuntu 14.04 VM, bgslibrary builds fine but the demos immediately dump core.

winawer@ubuntu:~/Downloads/bgslibrary/build$ ./bgs_demo vtest2.avi
Using OpenCV 2.4.9
Openning: vtest2.avi
FrameDifferenceBGS()
OpenCV Error: Null pointer (Invalid pointer to file storage) in cvWriteInt, file    /home/winawer/Downloads/opencv-2.4.9/modules/core/src/persistence.cpp, line 2964
terminate called after throwing an instance of 'cv::Exception'
what():  /home/winawer/Downloads/opencv-2.4.9/modules/core/src/persistence.cpp:2964: error: (-27) Invalid pointer to file storage in function cvWriteInt

and

winawer@ubuntu:~/Downloads/bgslibrary/build$ ./bgs -uf=true -fn vtest2.avi
-----------------------------------------
Background Subtraction Library v1.9.1     
http://code.google.com/p/bgslibrary       
by:                                       
Andrews Sobral ([email protected])  
-----------------------------------------
Using OpenCV version 2.4.9
VideoAnalysis()
VideoCapture()
FrameProcessor()
OpenCV Error: Null pointer (Invalid pointer to file storage) in cvWriteString, file    /home/winawer/Downloads/opencv-2.4.9/modules/core/src/persistence.cpp, line 2980
std::exception:/home/winawer/Downloads/opencv- 2.4.9/modules/core/src/persistence.cpp:2980: error: (-27) Invalid pointer to file storage in  function cvWriteString

Repeated the test with other videos, including the one in the repo (video.avi). Same thing. OpenCV demos and helloworlds run fine, so I don't think it's an OpenCV issue. Compiled the code in the README as well, got the same problem:

winawer@ubuntu:~/Downloads/bgslibrary/build$ ./test
HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP
FrameDifferenceBGS()
select timeout
 OpenCV Error: Null pointer (Invalid pointer to file storage) in cvWriteInt, file /home/winawer/Downloads/opencv-2.4.9/modules/core/src/persistence.cpp, line 2964
 terminate called after throwing an instance of 'cv::Exception'
 what():  /home/winawer/Downloads/opencv-2.4.9/modules/core/src/persistence.cpp:2964: error: (-27) Invalid pointer to file storage in function cvWriteInt
 Aborted (core dumped)

error: expected unqualified-id before numeric constant

Hi, Andrew:

I upgraded from Ubuntu 14.04 to 16.04, with GCC 5.4.0 + OpenCV 3.1.0, I failed to build the bgslibrary, with the following error messages:

.../package_bgs/dp/Bgs.h:40: error: expected unqualified-id before numeric constant static const int BACKGROUND = 0;
.../package_bgs/dp/Bgs.h:41: error: expected unqualified-id before numeric constant
static const int FOREGROUND = 255;

it looks like this file dp/Bgs.h, the following 2 lines

static const int BACKGROUND = 0;
static const int FOREGROUND = 255;

is buggy, which seems to be weird to me....

Any suggestions?

Cheers
Pei

Access Violation Reading

Been try to use this library, some of method worked, but others not. Basic method absolutely fine, i got no problem compile it and ran it. I got "access violation reading location" error when trying others package. Mostly the error comes in the function "operator" in RgbPixel Class.
bgs_error2
This happen in almost method dp package.
I'm following README_VISUAL_STUDIO_USERS.txt to generate visual studio project. Is it a bug or i'm doing something wrong?

Like in this picture below:
bgs_error1
i'm trying to use "DPWrenGABGS" method, and got that error.
Any help would be so much appreciated
Thanks

Missing Platform files for "BGSLibrary v2.0.0 with QT GUI"

Dear Sobral,

The application in "BGSLibrary v2.0.0 with QT GUI" does not work due to missing platform files for Windows, you may have point not to add it but it may be hard for someone to find the right version of the plugins (qwindows.dll ) for relevant Qt version, compiler type and architecture to make it work. Could you also provide the needed files with the package? (QTDir/../../plugins/platforms/qwindows.dll)

Thanks in advance.

cmake: exclude some components when using msvc10

Using cmake to create msvc project files is more convenient because it automatically detects opencv path etc.
However, ck/MotionDetection uses the c++11 VLA feature which is not supported by MSVC2010 and must be excluded since nobody will remove the VLA stuff.
CMakelists.txt should do this based on the build system generator flags.

This is a minor since the MSVC files provided with bgslib work fine.

Doesn't compile with clang 4.2 on mac osx

Cannot compile with clang on mac osx because of misplaced headers. For example,

bgslibrary/package_bgs/pl/DistanceUtils.h:190:68: error: no template named 'enable_if' in namespace 'std'; did you mean
      '__gnu_cxx::__enable_if'?
/Users/osilokee/workspace/startups/traffic/bgslibrary/package_bgs/pl/DistanceUtils.h:190:83: error: no template named 'is_floating_point' in namespace 'std'; did you mean
      '::std::tr1::is_floating_point'?

Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin11.4.2
Thread model: posix

Error when building on Raspberry Pi

Hello,

I get the following error when running make command:

Building CXX object CMakeFiles/bgs.dir/package_bgs/pl/SuBSENSE.cpp.o
In file included from /home/pi/Development/bgslibrary/package_bgs/pl/BackgroundSubtractorSuBSENSE.h:3:0,
from /home/pi/Development/bgslibrary/package_bgs/pl/SuBSENSE.cpp:2:
/home/pi/Development/bgslibrary/package_bgs/pl/BackgroundSubtractorLBSP.h:29:10: error: ‘AlgorithmInfo’ in namespace ‘cv’ does not name a type
In file included from /home/pi/Development/bgslibrary/package_bgs/pl/SuBSENSE.cpp:2:0:
/home/pi/Development/bgslibrary/package_bgs/pl/BackgroundSubtractorLBSP.h:23:15: warning: ‘virtual void BackgroundSubtractorLBSP::initialize(const cv::Mat&)’ was hidden [-Woverloaded-virtual]
/home/pi/Development/bgslibrary/package_bgs/pl/BackgroundSubtractorSuBSENSE.h:41:15: warning: by ‘virtual void BackgroundSubtractorSuBSENSE::initialize(const cv::Mat&, const cv::Mat&)’ [-Woverloaded-virtual]
CMakeFiles/bgs.dir/build.make:1664: recipe for target 'CMakeFiles/bgs.dir/package_bgs/pl/SuBSENSE.cpp.o' failed
make[2]: *** [CMakeFiles/bgs.dir/package_bgs/pl/SuBSENSE.cpp.o] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/bgs.dir/all' failed
make[1]: *** [CMakeFiles/bgs.dir/all] Error 2
Makefile:72: recipe for target 'all' failed
make: *** [all] Error 2

Any help would be appreciated, thanks.

documentation

Hello,
I use this library in my bachelor work, is there any documentation? I need parameterized time of background adaptation, etc.
Thank you for any answer.

Library files installed all directly under /usr/local/include/package_bgs/

On the source code, the library files are placed inside sub directories, like `bgslibrary/package_bgs/[lb,ae,av,bl]... After installing using the default parameters, all the library files get inside the same dir/usr/local/include/package_bgs/``, which causes compilation error, because those files are still including other library files on the parent path:

LBAdaptiveSOM.h:#include "../IBGS.h"
LBFuzzyAdaptiveSOM.h:#include "../IBGS.h"
LBFuzzyGaussian.h:#include "../IBGS.h"
LBMixtureOfGaussians.h:#include "../IBGS.h"
LBSimpleGaussian.h:#include "../IBGS.h"

When I try to compile with these libraries I get the error:

/usr/local/include/package_bgs/LBAdaptiveSOM.h:25:21: fatal error: ../IBGS.h: No such file or directory
 #include "../IBGS.h"
                     ^
compilation terminated.

libbgs.so Undefined reference to OpenCV functions

On attempting to build on Ubuntu 12.04 with OpenCV 2.4.8, the make command runs into an error when trying to link the relevant libraries:

[ 97%] Built target bgs
Linking CXX executable bgs
libbgs.so: undefined reference to `int cv::CommandLineParser::analyzeValue<int>(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
libbgs.so: undefined reference to `cv::Algorithm::_create(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
libbgs.so: undefined reference to `cv::BackgroundSubtractor::getBackgroundImage(cv::_OutputArray const&) const'
libbgs.so: undefined reference to `cv::CommandLineParser::has(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
libbgs.so: undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
libbgs.so: undefined reference to `cv::Mat::operator _IplImage() const'
libbgs.so: undefined reference to `cv::split(cv::Mat const&, std::vector<cv::Mat, std::allocator<cv::Mat> >&)'
libbgs.so: undefined reference to `cv::Exception::Exception(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
libbgs.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> > cv::CommandLineParser::analyzeValue<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
libbgs.so: undefined reference to `cv::imshow(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&)'
libbgs.so: undefined reference to `cv::BackgroundSubtractorMOG::BackgroundSubtractorMOG()'
libbgs.so: undefined reference to `cv::putText(cv::Mat&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)'
libbgs.so: undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
libbgs.so: undefined reference to `cv::BackgroundSubtractorMOG2::BackgroundSubtractorMOG2()'
libbgs.so: undefined reference to `cv::findContours(cv::_OutputArray const&, cv::_OutputArray const&, int, int, cv::Point_<int>)'
libbgs.so: undefined reference to `cv::BackgroundSubtractorMOG2::getBackgroundImage(cv::_OutputArray const&) const'
libbgs.so: undefined reference to `bool cv::CommandLineParser::get<bool>(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
libbgs.so: undefined reference to `cv::CommandLineParser::printParams()'
libbgs.so: undefined reference to `cv::imread(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
libbgs.so: undefined reference to `cv::Mat::Mat(_IplImage const*, bool)'
libbgs.so: undefined reference to `cv::CommandLineParser::CommandLineParser(int, char const* const*, char const*)'
libbgs.so: undefined reference to `cv::drawContours(cv::_OutputArray const&, cv::_InputArray const&, int, cv::Scalar_<double> const&, int, int, cv::_InputArray const&, int, cv::Point_<int>)'
libbgs.so: undefined reference to `cv::CommandLineParser::getString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: ld returned 1 exit status
make[2]: *** [bgs] Error 1
make[1]: *** [CMakeFiles/bgs_bin.dir/all] Error 2
make: *** [all] Error 2

Possible problem and fix for DPTexture

Can't presently issue a pull request, but I think that in the line:

https://github.com/andrewssobral/bgslibrary/blob/master/package_bgs/dp/TextureBGS.cpp#L142

the operator () is invoked with arguments (x, y) but in

https://github.com/andrewssobral/bgslibrary/blob/master/package_bgs/dp/Image.h#L322

the operator () assumens (row, colum):

// pixel-level access using image(row, col)
inline unsigned char& operator()(const int r, const int c)

so the correct invocation should have been with (y, x), and in fact with the change fixes an invalid memory reference error.

compiler warnings

Compiling code using bgslib headers issues a lot of warnings especially at high warning levels. I care especially for the warnings issued when using the headers, not so much for the ones wen compiling the library. Many of them could be resolved easily.

What is you policy on that? Never change imported files to be able to upgrade them to new release from the author? Or should I just put a pull request?

Problem in Demo.cpp while building in VS 2013

I am trying to build the vs 2013 solution and while building the demo.cpp it is giving 2 errors

  1. error LNK1169: one or more multiply defined symbols found C:\bgslibrary\RESULTS\bgslibrary.exe
  2. error LNK2005: _main already defined in Demo.obj C:\bgslibrary\vs2013\Main.obj

Failed to build bgs

Hello,
I am using Ubuntu 14.04 with opencv-3.0.0-rc1 libraries correctly installed.
I am trying to build the latest branch of bgslibrary (bgslibrary-opencv3) but when i run the make command i get the following error:

nico@nico-pc:~/Downloads/bgslibrary-opencv3/build$ make
Scanning dependencies of target bgs
[ 1%] Building CXX object CMakeFiles/bgs.dir/FrameProcessor.cpp.o
[ 2%] Building CXX object CMakeFiles/bgs.dir/PreProcessor.cpp.o
[ 3%] Building CXX object CMakeFiles/bgs.dir/VideoAnalysis.cpp.o
[ 4%] Building CXX object CMakeFiles/bgs.dir/VideoCapture.cpp.o
[ 5%] Building CXX object CMakeFiles/bgs.dir/package_bgs/pl/LBSP.cpp.o
[ 6%] Building CXX object CMakeFiles/bgs.dir/package_bgs/pl/SuBSENSE.cpp.o
In file included from /home/nico/Downloads/bgslibrary-opencv3/package_bgs/pl/BackgroundSubtractorSuBSENSE.h:3:0,
from /home/nico/Downloads/bgslibrary-opencv3/package_bgs/pl/SuBSENSE.cpp:2:
/home/nico/Downloads/bgslibrary-opencv3/package_bgs/pl/BackgroundSubtractorLBSP.h:29:10: error: ‘AlgorithmInfo’ in namespace ‘cv’ does not name a type
virtual cv::AlgorithmInfo* info() const;
^
/home/nico/Downloads/bgslibrary-opencv3/package_bgs/pl/BackgroundSubtractorLBSP.h:23:15: warning: ‘virtual void BackgroundSubtractorLBSP::initialize(const cv::Mat&)’ was hidden [-Woverloaded-virtual]
virtual void initialize(const cv::Mat& oInitImg);
^
In file included from /home/nico/Downloads/bgslibrary-opencv3/package_bgs/pl/SuBSENSE.cpp:2:0:
/home/nico/Downloads/bgslibrary-opencv3/package_bgs/pl/BackgroundSubtractorSuBSENSE.h:41:15: warning: by ‘virtual void BackgroundSubtractorSuBSENSE::initialize(const cv::Mat&, const cv::Mat&)’ [-Woverloaded-virtual]
virtual void initialize(const cv::Mat& oInitImg, const cv::Mat& oROI);
^
make[2]: *** [CMakeFiles/bgs.dir/package_bgs/pl/SuBSENSE.cpp.o] Error 1
make[1]: *** [CMakeFiles/bgs.dir/all] Error 2
make: *** [all] Error 2

I really don't get the point of the error: can anybody help me please?
Thanks

getting error while compiling Demo.cpp

I am trying to compile Demo.cpp with this command: g++ -o test1 Demo.cpp $(pkg-config opencv --cflags --libs)
and it throws out the error: undefined reference to `FrameDifferenceBGS::FrameDifferenceBGS()'
Please help me!!

Build Error in mac osx

it has build error on mac osx
to correct it you should change

include <malloc.h>

in file "SJN_MultiCueBGS.h"
into this:

if !defined(APPLE)

include <malloc.h>

else

include <stdlib.h>

endif

Please clarify used papers

Hi,

Looks like implementation of Gaussian Mixture Model (GMM or MoG) in DPZivkovicAGMMBGS.cpp is based on Fuzzy GMM (based on equations used in the code). Only LBMixtureOfGaussians.cpp is based on original Zivkovic papers. If I'm looking in wrong papers - please provide reference to the correct one. Thank you.

Build error - taking address of temporary

Hi.
Everytime I want to build this library I get these errors:

[ 25%] Building CXX object CMakeFiles/bgs.dir/package_bgs/pt/PixelBasedAdaptiveSegmenter.cpp.o
[ 26%] Building CXX object CMakeFiles/bgs.dir/package_bgs/sjn/SJN_MultiCueBGS.cpp.o
/home/seberm/BTSync/StableData/Compile/bgslibrary/src/bgslibrary-git/package_bgs/sjn/SJN_MultiCueBGS.cpp: In member function ‘virtual void SJN_MultiCueBGS::process(const cv::Mat&, cv::Mat&, cv::Mat&)’:
/home/seberm/BTSync/StableData/Compile/bgslibrary/src/bgslibrary-git/package_bgs/sjn/SJN_MultiCueBGS.cpp:80:39: error: taking address of temporary [-fpermissive]
  IplImage* frame = &IplImage(img_input);
                                       ^
/home/seberm/BTSync/StableData/Compile/bgslibrary/src/bgslibrary-git/package_bgs/sjn/SJN_MultiCueBGS.cpp: In member function ‘void SJN_MultiCueBGS::GaussianFiltering(IplImage*, uchar***)’:
/home/seberm/BTSync/StableData/Compile/bgslibrary/src/bgslibrary-git/package_bgs/sjn/SJN_MultiCueBGS.cpp:526:37: error: taking address of temporary [-fpermissive]
   IplImage* img = &IplImage(temp_img);
                                     ^
CMakeFiles/bgs.dir/build.make:540: recipe for target 'CMakeFiles/bgs.dir/package_bgs/sjn/SJN_MultiCueBGS.cpp.o' failed
make[2]: *** [CMakeFiles/bgs.dir/package_bgs/sjn/SJN_MultiCueBGS.cpp.o] Error 1
CMakeFiles/Makefile2:63: recipe for target 'CMakeFiles/bgs.dir/all' failed
make[1]: *** [CMakeFiles/bgs.dir/all] Error 2
Makefile:106: recipe for target 'all' failed
make: *** [all] Error 2

OS and dependencies:

$ uname -a
Linux daisy 3.12.9-2-ARCH #1 SMP PREEMPT Fri Jan 31 10:22:54 CET 2014 x86_64 GNU/Linux
opencv 2.4.8-1 [installed]
cmake 2.8.12.2-1 [installed]

I'm trying to build revision e29bd0c1.

What I should do? Do I need any other dependency?

bgslibrary opencv3 NO rule to install...

Installing with make install...

========================= Installation results ===========================
make: *** No rule to make target 'install'. Stop.

**** Installation failed. Aborting package creation.

Cleaning up...OK

Bye.

Problem during make

I'm trying to install the library and I get this error during make
[ 1%] Building CXX object CMakeFiles/bgs.dir/FrameProcessor.cpp.o In file included from /home/rodrigo/Downloads/bgslibrary/FrameProcessor.h:29:0, from /home/rodrigo/Downloads/bgslibrary/FrameProcessor.cpp:17: /home/rodrigo/Downloads/bgslibrary/package_bgs/MixtureOfGaussianV1BGS.h:30:3: error: ‘BackgroundSubtractorMOG’ in namespace ‘cv’ does not name a type cv::BackgroundSubtractorMOG mog; ^ In file included from /home/rodrigo/Downloads/bgslibrary/FrameProcessor.h:30:0, from /home/rodrigo/Downloads/bgslibrary/FrameProcessor.cpp:17: /home/rodrigo/Downloads/bgslibrary/package_bgs/MixtureOfGaussianV2BGS.h:30:32: error: cannot declare field ‘MixtureOfGaussianV2BGS::mog’ to be of abstract type ‘cv::BackgroundSubtractorMOG2’ cv::BackgroundSubtractorMOG2 mog; ^ In file included from /usr/local/include/opencv2/video.hpp:57:0, from /usr/local/include/opencv2/opencv.hpp:49, from /home/rodrigo/Downloads/bgslibrary/IFrameProcessor.h:19, from /home/rodrigo/Downloads/bgslibrary/FrameProcessor.h:20, from /home/rodrigo/Downloads/bgslibrary/FrameProcessor.cpp:17: /usr/local/include/opencv2/video/background_segm.hpp:90:20: note: because the following virtual functions are pure within ‘cv::BackgroundSubtractorMOG2’: class CV_EXPORTS_W BackgroundSubtractorMOG2 : public BackgroundSubtractor ^ /usr/local/include/opencv2/video/background_segm.hpp:72:26: note: virtual void cv::BackgroundSubtractor::apply(cv::InputArray, cv::OutputArray, double) CV_WRAP virtual void apply(InputArray image, OutputArray fgmask, double learningRate=-1) = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:81:26: note: virtual void cv::BackgroundSubtractor::getBackgroundImage(cv::OutputArray) const CV_WRAP virtual void getBackgroundImage(OutputArray backgroundImage) const = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:95:25: note: virtual int cv::BackgroundSubtractorMOG2::getHistory() const CV_WRAP virtual int getHistory() const = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:98:26: note: virtual void cv::BackgroundSubtractorMOG2::setHistory(int) CV_WRAP virtual void setHistory(int history) = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:102:25: note: virtual int cv::BackgroundSubtractorMOG2::getNMixtures() const CV_WRAP virtual int getNMixtures() const = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:107:26: note: virtual void cv::BackgroundSubtractorMOG2::setNMixtures(int) CV_WRAP virtual void setNMixtures(int nmixtures) = 0;//needs reinitialization! ^ /usr/local/include/opencv2/video/background_segm.hpp:115:28: note: virtual double cv::BackgroundSubtractorMOG2::getBackgroundRatio() const CV_WRAP virtual double getBackgroundRatio() const = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:118:26: note: virtual void cv::BackgroundSubtractorMOG2::setBackgroundRatio(double) CV_WRAP virtual void setBackgroundRatio(double ratio) = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:125:28: note: virtual double cv::BackgroundSubtractorMOG2::getVarThreshold() const CV_WRAP virtual double getVarThreshold() const = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:128:26: note: virtual void cv::BackgroundSubtractorMOG2::setVarThreshold(double) CV_WRAP virtual void setVarThreshold(double varThreshold) = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:138:28: note: virtual double cv::BackgroundSubtractorMOG2::getVarThresholdGen() const CV_WRAP virtual double getVarThresholdGen() const = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:141:26: note: virtual void cv::BackgroundSubtractorMOG2::setVarThresholdGen(double) CV_WRAP virtual void setVarThresholdGen(double varThresholdGen) = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:145:28: note: virtual double cv::BackgroundSubtractorMOG2::getVarInit() const CV_WRAP virtual double getVarInit() const = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:148:26: note: virtual void cv::BackgroundSubtractorMOG2::setVarInit(double) CV_WRAP virtual void setVarInit(double varInit) = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:150:28: note: virtual double cv::BackgroundSubtractorMOG2::getVarMin() const CV_WRAP virtual double getVarMin() const = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:151:26: note: virtual void cv::BackgroundSubtractorMOG2::setVarMin(double) CV_WRAP virtual void setVarMin(double varMin) = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:153:28: note: virtual double cv::BackgroundSubtractorMOG2::getVarMax() const CV_WRAP virtual double getVarMax() const = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:154:26: note: virtual void cv::BackgroundSubtractorMOG2::setVarMax(double) CV_WRAP virtual void setVarMax(double varMax) = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:162:28: note: virtual double cv::BackgroundSubtractorMOG2::getComplexityReductionThreshold() const CV_WRAP virtual double getComplexityReductionThreshold() const = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:165:26: note: virtual void cv::BackgroundSubtractorMOG2::setComplexityReductionThreshold(double) CV_WRAP virtual void setComplexityReductionThreshold(double ct) = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:172:26: note: virtual bool cv::BackgroundSubtractorMOG2::getDetectShadows() const CV_WRAP virtual bool getDetectShadows() const = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:175:26: note: virtual void cv::BackgroundSubtractorMOG2::setDetectShadows(bool) CV_WRAP virtual void setDetectShadows(bool detectShadows) = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:182:25: note: virtual int cv::BackgroundSubtractorMOG2::getShadowValue() const CV_WRAP virtual int getShadowValue() const = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:185:26: note: virtual void cv::BackgroundSubtractorMOG2::setShadowValue(int) CV_WRAP virtual void setShadowValue(int value) = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:194:28: note: virtual double cv::BackgroundSubtractorMOG2::getShadowThreshold() const CV_WRAP virtual double getShadowThreshold() const = 0; ^ /usr/local/include/opencv2/video/background_segm.hpp:197:26: note: virtual void cv::BackgroundSubtractorMOG2::setShadowThreshold(double) CV_WRAP virtual void setShadowThreshold(double threshold) = 0; ^ make[2]: ** [CMakeFiles/bgs.dir/FrameProcessor.cpp.o] Erro 1 make[1]: ** [CMakeFiles/bgs.dir/all] Erro 2 make: ** [all] Erro 2

Getting errors with throw.cpp using Pixel Based Adaptive Segmenter

The pixel based adaptive segmenter in my program is running well once it is compiled. Once the video was loaded, it is starting to get errors with throw.cpp and the marker always pointing at (PULONG_PTR)&ThisException.params );

If I hide bgs->processing(img_input, img_mask); using // then the program will run but wont be able to
1
see the results. Just the video will continue to play.

I cannot run bgslibrary.exe

Hi,

Thank you for fixing the last issue.

In VS 2010, it compile perferctly, but when I try to run the bgslibrary.exe file, it gives the following message:

'bgslibrary.exe' : Chargé 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18201_none_ec80f00e8593ece5\comctl32.dll', Cannot find or open the PDB file.

Thanks.

Support GPU

Does this library support GPU (like cuda)? I use your library in my project but performane is quite low, not realtime with video HD (1280x720, 12fps). Thanks!

Java_Warper

Hi Andrew
Thank you for your great effort. I need to know how can I integrate this library with a java code. I have a java code that was built for vehicle counting based on the MOG2 algorithm of opencv3.2. I need to replace this algorithm with a better one, and I need to try between all of your library algorithm listed . In other word, Is it possible to call an algorithm from your library to be integrated in a java code?If so, could u plz clarify how this can be done step by step?

thanks in advance

What is the official branch for OpenCV3.1.0?

Hi, I've found that there are two branches regarding OpenCV 3, opencv3 and opencv3.x. What will be official for supporting OpenCV 3.1+? Or Is there any reason for preserve both?

Null Pointer error when using webcam.

Compiled successful on Ubuntu 14.04 with OpenCV 2.4.11 (32 bit)
The demo run_video.sh runs perfect (I did not try other pre-recorded video's)
But when I want to use the webcam input, cli = bgs -uc -ca=0
I get:
OpenCV Error: Null pointer (Invalid pointer to file storage) in cvWriteString, file /home/{username}/opencv-2.4.11/modules/core/src/persistence.cpp, line 2997
std::exception:/home/{username}/opencv-2.4.11/modules/core/src/persistence.cpp:2997: error: (-27) Invalid pointer to file storage in function cvWriteString

Can't run demo on Linux

I followed the steps from REAME_LINUX.txt for my Ubuntu 12.04 and the run_camera.sh was working. But the other two run_video and run_demo are not. I'm not getting any error. It just doesn't show anything.

./run_video.sh

screenshot from 2015-12-21 15 04 31

It just shows the above output and nothing else.

screenshot from 2015-12-21 15 07 13

Same for run_demo.sh. I tried with other video data but it just doesn't show anything.

ConnectedComponents.cpp

Hi,

I try to comile the bgslibrary code with vs 2010 but I have the following error : c1xx : fatal error C1083: Cannot open source file : '..\package_bgs\dp\ConnectedComponents.cpp' : No such file or directory.

Thankx.

installed header files in flat directory structure

Hey
Thanks for a great library! I noticed that when I install it (sudo make install), all the header files get copied into a flat file hierarchy under /usr/local/include/package_bgs

whereas originally they had structure for example package_bgs/dp/DPAdaptiveMedianBGS.h

This file refers to

include "../IBGS.h"

as if the files had the original file structure

BGSLibrary v2.0.0 with QT GUI - qwindows.dll is placed in wrong directory

bgslibrary2_qtgui_opencv320_x64.zip
qwindows.dll should be placed in "platforms" folder (in production environment), not the root directory. Otherwise, the program will output an error:

This application failed to start because it could not find or load the Qt platform plugin "windows"
in "".

In development environment, it works normally, while in production environment, it exits with the error.

cannot convert from 'const char [1]' to 'char

"cannot convert from 'const char [1]' to 'char *'Conversion from string literal loses const qualifier"
error at PerformanceUtils class ImageROC and PerformanceEvaluation functions while compiling with Qt Creator on windows 64 with opencv3. After commenting out these functions it compiles and works properly.

Error building qt GUI on Ubuntu

Hi, I'm on Ubuntu 16.04 with GCC version 5.4.1. While making the qt gui, I get the following error related to libgtk:

[  2%] Automatic moc and uic for target libbgs
[  2%] Automatic moc and uic for target bgslibrary_gui
[  2%] Built target bgslibrary_gui_automoc
[  2%] Built target libbgs_automoc
[ 93%] Built target libbgs
[ 94%] Linking CXX executable bgslibrary_gui
//usr/lib/x86_64-linux-gnu/libgtk-3.so.0: undefined reference to `cairo_surface_set_device_scale'
//usr/lib/x86_64-linux-gnu/libgtk-3.so.0: undefined reference to `cairo_surface_get_device_scale'
collect2: error: ld returned 1 exit status
CMakeFiles/bgslibrary_gui.dir/build.make:280: recipe for target 'bgslibrary_gui' failed
make[2]: *** [bgslibrary_gui] Error 1
CMakeFiles/Makefile2:68: recipe for target 'CMakeFiles/bgslibrary_gui.dir/all' failed
make[1]: *** [CMakeFiles/bgslibrary_gui.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

I did a Google search and found out that some people got rid of this error by removing anaconda/lib folder from their LD_LIBRARY_PATH. I tried that but it did not solve the problem for me. Any suggestions?

Temporal median implementation accuracy

After reading the Calderara paper linked in the Temporal Median implementation (see section 2.2) I believe that the implementation is not faithful to the description of the algorithm. In particular the low and hight thresholds used to binarize the foreground mask are not per-pixel thresholds, but global.

Null pointer

Hello Andrews.
My name is Alexander and I need your help. Your bgslibrary is really cool thing. I turned and tried BGSLibrary v1.9.1 with MFC GUI v1.4.1 - stunning result. But when I tried to create a test project and connect BGSLibrary to your code, I've got the error. Differently tried it, but I do not understand what's wrong. I'm new to development in C + +. I'm using QtCreator. Tried to do everything like in your examples (Demo.cpp and others), but fails. Please help me find what I doing wrong. I attach screen of my project's code and structure to the letter and the resulting image of error.
bgslibrary_test_project_main
bgslibrary_test_project_pro_file
bgslibrary_test_project_structure
bgslibrary_try_error
P.S. Sorry for my bad english.

.

could you offer the lib file ?

could you offer the lib file directly be called by the C++ project which can omit the step to compile it? Indeed tried many times also modified the part of the code but still a lot of errors which led to unsuccessfully compile

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.