VAT  3.0
Video Analysis Tool
paper2.h
1 #ifndef PAPER2_H
2 #define PAPER2_H
3 #include <map>
4 #include <string>
5 #include <QImage>
6 #include "Datapool.h"
7 #include "ModuleInterface.h"
8 #include <QDir>
9 #include "opencv2/opencv.hpp"
10 #include "VideoAnalysis.h"
11 
12 #define NGabor 8
13 #define sizeFGabor 11
14 #define GFBorder 5//Border=(SizeFGabor-1)/2
15 #define PI 3.14159265358979323846
16 #define LevelSpines 20
17 #include <boost/random.hpp>
18 #include <boost/random/normal_distribution.hpp>
19 
20 
21 
22 class paper2: public ModuleInterface {
23 
24 public:
25  paper2(Datapool *i_data);
26  ~paper2();
27 
28  //Set module configuration parameters
29  bool setParameters(QDomNode& config);
30 
31  //Initialization after reading parameters
32  bool init();
33 
34  //Function executed at each frame
35  bool run();
36 
37  //update parameters at runtime.
38  bool updateParameters();
39 
40  //filtro Gabor------------------------------------------------------------------filtro Gabor|
41  std::deque<cv::Mat> GaborColectionUchar;
42  std::deque<cv::Mat> GaborColection;
43  std::deque<cv::Mat> ImagenesFiltradas;
44  //circular buffer
45 
46  //para calculos de gradiente temporal
47  std::deque<cv::Mat > Fases [5] ;
48  int FasesIndex;
49 
50  void CreateGaborFilters();
51  double GaborFilterValuePar(int , int , double , double , double , double , double );
52  double GaborFilterValueImpar(int , int , double , double , double , double , double );
53  //auxiliares
54  QImage copiaQ;
55  QImage copiaQDepth;
56  QImage Aux;
57  QImage *AUXp1;
58  QImage *AUXp2;
59 
60  cv::Mat copiaCV_RGB;
61  cv::Mat copiaCV_HSV;
62  cv::Mat copiaCV_Gray;
63 
64  cv::Mat copiaCV_Depth;
65  cv::Mat copiaCV_DepthGray;
66  cv::Mat JetMapAux;
67 
68  void FiltroQueFiltra();
69  //utility
70  cv::Mat formatconv_QT2CV(const QImage );
71  cv::Mat dFdT;
72  QImage formatconv_CV2QT(const cv::Mat&);
73  double RegresionLineal5(double A [5]);
74 
75  //potts Model
76 
77  bool FLAG_ARE_SPINES_CREATED;
78  cv::Mat Spines;
79 
80 
81  void InitiateLeSpines(int , int );
82  void HamiltonianEnergyEvaluationAndModify();
83  boost::random::mt19937 rng;//semilla semialeatoria
84 
85 };
86 
87 
88 #endif // PAPER2_H
89 
Definition: ModuleInterface.h:43
Definition: paper2.h:22
An object of this class is instantiated at main code, and this object is used by every class to push ...
Definition: Datapool.h:39