Image Component Library (ICL)
MarkerCodeICL1.h
Go to the documentation of this file.
1 /********************************************************************
2 ** Image Component Library (ICL) **
3 ** **
4 ** Copyright (C) 2006-2013 CITEC, University of Bielefeld **
5 ** Neuroinformatics Group **
6 ** Website: www.iclcv.org and **
7 ** http://opensource.cit-ec.de/projects/icl **
8 ** **
9 ** File : ICLMarkers/src/ICLMarkers/MarkerCodeICL1.h **
10 ** Module : ICLMarkers **
11 ** Authors: Christof Elbrechter **
12 ** **
13 ** **
14 ** GNU LESSER GENERAL PUBLIC LICENSE **
15 ** This file may be used under the terms of the GNU Lesser General **
16 ** Public License version 3.0 as published by the **
17 ** **
18 ** Free Software Foundation and appearing in the file LICENSE.LGPL **
19 ** included in the packaging of this file. Please review the **
20 ** following information to ensure the license requirements will **
21 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt **
22 ** **
23 ** The development of this software was supported by the **
24 ** Excellence Cluster EXC 277 Cognitive Interaction Technology. **
25 ** The Excellence Cluster EXC 277 is a grant of the Deutsche **
26 ** Forschungsgemeinschaft (DFG) in the context of the German **
27 ** Excellence Initiative. **
28 ** **
29 ********************************************************************/
30 
31 #pragma once
32 
33 #include <ICLUtils/CompatMacros.h>
34 #include <ICLUtils/BasicTypes.h>
35 #include <vector>
36 #include <iostream>
37 
38 namespace icl{
39  namespace markers{
40 
42 
80  static const int P = 5;
82  static const int P1 = P+1;
83 
85  int id;
86 
88  int n[4];
89 
92 
94  MarkerCodeICL1(int id);
95 
97  MarkerCodeICL1(const int ns[4], bool rootRegionColorIsBlack=true);
98 
100  inline int &operator[](int idx) {
101  return n[idx];
102  }
103 
105  inline int operator[](int idx) const{
106  return n[idx];
107  }
108 
110  inline bool operator<(const MarkerCodeICL1 &t) const {
111  return id < t.id;
112  }
113 
115 
118  int operator-(const MarkerCodeICL1 &p) const;
119 
121  static const std::vector<MarkerCodeICL1> &generate();
122  };
123 
125  ICLMarkers_API std::ostream &operator<<(std::ostream &str, const MarkerCodeICL1 &c);
126 
127 
128  } // namespace markers
129 }
130 
131 
undocument this line if you encounter any issues!
Definition: Any.h:37
bool operator<(const MarkerCodeICL1 &t) const
compares the internal id
Definition: MarkerCodeICL1.h:110
int id
computed or given marker ID
Definition: MarkerCodeICL1.h:85
ICLMarkers_API std::ostream & operator<<(std::ostream &s, const DecodedBCHCode2D::Rotation &r)
ostream-operator for DecodedBCHCode2D::Rotation
int & operator[](int idx)
get child-child region count of child-region idx
Definition: MarkerCodeICL1.h:100
ICLQt_API ImgQ operator-(const ImgQ &a, const ImgQ &b)
subtracts two images pixel-wise
int operator[](int idx) const
get child-child region count of child-region idx (const)
Definition: MarkerCodeICL1.h:105
std::string str(const T &t)
convert a data type into a string using an std::ostringstream instance
Definition: StringUtils.h:136
Utility class for markers of type "icl1".
Definition: MarkerCodeICL1.h:78
#define ICLMarkers_API
Definition: CompatMacros.h:180