Image Component Library (ICL)
FiducialImpl.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/FiducialImpl.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/Size32f.h>
35 #include <ICLMarkers/Fiducial.h>
36 
37 #include <bitset>
38 
39 namespace icl{
40  namespace markers{
41 
43 
79 
82 
85 
87  /* The Fiduical ID can be used externally to distinguish between differnent
88  Fiducial instances */
89  int id;
90 
92 
94  int index;
95 
97 
100 
103 
105  /* this pointer and its members <b>can</b> be instantiated by
106  parent FiduicalDetectorImpl instance */
107  struct Info2D{
110  std::vector<utils::Point32f> infoCorners;
111  std::vector<Fiducial::KeyPoint> infoKeyPoints;
112  } *info2D;
113 
115  /* this pointer and its members <b>can</b> be instantiated by
116  parent FiduicalDetectorImpl instance */
117  struct Info3D{
121  } *info3D;
122 
124  inline FiducialImpl():supported(0),computed(0),id(-1),index(-1),info2D(0),info3D(0){}
125 
128  Fiducial::FeatureSet supported,
129  Fiducial::FeatureSet computed,
130  int id, int index,
131  const utils::Size32f &realSizeMM):
132  parent(parent),supported(supported),
133  computed(computed),id(id),index(index),
134  realSizeMM(realSizeMM),info2D(0),info3D(0){}
135 
137  FiducialImpl(const FiducialImpl &o);
138 
140  FiducialImpl &operator=(const FiducialImpl &o);
141 
143  inline ~FiducialImpl(){
144  if(info2D) delete info2D;
145  if(info3D) delete info3D;
146  }
147 
149  inline Info2D *ensure2D(){
150  if(!info2D) info2D = new Info2D;
151  return info2D;
152  }
153 
155  inline Info3D *ensure3D(){
156  if(!info3D) info3D = new Info3D;
157  return info3D;
158  }
159 
160  };
161 
162 
163  } // namespace markers
164 }
165 
166 
FiducialImpl()
base constructor initializing index with -1 and all other stuff with 0
Definition: FiducialImpl.h:124
undocument this line if you encounter any issues!
Definition: Any.h:37
std::bitset<(int) FeatureCount > FeatureSet
FeatureSet class.
Definition: Fiducial.h:80
set of 2D features
Definition: FiducialImpl.h:107
cv::ImageRegion imageRegion
most plugins can provide an image region
Definition: FiducialImpl.h:102
utils::Size32f realSizeMM
real marker size in millimeters
Definition: FiducialImpl.h:99
int id
Fiduical ID.
Definition: FiducialImpl.h:89
Info2D * ensure2D()
ensures that the info2D pointer is initialized
Definition: FiducialImpl.h:149
int index
Internally used index.
Definition: FiducialImpl.h:94
Fiducial::FeatureSet computed
list of already computed features
Definition: FiducialImpl.h:84
FiducialImpl(FiducialDetectorPlugin *parent, Fiducial::FeatureSet supported, Fiducial::FeatureSet computed, int id, int index, const utils::Size32f &realSizeMM)
2nd constructor with given parameters
Definition: FiducialImpl.h:127
ImageRegion Structure providing region feature information.
Definition: ImageRegion.h:99
geom::Vec infoRotation
Definition: FiducialImpl.h:119
std::vector< Fiducial::KeyPoint > infoKeyPoints
Definition: FiducialImpl.h:111
Single precission 3D Vectors Point class of the ICL.
Definition: Point32f.h:41
set of 3D features
Definition: FiducialImpl.h:117
FiducialDetectorPlugin * parent
parent Fiducial Detector instance
Definition: FiducialImpl.h:78
Hidden implemetation for fiduical classes.
Definition: FiducialImpl.h:76
Info3D * ensure3D()
ensures that the info3D pointer is initialized
Definition: FiducialImpl.h:155
Size32f class of the ICL (float valued)
Definition: Size32f.h:40
float infoRotation
Definition: FiducialImpl.h:109
~FiducialImpl()
Destructor (also deletes info2D and info3D if not null)
Definition: FiducialImpl.h:143
#define ICLMarkers_API
Definition: CompatMacros.h:180
geom::Mat infoPose
Definition: FiducialImpl.h:120
std::vector< utils::Point32f > infoCorners
Definition: FiducialImpl.h:110
geom::Vec infoCenter
Definition: FiducialImpl.h:118
Fiducial::FeatureSet supported
list of generally available features
Definition: FiducialImpl.h:81
utils::Point32f infoCenter
Definition: FiducialImpl.h:108
Generic Interface class for FiducialDetector plugins.
Definition: FiducialDetectorPlugin.h:49