VAT  3.0
Video Analysis Tool
setLearning.h
1 #ifndef SETLEARNING_H
2 #define SETLEARNING_H
3 
4 #include "Datapool.h"
5 #include "drawInterface.h"
6 #include "src/blob.h"
7 #include "src/LearningContext.h"
8 #include "src/HierarchyTree.h"
9 #include "src/LearningConcept.h"
10 #include "src/LearningContextualisedObject.h"
11 #include <QPainter>
12 
14 {
15 public:
16  setLearning(Datapool *i_data);
17  ~setLearning();
18 
19  //Set module configuration parameters
20  bool setParameters(QDomNode &config);
21 
22  //Initialization after reading parameters
23  bool init();
24 
25  //Function executed at each frame
26  bool draw(QImage **image);
27 
28  bool paint(QImage *image);
29 
30  void displayShowLearningHighlightP(QPainter &painter, int W, int H, miles::SpLearningContext lc);
31  void displayShowLearningHighlightAttribute(QPainter &painter, int W, int H, miles::SpLearningContext lc);
32  void displayShowLearningRecognised(QPainter &painter, int W, int H, miles::SpLearningContext lc);
33 
34  void getMostLikelyEventsFromStates(double threshold, std::map<long int, miles::SpLearningStateConcept>& conceptsToShow,
35  std::map<long int, miles::SpLearningEventConcept>& eventsToShow,
36  miles::SpLearningContext lc);
37  void displayShowLearningEvents(QPainter &painter, int W, int H,
38  std::map<long int, miles::SpLearningEventConcept>& eventsToShow,
39  std::map<long int, miles::SpLearningStateConcept>& registeredStates);
40  void getLikelyRecognisedStates(double P, std::map<long int, miles::SpLearningStateConcept> &states,
41  miles::SpLearningContext lc);
42  void recurseToLikelyEvents(bool isLikely, miles::SpLearningStateConcept state, double threshold,
43  std::map<long int, miles::SpLearningStateConcept>& conceptsToAdd,
44  std::map<long int, miles::SpLearningEventConcept>& eventsToShow,
45  double P, miles::SpLearningContext lc);
46  void getEventsImage(QImage &im, std::map<long int, miles::SpLearningEventConcept>& eventsToShow,
47  std::map<long int, miles::SpLearningStateConcept>& registeredStates,
48  miles::attribute_id X, miles::attribute_id Y);
49  void paintArrow(QImage &im, int x1, int y1, int x2, int y2, double P, double maxP);
50 
51  bool m_activeLearningDisplay;
52  bool m_showP;
53  bool m_showRecognised;
54  bool m_display2D;
55  bool m_display3D;
56  bool m_displayH;
57  bool m_showEvents;
58  bool m_showFlatP;
59  double m_PThreshold;
60  double m_PEventThreshold;
61  uchar m_learningTransparencyLevel;
62  double m_learningTransparentProbability;
63  miles::attribute_id m_highlightedAttribute;
64 
65 
66  enum learningDisplayType {
67  LD_HighlightAttribute,
68  LD_Events,
69  };
70  enum learningDisplayType m_lDisplayType;
71 };
72 
73 #endif // SETLEARNING_H
Definition: drawInterface.h:23
Definition: setLearning.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