PCL
pcl::MeanFilter Class Reference

Square block average kernel filter. More...

#include <MeanFilter.h>

+ Inheritance diagram for pcl::MeanFilter:

Public Member Functions

 MeanFilter ()=default
 
 MeanFilter (const MeanFilter &)=default
 
 MeanFilter (int n, const String &name=String())
 
 MeanFilter (MeanFilter &&)=default
 
SeparableFilter AsSeparableFilter (float tolerance=__PCL_DEFAULT_FILTER_SEPARABILITY_TOLERANCE) const override
 
KernelFilterClone () const override
 
bool IsSeparable () const override
 
MeanFilteroperator= (const MeanFilter &)=default
 
MeanFilteroperator= (MeanFilter &&)=default
 
void Resize (int n) override
 
- Public Member Functions inherited from pcl::KernelFilter
 KernelFilter (const coefficient_matrix &F, const String &name=String())
 
 KernelFilter (const KernelFilter &)=default
 
 KernelFilter (const String &name=String())
 
template<typename T >
 KernelFilter (const T *k, int n, const String &name=String())
 
 KernelFilter (int n, const String &name=String())
 
template<typename T >
 KernelFilter (int n, const T &x, const String &name=String())
 
 KernelFilter (KernelFilter &&)=default
 
virtual ~KernelFilter ()
 
const coefficientBegin () const
 
const coefficientbegin () const
 
virtual void Clear ()
 
coefficient_matrix Coefficients () const
 
const coefficientEnd () const
 
const coefficientend () const
 
void Flip ()
 
KernelFilter Flipped () const
 
bool IsEmpty () const
 
bool IsFlipped () const
 
bool IsHighPassFilter () const
 
double Modulus () const
 
String Name () const
 
void Normalize ()
 
KernelFilter Normalized () const
 
int NumberOfCoefficients () const
 
 operator bool () const
 
KernelFilteroperator= (const coefficient &x)
 
KernelFilteroperator= (const coefficient_matrix &F)
 
KernelFilteroperator= (const KernelFilter &)=default
 
KernelFilteroperator= (KernelFilter &&)=default
 
bool operator== (const KernelFilter &f) const
 
const coefficientoperator[] (int row) const
 
virtual void Rename (const String &newName)
 
bool SameCoefficients (const KernelFilter &f) const
 
int Size () const
 
template<class P >
void ToImage (GenericImage< P > &image) const
 
void ToImage (ImageVariant &v) const
 
double Weight () const
 

Additional Inherited Members

- Public Types inherited from pcl::KernelFilter
using coefficient = float
 
using coefficient_matrix = GenericMatrix< coefficient >
 

Detailed Description

A MeanFilter object is a specialized KernelFilter whose elements are identical and form a square symmetrically distributed around the origin:

M(x,y) = 1/(s^2)

where s is the filter size, which is the same on the horizontal and vertical axes. This filter is separable.

MeanFilter is a building block of some important algorithms on the PixInsight/PCL platform, such as the Multiscale Local Normalization, algorithm, which uses these kernels to compute local variances.

See also
KernelFilter, VariableShapeFilter, MoffatFilter, LinearFilter, GaussianFilter

Definition at line 86 of file MeanFilter.h.

Constructor & Destructor Documentation

◆ MeanFilter() [1/4]

pcl::MeanFilter::MeanFilter ( )
default

Constructs an empty MeanFilter object.

◆ MeanFilter() [2/4]

pcl::MeanFilter::MeanFilter ( int  n,
const String name = String() 
)
inline

Constructs a MeanFilter object given the odd kernel size n >= 3, or an empty kernel filter if n = 0. Assigns an optional name to the new filter object.

Definition at line 100 of file MeanFilter.h.

◆ MeanFilter() [3/4]

pcl::MeanFilter::MeanFilter ( const MeanFilter )
default

Copy constructor.

◆ MeanFilter() [4/4]

pcl::MeanFilter::MeanFilter ( MeanFilter &&  )
default

Move constructor.

Member Function Documentation

◆ AsSeparableFilter()

SeparableFilter pcl::MeanFilter::AsSeparableFilter ( float  tolerance = __PCL_DEFAULT_FILTER_SEPARABILITY_TOLERANCE) const
inlineoverridevirtual

Returns a separable filter equivalent to this Gaussian kernel filter.

A block average filter is always separable, so this member function should always return a valid SeparableFilter object.

Reimplemented from pcl::KernelFilter.

Definition at line 129 of file MeanFilter.h.

◆ Clone()

KernelFilter* pcl::MeanFilter::Clone ( ) const
inlineoverridevirtual

Returns a pointer to a dynamically allocated duplicate of this kernel filter.

Note
All derived classes from KernelFilter must reimplement this virtual member function.

Reimplemented from pcl::KernelFilter.

Definition at line 118 of file MeanFilter.h.

◆ IsSeparable()

bool pcl::MeanFilter::IsSeparable ( ) const
inlineoverridevirtual

Returns true iff this filter is separable.

A block average filter is separable. As reimplemented in MeanFilter, this member function returns true.

Reimplemented from pcl::KernelFilter.

Definition at line 141 of file MeanFilter.h.

◆ operator=() [1/2]

MeanFilter& pcl::MeanFilter::operator= ( const MeanFilter )
default

Copy assignment operator. Returns a reference to this object.

◆ operator=() [2/2]

MeanFilter& pcl::MeanFilter::operator= ( MeanFilter &&  )
default

Move assignment operator. Returns a reference to this object.

◆ Resize()

void pcl::MeanFilter::Resize ( int  n)
inlineoverridevirtual

Recalculates filter coefficients for the given odd kernel size n >= 3.

Reimplemented from pcl::KernelFilter.

Definition at line 159 of file MeanFilter.h.


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