VAT  3.0
Video Analysis Tool
TemporalVarianceBGModule.h
1 #ifndef TEMPORAL_VARIANCE_BG_MODULE_H
2 #define TEMPORAL_VARIANCE_BG_MODULE_H
3 
4 #include "Datapool.h"
5 #include "ModuleInterface.h"
6 #include "ThermalColor.h"
7 #include "ReliabilityBg.h"
8 #include <QDir>
9 
10 #define TRUNCATE_VALUE 0.0000001 //valor utilizado para evitar problemas de aproximacion
11 
13 {
14 public:
17 
18  //Set module configuration parameters
19  bool setParameters(QDomNode& config);
20 
21  //Initialization after reading parameters
22  bool init();
23 
24  //Function executed at each frame
25  bool run();
26 
27  //update parameters at runtime.
28  bool updateParameters();
29 
30  float confidenceOfForeground(float diference, float stdDeviation);
31  void showHistogram( cv::Mat histogram, int numBins);
32  void percentilCut(cv::Mat &histogram, float IQRFactor);
33 
34  void tuneParameters();
35 
36  bool firstTime, displayFirstModel;
37  int width, height, bgSizeWindow, fgSizeWindow;
38  float factorSigmoid, fgVarianceThreshold, detectionFactorThreshold, fgMaskThreshold,
39  value, bgVarMean, numBgPixels, detectionThreshold, minScale, maxScale;
40  float *ptr_bgMean, *ptr_bgMean2, *ptr_bgVar, *ptr_fgMean, *ptr_fgMean2, *ptr_fgVar;
41  uchar *ptr_dataVarMask, *ptr_fgVarMask, *ptr_fgMask, *ptr_currGrayImg, *ptr_reliability, *ptr_featureMap, *ptr_roi;
42 
43  cv::Mat fgVarianceMask, fgMask, currGrayImg, imgARGB32, currImgC3, reliability, roi;
44  ThermalColor thermalColor;
45 
46  //For tuning
47  bool m_tuningActivated;
48  bool m_tuningFirst;
49  int minFgWin, maxFgWin, stepFgWin, minBgWin, maxBgWin, stepBgWin;
50  float minVarThres, maxVarThres, stepVarThres, minSigmoid, maxSigmoid, stepSigmoid, minDetection, maxDetection, stepDetection;
51 
52 };
53 #endif // TEMPORAL_VARIANCE_BG_MODULE_H
Definition: ModuleInterface.h:43
Definition: TemporalVarianceBGModule.h:12
An object of this class is instantiated at main code, and this object is used by every class to push ...
Definition: Datapool.h:39
Definition: ThermalColor.h:7