Murl::Util::GaussianFilter Class Reference

The gaussian filter class has gaussian function interpolation. More...

#include "murl_util_filter.h"

Inheritance diagram for Murl::Util::GaussianFilter:

Public Member Functions

 GaussianFilter (Double width=static_cast< Double >(3.0), Double sigma=static_cast< Double >(1.0))
 The default constructor. More...
 
 ~GaussianFilter () override
 The destructor.
 
Double Apply (Double dValH) const override
 Apply the filter horizontally. More...
 
Double Apply (Double dValH, Double dValV) const override
 Apply the filter horizontally and vertically. More...
 
- Public Member Functions inherited from Murl::Util::Filter
 Filter (Double width)
 Constructor taking the filter width. More...
 
 ~Filter () override
 The destructor.
 
Double GetWidth () const override
 Implementation of IFilter::GetWidth(). More...
 
void SetWidth (Double width) override
 Implementation of IFilter::SetWidth(). More...
 
- Public Member Functions inherited from Murl::IFilter
virtual ~IFilter ()
 The destructor.
 

Additional Inherited Members

- Protected Attributes inherited from Murl::Util::Filter
Double mWidth
 The filter width.
 

Detailed Description

The gaussian filter class has gaussian function interpolation.

Constructor & Destructor Documentation

◆ GaussianFilter()

Murl::Util::GaussianFilter::GaussianFilter ( Double  width = static_cast<Double>(3.0),
Double  sigma = static_cast<Double>(1.0) 
)
inline

The default constructor.

Parameters
widthThe filter width defaulted to 3.0.
sigmaThe filter standard deviation defaulted to 1.0.

References Murl::Math::Sqrt(), and Murl::Math::TWO_PI.

Member Function Documentation

◆ Apply() [1/2]

Double Murl::Util::GaussianFilter::Apply ( Double  dValH) const
inlineoverridevirtual

Apply the filter horizontally.

Parameters
dValHThe horizontal distance in range [-filterWidth .. filterWidth].
Returns
e^((-dValH^2) / (2 * sigma^2)) / (sqrt(2 * Pi) * sigma) or zero if distance is out of range.

Implements Murl::IFilter.

References Murl::Math::Abs(), Murl::Math::Exp(), and Murl::Util::Filter::mWidth.

◆ Apply() [2/2]

Double Murl::Util::GaussianFilter::Apply ( Double  dValH,
Double  dValV 
) const
inlineoverridevirtual

Apply the filter horizontally and vertically.

Parameters
dValHThe horizontal distance in range [-filterWidth .. filterWidth].
dValVThe vertical distance in range [-filterWidth .. filterWidth].
Returns
e^((-dValH^2 + dValV^2) / (2 * sigma^2)) / (2 * Pi * sigma^2) or zero if distance is out of range.

Implements Murl::IFilter.

References Murl::Math::Abs(), Murl::Math::Exp(), Murl::Util::Filter::mWidth, and Murl::Math::PI.


The documentation for this class was generated from the following file:
  • murl_util_filter.h


Copyright © 2011-2024 Spraylight GmbH.