degate  0.1.2
Public Member Functions
degate::LoG Class Reference

Implements a Laplacian of Gaussian. More...

#include <FilterKernel.h>

Inheritance diagram for degate::LoG:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 LoG (unsigned int width, unsigned int height, double sigma=1.4)
virtual ~LoG ()

Detailed Description

Implements a Laplacian of Gaussian.

Definition at line 179 of file FilterKernel.h.


Constructor & Destructor Documentation

degate::LoG::LoG ( unsigned int  width,
unsigned int  height,
double  sigma = 1.4 
) [inline]

Definition at line 181 of file FilterKernel.h.

References degate::FilterKernel::get_center_column(), degate::FilterKernel::get_center_row(), degate::FilterKernel::get_columns(), and degate::FilterKernel::get_rows().

                                                                     : FilterKernel(width, height) {
      unsigned int x, y;

      for(y = 0; y < get_rows(); y++) {
        for(x = 0; x < get_columns(); x++) {

          double _x = (double)x - (double)get_center_column();
          double _y = (double)y - (double)get_center_row();

          double v =
            -1.0/(M_PI * pow(sigma, 4)) *
            (1.0 - (pow(_x, 2) + pow(_y, 2)) / (2.0*pow(sigma, 2))) *
            exp(-(pow(_x, 2) + pow(_y, 2)) / (2.0*pow(sigma,2)));

          set(x, y, v);
        }

      }
    }

Here is the call graph for this function:

virtual degate::LoG::~LoG ( ) [inline, virtual]

Definition at line 201 of file FilterKernel.h.

{}

The documentation for this class was generated from the following file: