Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
HessianSimple.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 __HessianSimple_hh__
27 #define __HessianSimple_hh__
28 
29 #include "FilterNTo3N.hh"
30 
31 #include <Base/Math/Vector3.hh>
32 #include "Convolution.hh"
33 
34 
35 namespace BIAS {
36 
37  /** @class HessianSimple
38  @ingroup g_filter
39  @brief simple hessian calculation
40  hxx(x,y) = Hessian in x direction
41  hyy(x,y) = Hessian in y direction
42 
43  weights (not filter mask, ->reflection!) are
44  - -1
45  - WE: -1 0 1 NS: 0
46  - 1
47 
48  The main interface Filter dispatches: If there is a fast version, it
49  is called, otherwise Filter calls the generic convolution.
50  @author koeser 04/2005 */
51  template <class InputStorageType, class OutputStorageType>
52  class BIASFilter_EXPORT HessianSimple : public FilterNTo3N<InputStorageType,
53  OutputStorageType>
54  {
55  public:
56  HessianSimple(bool BuildPCM = false);
58  virtual ~HessianSimple();
59 
60  virtual int Filter(const Image<InputStorageType>& src,
63 
64  virtual int Filter(const Image<InputStorageType>& src,
68 
71 
72 
73  protected:
74 
75  /// @brief sets the sobel kernel for the convolution object
76  void InitKernel_();
77 
78  /// computation object to execute the convolution
80 
81  /** @brief loop unrolled fast float version for [1 0 -1] */
82  int SimpleGreyValidFloat_(const Image<InputStorageType>& src,
85 
86  /** @brief loop unrolled fast int version [1 0 -1] */
87  int SimpleGreyValidInt_(const Image<InputStorageType>& src,
90 
91  virtual void GetBordersValid_(int &border_x, int &border_y) const;
92  }; // class
93 
94 } // namsepace
95 
96 #endif // __HessianSimple_hh__
virtual FilterNTo3N< InputStorageType, OutputStorageType > * Clone() const
generic convolution class.
Definition: Convolution.hh:66
Convolution< InputStorageType, OutputStorageType > _Conv
computation object to execute the convolution
simple hessian calculation hxx(x,y) = Hessian in x direction hyy(x,y) = Hessian in y direction ...
base class for simple n-&gt;3n filter implementations
Definition: FilterNTo3N.hh:43