VAT  3.0
Video Analysis Tool
segmentationWithColorFilterModule.h
1 #ifndef SEGMENTATIONWITHCOLORFILTER_H
2 #define SEGMENTATIONWITHCOLORFILTER_H
3 
4 
5 #include <map>
6 #include <string>
7 #include <QImage>
8 #include "Datapool.h"
9 #include "ModuleInterface.h"
10 #include <QDir>
11 
12 
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  //Global updating settings functions
31  bool setGlobalZones();
32  bool setGlobalMask();
33  bool insideInZone(int i, int j);
34  bool outsideOutZone(int i, int j);
35 
36  void updateBGGlobally(QImage *current);
37 
38 
39  private:
40  int currentFrame;
41  int line;
42  int cont;
43  bool BGup;
44  double alpha; //tasa de aprendizaje
45  uchar T;
46  bool m_global;
47  int m_N;
48  int m_K;
49  QString m_InZone;
50  QString m_OutZone;
51  bool m_inDefined;
52  bool m_outDefined;
53  bool m_aperture;
54  bool globalMaskReady;
55  QImage *globalMask;
56  int globalValidPoints;
57  bool global_validated;
58  bool validate_once;
59  bool different_bg_current;
60 
61  std::map<int, std::deque<RLESegment> > RLEglobal;
62 
63  zoneType zInType, zOutType;
64  QSharedPointer<world::Zone> zin3D, zout3D;
65  QSharedPointer<world::Zone2D> zin2D, zout2D;
66  QSharedPointer<world::ZoneH> zinH, zoutH;
67 
68  QString bgImName;
69  bool first;
70  bool globalNotSet;
71  bool m_mask;
72  QString m_maskImName;
73  void applyAperture(QImage *, QImage *);
74  void getChromaticSegmentation(QImage *, QImage *,int,int);
75  void updateBG(QImage *);
76  std::map<int, std::deque<int> > globalPoints;
77  cv::Mat element;
78 
79  int minGrade, maxGrade;
80 };
81 
82 
83 #endif // SEGMENTATIONWITHCOLORFILTER_H
Definition: ModuleInterface.h:43
Definition: segmentationWithColorFilterModule.h:13
An object of this class is instantiated at main code, and this object is used by every class to push ...
Definition: Datapool.h:39