Image Component Library (ICL)
MarkerGridDetector.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/MarkerGridDetector.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/Configurable.h>
34 #include <ICLUtils/Array2D.h>
35 #include <ICLUtils/ParamList.h>
37 
38 namespace icl{
39  namespace markers{
40 
42 
46  struct Data;
47  Data *m_data;
48 
50  int getPos(int id);
51 
52  public:
54 
60  std::map<int,utils::Point> posLUT;
62  std::vector<int> ids;
63  std::string markerType;
64 
65  public:
66  // empty constructor
68 
70  GridDefinition(const utils::Size &numCells,
71  const std::vector<int> &markerIDs=std::vector<int>(),
72  const std::string &markerType="bch") ;
73 
75 
76  utils::Point getPos(int id) const;
77 
79  int getIndex(int id) const;
80 
82  int getWidth() const;
83 
85  int getHeight() const;
86 
88  int getDim() const;
89 
91  const utils::Size &getSize() const;
92 
94  const std::string &getMarkerType() const;
95 
97  const std::vector<int> &getMarkerIDs() const;
98  };
99 
100 
103 
105 
106  MarkerGridDetector(const GridDefinition &gridDef,
107  const utils::ParamList &extraParams=utils::ParamList("size","1x1"));
108 
111 
113 
118  void init(const GridDefinition &gridDef,
119  const utils::ParamList &extraParams=utils::ParamList("size","1x1"));
120 
122  const GridDefinition &getGridDefinition() const;
123 
126 
127 
129  const Result &detect(const core::ImgBase *image) ;
130 
132  bool isNull() const;
133 
135  FiducialDetector *getFiducialDetector();
136  };
137  }
138 }
Utility class that allows a regular grid of fiducial markers to be tracked.
Definition: MarkerGridDetector.h:45
undocument this line if you encounter any issues!
Definition: Any.h:37
utils::Size numCells
grid dimension
Definition: MarkerGridDetector.h:61
Marker Grid geometry definition type.
Definition: MarkerGridDetector.h:59
utils::Array2D< Fiducial > Result
result data type
Definition: MarkerGridDetector.h:125
Data * m_data
internal data type
Definition: MarkerGridDetector.h:46
std::map< int, utils::Point > posLUT
internally used lookup for marker IDs/grid-positions
Definition: MarkerGridDetector.h:60
std::string markerType
marker type
Definition: MarkerGridDetector.h:63
Utility structure that utilizes an std::map as parameter list.
Definition: ParamList.h:44
Size class of the ICL.
Definition: Size.h:61
Simple 2D-Array class that provides shallow copy per default.
Definition: Array2D.h:61
Point class of the ICL used e.g. for the Images ROI offset.
Definition: Point.h:58
Interface for classes that can be configured from configuration-files and GUI-Components.
Definition: Configurable.h:194
std::vector< int > ids
used marker IDs
Definition: MarkerGridDetector.h:62
Main Fiducial Detector class.
Definition: FiducialDetector.h:48
#define ICLMarkers_API
Definition: CompatMacros.h:180
ImgBase is the Image-Interface class that provides save access to underlying Img-template .
Definition: ImgBase.h:131