1 #ifndef _MIXTURE_OF_GAUSSIANS_HH_
2 #define _MIXTURE_OF_GAUSSIANS_HH_
28 #include "FeatureDetector/BlobDetectorBFS.hh"
29 #include <Base/Common/BIASpragmaStart.hh>
30 #include <Base/Common/W32Compat.hh>
33 #include <Base/Image/Image.hh>
34 #include <Filter/Gauss.hh>
35 #ifdef BIAS_HAVE_PTHREADS
70 template <
class StorageType>
79 const unsigned int sizeWindow=3,
80 const float updateFactor=0.1,
91 int InitWeights(
const int maxWeight,
93 const float errorMargin);
95 void SetSmoothing(
const bool smooth);
132 int GetBoundingBoxes(std::vector<BIAS::BIASBlob> &corners);
138 int GetCurrentDistributions(std::vector<
Image<float> > &distributionImages);
141 fUpdateFactor_ = factor;
145 bAllowNewDistributionCreation_ = allow;
148 void EnableCleanup(
bool noise=
false,
bool holes=
false,
bool erosion=
false) {
150 bInverseCleanup_ = holes;
158 int InitOnePixel_(
unsigned int x,
unsigned int y,
unsigned int c,
unsigned int distrib);
178 unsigned int roiULx_,
roiULy_, roiLRx_, roiLRy_;
179 unsigned int dDistributions_, dFrames_,
dWindow_, dCurDistributions_, dFrameCounter_;
182 bool bInited_,
bSmooth_, bAllowNewDistributionCreation_;
186 #ifdef BIAS_HAVE_PTHREADS
192 #include <Base/Common/BIASpragmaEnd.hh>
void SetUpdateFactor(float factor=0.1f)
BIAS::Image< float > weight_
BIAS::Image< float > matchValueImage_
unsigned int workChannels_
BIAS::Gauss< unsigned char, unsigned char > smoothResultFilter_
BIAS::Image< float > workImage_
BIAS::Image< float > cov_
BIAS::BlobDetectorBFS< unsigned char > blobDetector_
BIAS::Image< unsigned char > differenceSmooth_
BIAS::Image< unsigned char > differenceSave_
class for detecting changes in image sequences
BIAS::Image< unsigned char > difference_
MoGColorModel colorModel_
BIAS::Image< unsigned char > marker
Helper class to store blob corners.
pthread_mutex_t * guardimagemutex
BIAS::Image< unsigned char > differenceVisu_
void AllowCreationOfNewDistributions(bool allow)
The image template class for specific storage types.
void EnableCleanup(bool noise=false, bool holes=false, bool erosion=false)
BIAS::Image< float > maxWeight_
BIAS::Image< float > guess_
std::vector< BIAS::BIASBlob > corners_