VAT  3.0
Video Analysis Tool
SuperpixelModuleSEEDS.h
1 #ifndef SUPERPIXELMODULESEEDS_H
2 #define SUPERPIXELMODULESEEDS_H
3 
4 #include <map>
5 #include <string>
6 #include <QImage>
7 #include "Datapool.h"
8 #include "ModuleInterface.h"
9 #include <QDir>
10 #include "src/json.h"
11 #include "ReliabilityBg.h"
12 #include "opencv2/opencv.hpp"
13 #ifdef __OPENCV3__
14 #include "src/ximgproc/ximgproc.hpp"
15 #endif
16 
18 public:
21 
22  //Set module configuration parameters
23  bool setParameters(QDomNode& config);
24 
25  //Initialization after reading parameters
26  bool init();
27 
28  //Function executed at each frame
29  bool run();
30 
31  //update parameters at runtime.
32  bool updateParameters();
33 
34  //Suppress extra pixel space per line
35  uchar *suppressExtraPixelSpace(QImage *image);
36 #ifdef __OPENCV3__
37  cv::Ptr<cv::ximgproc::SuperpixelSEEDS> m_SEEDS;
38 #endif
39  //Desired number of superpixels. Note that the actual number may be smaller due to restrictions (depending on the image size and num_levels).
40  //Use getNumberOfSuperpixels() to get the actual number.
41  int m_superpixelnumber;
42  //Number of block levels. The more levels, the more accurate is the segmentation, but needs more memory and CPU time.
43  int m_num_levels;
44  //Use prior – enable 3x3 shape smoothing term if >0. A larger value leads to smoother shapes. prior must be in the range [0, 5].
45  int m_use_prior;
46  //Number of histogram bins.
47  int m_histogram_bins;
48  //If true, iterate each block level twice for higher accuracy.
49  bool m_double_step;
50  //Number of pixel level iterations. Higher number improves the result.
51  int m_num_iterations;
52 
53 
54  private:
55  int currentFrame;
56  int line;
57  bool first;
58  bool validate_once;
59  bool different_bg_current;
60 };
61 
62 #endif // SUPERPIXELMODULESEEDS_H
Definition: SuperpixelModuleSEEDS.h:17
Definition: ModuleInterface.h:43
An object of this class is instantiated at main code, and this object is used by every class to push ...
Definition: Datapool.h:39