vrcore  0.45
visuReal Messkern
 All Classes Files Functions Variables
mark_evaluators.h
1 #ifndef VR_MARK_EVALUATORS_H
2 #define VR_MARK_EVALUATORS_H
3 
4 namespace vr {
5 
7 {
8 protected:
9  MarkLocator* locator_;
10  cv::Point2f offs_;
11 public:
12  MarkEvaluator() : locator_(0), offs_() {}
13  bool process(const cv::Mat& image, const int radiusMin, const int radiusMax,
14  cv::Rect roi = noRect);
15  virtual ~MarkEvaluator() = 0;
16  virtual bool good() = 0;
17  inline virtual int minCandidates() { return 1; };
18 };
19 
20 inline MarkEvaluator::~MarkEvaluator() { }
21 
22 
24 {
25  Mark& mark_;
26 public:
27  SingleMarkEvaluator(Mark& mark, MarkOrientation orientation) : MarkEvaluator(),
28  mark_(mark) { mark.setOrientation(orientation); }
29  bool good();
30 };
31 
33 {
34 protected:
35  Mark& right_;
36  Mark& left_;
37  float tiltAngleMaxTan_;
38  bool checkMainMarkPairing(const MarkImageData& p, const MarkImageData& q);
39 public:
41  Mark& mainMarkR,
42  Mark& mainMarkL);
44  bool good();
45  inline int minCandidates() { return 2; };
46 };
47 
48 
50 {
51  Mark& top_;
52  Mark& bottom_;
53  float pixelsPerMm_;
54  LateralSide side_;
55  bool checkPairing(
56  const MarkImageData& p,
57  const MarkImageData& q,
58  const float angle,
59  const float inclination);
60  bool checkPairing(const MarkImageData& p, const MarkImageData& q);
61 public:
70  Mark& topMark,
71  Mark& bottomMark,
72  const float pixelsPerMm) : MarkEvaluator(),
73  top_(topMark),
74  bottom_(bottomMark),
75  pixelsPerMm_(pixelsPerMm),
76  side_() {}
77  ~SideMarksEvaluator() {};
78  bool good();
79  inline int minCandidates() { return 2; };
80  inline LateralSide getSide() { return side_; };
81 };
82 
83 }
84 
85 #endif // VR_MARK_EVALUATORS_H
Repräsentiert eine Marke des Meßaufsatzes (aka Meßbügel) im Bild.
Definition: features.h:168
beschreibt eine Visierbügelmarke
Definition: types.h:31
Definition: mark_locator.h:32
SideMarksEvaluator(Mark &topMark, Mark &bottomMark, const float pixelsPerMm)
Definition: mark_evaluators.h:69
Definition: mark_evaluators.h:23
void setOrientation(const MarkOrientation orientation)
Orientierung der schwarzen und weißen Felder in der Markenmitte.
Definition: features.h:188
Definition: mark_evaluators.h:49
Definition: mark_evaluators.h:6
Definition: mark_evaluators.h:32