vrcore  0.45
visuReal Messkern
 All Classes Files Functions Variables
OcvMatPainter.h
1 #pragma once
2 
3 class StatusGroup;
4 
6  {
7  public:
8  static const int OcvNoRestore = 1 << 0;
9  protected:
10  struct LEVEL {
11  std::string key;
12  cv::Mat mBack, mMask;
13  cv::Scalar color;
14  };
15  cv::Scalar maskColor;
16  std::vector<LEVEL> levelVec;
17  StatusGroup statusGroup;
18  cv::Size size;
19 
20  int getLevelIndex (const std::string &key);
21  bool checkBoundings (cv::Point &pt);
22  bool checkBoundings (RoiRect &rect);
23  virtual void doRestore (int idx, cv::Mat &mat);
24  virtual void doBackup (int idx, cv::Mat &mat);
25  virtual void doPaint (int idx, cv::Mat &mat);
26  public:
27  OcvMatPainter ();
28  ~OcvMatPainter ();
29  virtual void reinitialize (cv::Size &size);
30  void restore (cv::Mat &mat);
31  void backup (cv::Mat &mat);
32  void paint (cv::Mat &mat);
33  void restore (const std::string &key, cv::Mat &mat);
34  void backup (const std::string &key, cv::Mat &mat);
35  void paint (const std::string &key, cv::Mat &mat);
36  bool addLevel (const std::string &key, uint8_t r, uint8_t g, uint8_t b);
37  void setStatus (const std::string &key, StatusValue status);
38  void clearStatus (const std::string &key, StatusValue status);
39  void setRestoreOn (const std::string &key) { clearStatus (key, OcvNoRestore); }
40  void setRestoreOff (const std::string &key) { setStatus (key, OcvNoRestore); }
41  void plotRoiRect (const std::string &key, RoiRect &rect);
42  void plotPointVector (const std::string &key, PointVector &pointVec, IntVector &mask, int maskValue = 1);
43  void plotContours (const std::string &key, ContourVector &contour);
44  void plotContours (const std::string &key, ContourVector &contour, int dx, int dy, int minPts = 0, int maxPts = INT_MAX);
45  void plotContours (const std::string &key, DoubleContourSPtrVector &contour);
46  void plotContours (const std::string &key, DoubleContourSPtrVector &contour, int dx, int dy, int minPts = 0, int maxPts = INT_MAX);
47  void plotMarkImageData (const std::string &key, MarkImageData *lpMarkData);
48  void plotMarkImageDataCross (const std::string &key, MarkImageData *lpMarkData, bool b45deg = true);
49  void plotCircle (const std::string &key, MarkImageData *lpMarkData, bool bFilled = false);
50  void plotCircle (const std::string &key, cv::Point &center, int radius, bool bFilled = false);
51  void plotIris (const std::string &key, MarkImageData *lpMarkData);
52 
53  void plotCross (const std::string &key, DblVec center, bool b45 = false, int rad = 8);
54  void plotPoint (const std::string &key, DblVec center, int rad = 3);
55  };
56 
beschreibt eine Visierbügelmarke
Definition: types.h:31
Definition: OcvMatPainter.h:10
Definition: StatusGroup.h:6
Definition: OcvMatPainter.h:5