VAT  3.0
Video Analysis Tool
DominantColorSegmentation.h
1 #ifndef DOMINANTCOLORSEGMENTATION_H
2 #define DOMINANTCOLORSEGMENTATION_H
3 
4 /***
5  * Author: Daniel Cárdenas, dcardenasn@gmail.com
6  * Paper: Automatic Soccer Video Analysis and Summarization
7  *
8  * Tipo: Segmentacion
9  * Methodo: Dominant Color Segmentation
10  *
11 */
12 
13 #include <QImage>
14 #include "Datapool.h"
15 #include "ModuleInterface.h"
16 #include <QDir>
17 #include "SegmentationTool.h"
18 #include "opencv2/opencv.hpp"
19 #include <math.h>
20 #include <stdio.h>
21 
22 using namespace cv;
23 
25 {
26 public:
29 
30  //Set module configuration parameters
31  bool setParameters(QDomNode& config);
32 
33  //Initialization after reading parameters
34  bool init();
35 
36  //Function executed at each frame
37  bool run();
38 
39  //update parameters at runtime.
40  bool updateParameters();
41 
42 private:
43 
45  double HistogramPeakThreshold;
46  double Tcolor;
47  double upperpenalty;
48  double IntensityThreshold;
49 
51  bool first_time;
52  double Hmean;
53  double Smean;
54  double Imean;
55 
57  bool getHSIColorHistogram(QImage *img);
58 
59  double find_histogram_mean(int *histogram, int Hpeak, uchar ipeak);
60  double get_cylindrical_dist(int H, int S, int I);
61 
62 };
63 
64 #endif // DOMINANTCOLORSEGMENTATION_H
Definition: ModuleInterface.h:43
Definition: QtOpencvConversion.h:19
Definition: DominantColorSegmentation.h:24
An object of this class is instantiated at main code, and this object is used by every class to push ...
Definition: Datapool.h:39