KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gausskernel.h
Go to the documentation of this file.
1 // gausskernel.h - generate 2D rotated Gaussian (derivative) kernels
3 // Author: Doron Tal
4 // Date created: March, 2000
5 
6 #ifndef _GAUSSKERNEL_H
7 #define _GAUSSKERNEL_H
8 
9 #include "wrap_dtlib_cpp/img.h"
10 
11 namespace DTLib {
12 
13  // derived from a float image class, which here represents a
14  // convolution kernel, this class instantiates into 2-D Gaussian
15  // (derivative) kernels, this has mainly been used for drawing
16  // elongated convolution kernels used in a filterbank. For
17  // isotropic mexican-hat type kernels, see dog.h(.cpp).
18  class CGaussKernel : public CImg<float>
19  {
20  public:
21  // initialize drawing the kernel
22  // 'SigmaX' - sigma in horizontal direction
23  // 'SigmaY' - sigma in vertical direction
24  // 'Size' - size of the image
25  // 'OrderY' - 0 = Gaussian, 1 = 1st Gauss. deriv, 2 = 2nd deriv. etc,
26  // (NOTE: 'OrderX' is always 0)
27  // 'bHilbert' - if true, return Hilbert transform of kernel
28  CGaussKernel(const int& Size, const float& SigmaX, const float& SigmaY,
29  const int& OrderY = 0, const float& Theta = 0.0f,
30  const bool& bHilbert = false);
31 
35 
36  protected:
37 
38  // null constructor - initialize without drawing the kernel,
39  // but do allocate the image
40  CGaussKernel(const int& Size);
41 
42  // draw the kernel with rotation 'Theta', given new
43  // parameters, in an already allocated kernel
44  void Draw(const float& SigmaX, const float& SigmaY, const int& OrderY,
45  const float& Theta, const bool& bHilbert);
46 
47  // draw kernel without rotating
48  void DrawNoRot(const float& SigmaX, const float& SigmaY,
49  const int& OrderY, const bool& bHilbert);
50 
51  float m_SigmaX;
52  float m_SigmaY;
53  int m_OrderY;
54  };
55 
56 } // namespace DTLib {
57 
58 #endif /* #ifndef _GAUSSKERNEL_H */
void Draw(const float &SigmaX, const float &SigmaY, const int &OrderY, const float &Theta, const bool &bHilbert)
Definition: gausskernel.cpp:37
Definition: img.h:51
float m_SigmaY
Definition: gausskernel.h:52
Definition: gausskernel.h:18
CGaussKernel(const int &Size, const float &SigmaX, const float &SigmaY, const int &OrderY=0, const float &Theta=0.0f, const bool &bHilbert=false)
Definition: gausskernel.cpp:19
int m_OrderY
Definition: gausskernel.h:53
void DrawNoRot(const float &SigmaX, const float &SigmaY, const int &OrderY, const bool &bHilbert)
Definition: gausskernel.cpp:65
float m_SigmaX
Definition: gausskernel.h:51