Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
HessianGauss.hh
1 /*
2 This file is part of the BIAS library (Basic ImageAlgorithmS).
3 
4 Copyright (C) 2003-2009 (see file CONTACT for details)
5  Multimediale Systeme der Informationsverarbeitung
6  Institut fuer Informatik
7  Christian-Albrechts-Universitaet Kiel
8 
9 
10 BIAS is free software; you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14 
15 BIAS is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU Lesser General Public License for more details.
19 
20 You should have received a copy of the GNU Lesser General Public License
21 along with BIAS; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24 
25 
26 #ifndef __HessianGauss_hh__
27 #define __HessianGauss_hh__
28 
29 #include "FilterNTo3N.hh"
30 #include "Convolution.hh"
31 
32 #include <Base/Math/Vector3.hh>
33 
34 
35 namespace BIAS {
36 
37  /** @class HessianGauss
38  @ingroup g_filter
39  @brief gradient calculation with separated gauss masks
40  @author ischiller 12/2007 */
41  template <class InputStorageType, class OutputStorageType>
42  class BIASFilter_EXPORT HessianGauss : public FilterNTo3N<InputStorageType, OutputStorageType>
43  {
44  public:
45  HessianGauss();
47  virtual ~HessianGauss();
48 
49  /** returns images containig hxx hyy and hxy
50  @author ischiller
51  @date 12/2007*/
52  virtual int Filter(const Image<InputStorageType>& src,
56 
59 
60  ////////////////////////////////////////////////////////////////////////
61 
62  inline void SetHessGaussSigma(const double sigma)
63  { _HessGaussSigma=sigma; }
64 
65  inline double GetHessGaussSigma() const { return _HessGaussSigma; }
66 
67  inline void SetHessGaussRatio(const double ratio)
68  { _HessGaussRatio=ratio; }
69 
70  inline double GetHessGaussRatio() const { return _HessGaussRatio; }
71 
72  inline void PrintKernel() const
73  { _ConvXX.PrintKernel(); }
74 
75  inline void PrintKernelXY() const
76  { _ConvXY.PrintKernel(); }
77  protected:
78  /// the parameters
79  double _HessGaussSigma, _HessGaussRatio;
80  /// the parameters at the time of the last call
81  double _LastSigma, _LastRatio;
82  /// computation object to execute the convolution
86 
87  /** Fills _HVec with gaussian function and _VVec with derivative of
88  gaussian function with standard deviation Sigma. The size of _HVec
89  and _VVec is calculated by using Ration. The Gaussian function is
90  truncated, when the ration between biggest and smalles entry falls
91  below Ratio.
92  @author ischiller 12/2007 */
93  void _CalculateKernels(double Sigma, double Ratio);
94 
95  virtual void GetBordersValid_(int& border_x, int &border_y) const;
96 
97  }; // class
98 
99 
100 } // namsepace
101 
102 #endif // __HessianGauss_hh__
Convolution< InputStorageType, OutputStorageType > _ConvXX
computation object to execute the convolution
Definition: HessianGauss.hh:83
double GetHessGaussRatio() const
Definition: HessianGauss.hh:70
generic convolution class.
Definition: Convolution.hh:66
void PrintKernelXY() const
Definition: HessianGauss.hh:75
double _LastSigma
the parameters at the time of the last call
Definition: HessianGauss.hh:81
virtual FilterNTo3N< InputStorageType, OutputStorageType > * Clone() const
Definition: HessianGauss.hh:57
double GetHessGaussSigma() const
Definition: HessianGauss.hh:65
void SetHessGaussSigma(const double sigma)
Definition: HessianGauss.hh:62
void SetHessGaussRatio(const double ratio)
Definition: HessianGauss.hh:67
double _HessGaussSigma
the parameters
Definition: HessianGauss.hh:79
Convolution< InputStorageType, OutputStorageType > _ConvXY
Definition: HessianGauss.hh:85
Convolution< InputStorageType, OutputStorageType > _ConvYY
Definition: HessianGauss.hh:84
gradient calculation with separated gauss masks
Definition: HessianGauss.hh:42
base class for simple n-&gt;3n filter implementations
Definition: FilterNTo3N.hh:43
void PrintKernel() const
Definition: HessianGauss.hh:72