Image Component Library (ICL)
TemplateTracker.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 : ICLCV/src/ICLCV/TemplateTracker.h **
10 ** Module : ICLCV **
11 ** Authors: Eckard Riedenklau, 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/Uncopyable.h>
35 #include <ICLCore/Img.h>
36 namespace icl{
37  namespace cv{
38 
39 
41 
43  struct Data;
44  Data *data;
45 
46  public:
48  struct Result{
50  inline Result(const utils::Point32f &pos=utils::Point32f(-1,-1),
51  float angle=0, float proximityValue=0,
52  const core::Img8u *matchedTemplateImage=0):
53  pos(pos),angle(angle),proximityValue(proximityValue),
54  matchedTemplateImage(matchedTemplateImage){}
56  float angle;
58  const core::Img8u *matchedTemplateImage;
60  };
61 
63 
64  TemplateTracker(const core::Img8u *templateImage=0,
65  float rotationStepSizeDegree=1.0,
66  int positionTrackingRangePix=100,
67  float rotationTrackingRangeDegree=45,
68  int coarseSteps=10,int fineSteps=1,
69  const Result &initialResult=Result());
70 
72  ~TemplateTracker();
73 
74 
76  void showRotationLUT() const;
77 
79  void setRotationLUT(const std::vector<utils::SmartPtr<core::Img8u> > &lut);
80 
82 
86  void setTemplateImage(const core::Img8u &templateImage,
87  float rotationStepSizeDegree=1.0);
88 
90  Result track(const core::Img8u &image, const Result *initialResult=0,
91  std::vector<Result> *allResults=0);
92 
93  };
94 
95  } // namespace cv
96 }
97 
float proximityValue
Definition: TemplateTracker.h:57
float angle
pattern orientation
Definition: TemplateTracker.h:56
undocument this line if you encounter any issues!
Definition: Any.h:37
Class interface for un-copyable classes.
Definition: Uncopyable.h:64
Result class that describes a tracking result.
Definition: TemplateTracker.h:48
#define ICLCV_API
Definition: CompatMacros.h:177
Data * data
internal data storage
Definition: TemplateTracker.h:43
Result(const utils::Point32f &pos=utils::Point32f(-1,-1), float angle=0, float proximityValue=0, const core::Img8u *matchedTemplateImage=0)
Constructor with given parameters.
Definition: TemplateTracker.h:50
utils::Point32f pos
image position
Definition: TemplateTracker.h:55
Single precission 3D Vectors Point class of the ICL.
Definition: Point32f.h:41
Interface for classes that can be configured from configuration-files and GUI-Components.
Definition: Configurable.h:194
Utility class vor viewbased template tracking.
Definition: TemplateTracker.h:42
Specialization of the SmartPtrBase class for Pointers.
Definition: SmartPtr.h:75