Image Component Library (ICL)
MeanShiftTracker.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/MeanShiftTracker.h **
10 ** Module : ICLCV **
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 <ICLCore/Img.h>
35 
36 namespace icl {
37  namespace cv{
38 
93 
94  public:
95 
97  enum kernelType {
99  gauss
100  };
101  private:
102 
103 
106 
109 
111 
115 
117 
122  utils::Point32f applyMeanShiftStep(const core::Img32f &image, const utils::Point32f &pos);
123 
124  public:
125 
127 
130  static core::Img32f generateEpanechnikov(int bandwidth);
131 
133 
137  static core::Img32f generateGauss(int bandwidth,float stdDev);
138 
140 
145  MeanShiftTracker(kernelType type, int bandwidth, float stdDev=1);
146 
147 
149 
153  void setKernel(kernelType type, int bandwidth, float stdDev=1);
154 
156  int getKernel() const { return m_kernelType; }
157 
159  const core::Img32f &getKernelImage() const { return m_kernelImage; }
160 
162  int getBandwidth() const { return m_bandwidth; }
163 
165 
174  const utils::Point32f step(const core::Img32f &weigthImage, const utils::Point32f &initialPoint, int maxCycles=-1, float convergenceCriterion=1.0, bool *converged=0);
175 
176  };
177  } // namespace cv
178 }
179 
int getBandwidth() const
Returns current kernel bandwidth.
Definition: MeanShiftTracker.h:162
undocument this line if you encounter any issues!
Definition: Any.h:37
Definition: MeanShiftTracker.h:92
kernelType
An enumeration for the different kernel types.
Definition: MeanShiftTracker.h:97
const core::Img32f & getKernelImage() const
returns current kernel image
Definition: MeanShiftTracker.h:159
#define ICLCV_API
Definition: CompatMacros.h:177
core::Img32f m_kernelImage
An internal representation of the kernel used.
Definition: MeanShiftTracker.h:114
int getKernel() const
returns current kernel type
Definition: MeanShiftTracker.h:156
Single precission 3D Vectors Point class of the ICL.
Definition: Point32f.h:41
int m_bandwidth
The bandwidth of the kernel; equals diameter / 2.
Definition: MeanShiftTracker.h:105
Definition: MeanShiftTracker.h:98
kernelType m_kernelType
The kerneltype; displayed as int.
Definition: MeanShiftTracker.h:108