degate  0.1.2
Public Member Functions
degate::GaussianBlur Class Reference

#include <FilterKernel.h>

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

List of all members.

Public Member Functions

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

Detailed Description

Definition at line 153 of file FilterKernel.h.


Constructor & Destructor Documentation

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

Definition at line 155 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/(2.0 * M_PI * pow(sigma, 2)) * exp(-(pow(_x, 2) + pow(_y, 2)) / (2*pow(sigma,2)));

          set(x, y, v);
        }

      }
    }

Here is the call graph for this function:

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

Definition at line 173 of file FilterKernel.h.

{}

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