Image Component Library (ICL)
GaborOp.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 : ICLFilter/src/ICLFilter/GaborOp.h **
10 ** Module : ICLFilter **
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/Uncopyable.h>
35 #include <ICLUtils/Point.h>
36 #include <ICLCore/Img.h>
37 #include <ICLFilter/UnaryOp.h>
38 #include <vector>
39 
40 namespace icl{
41  namespace filter{
43  class ConvolutionOp;
47 
119  public:
121  GaborOp();
122 
124 
141  GaborOp(const utils::Size &kernelSize,
142  std::vector<icl32f> lambdas,
143  std::vector<icl32f> thetas,
144  std::vector<icl32f> psis,
145  std::vector<icl32f> sigmas,
146  std::vector<icl32f> gammas );
147 
148  ~GaborOp();
149 
151 
153  void setKernelSize(const utils::Size &size);
154 
156  void addLambda(float lambda);
157 
159  void addTheta(float theta);
160 
162  void addPsi(float psi);
163 
165  void addSigma(float sigma);
166 
168  void addGamma(float gamma);
169 
171  void updateKernels();
172 
174 
177  virtual void apply(const core::ImgBase *poSrc, core::ImgBase **ppoDst);
178 
180  using UnaryOp::apply;
181 
183 
185  std::vector<icl32f> apply(const core::ImgBase *poSrc, const utils::Point &p);
186 
188 
195  static core::Img32f *createKernel(const utils::Size &size, float lambda,
196  float theta, float psi, float sigma, float gamma);
197 
199  const std::vector<core::Img32f> &getKernels() const { return m_vecKernels; }
200 
201 
202  private:
203  std::vector<icl32f> m_vecLambdas;
204  std::vector<icl32f> m_vecThetas;
205  std::vector<icl32f> m_vecPsis;
206  std::vector<icl32f> m_vecSigmas;
207  std::vector<icl32f> m_vecGammas;
208 
209  std::vector<core::Img32f> m_vecKernels;
210  std::vector<core::ImgBase*> m_vecResults;
212  };
213  } // namespace filter
214 }
215 
216 
217 
const std::vector< core::Img32f > & getKernels() const
returns all currently created kernels
Definition: GaborOp.h:199
undocument this line if you encounter any issues!
Definition: Any.h:37
Class interface for un-copyable classes.
Definition: Uncopyable.h:64
std::vector< icl32f > m_vecThetas
Definition: GaborOp.h:204
Applies Gabor filter operation on images.
Definition: GaborOp.h:118
std::vector< icl32f > m_vecGammas
Definition: GaborOp.h:207
std::vector< core::Img32f > m_vecKernels
Definition: GaborOp.h:209
Abstract Base class for Unary Operators.
Definition: UnaryOp.h:51
Size class of the ICL.
Definition: Size.h:61
ICLQt_API core::Img< T > filter(const core::Img< T > &image, const std::string &filter)
applies a filter operation on the source image (affinity for float)
utils::Size m_oKernelSize
Definition: GaborOp.h:211
std::vector< core::ImgBase * > m_vecResults
Definition: GaborOp.h:210
Point class of the ICL used e.g. for the Images ROI offset.
Definition: Point.h:58
#define ICLFilter_API
Definition: CompatMacros.h:175
std::vector< icl32f > m_vecSigmas
Definition: GaborOp.h:206
virtual void apply(const core::ImgBase *operand1, core::ImgBase **dst)=0
pure virtual apply function, that must be implemented in all derived classes
std::vector< icl32f > m_vecLambdas
Definition: GaborOp.h:203
ImgBase is the Image-Interface class that provides save access to underlying Img-template .
Definition: ImgBase.h:131
std::vector< icl32f > m_vecPsis
Definition: GaborOp.h:205