![]() |
latest version v1.9 - last update 10 Apr 2010 |
![]() |
Decimation. More...
#include <ltiDecimation.h>
Classes | |
class | parameters |
the parameters for the class decimation More... | |
Public Member Functions | |
decimation () | |
decimation (const point &factor) | |
decimation (const decimation &other) | |
virtual | ~decimation () |
virtual const char * | getTypeName () const |
template<class T > | |
bool | apply (matrix< T > &srcdest) const |
template<class T > | |
bool | apply (vector< T > &srcdest) const |
template<class T > | |
bool | apply (const matrix< T > &src, matrix< T > &dest) const |
template<class T > | |
bool | apply (const vector< T > &src, vector< T > &dest) const |
decimation & | copy (const decimation &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
Decimation.
To decimate an image or matrix means to take each n-th pixel. It is much simpler than lti::downsampling, which also applies a filter kernel before the decimation.
You may also be interersted in lti::scaling, which uses interpolation to downsample at non-integer scales.
lti::decimation::decimation | ( | ) |
default constructor
lti::decimation::decimation | ( | const point & | factor | ) |
constructor with a default parameters with the decimation factor given by the point factor.
lti::decimation::decimation | ( | const decimation & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::decimation::~decimation | ( | ) | [virtual] |
destructor
bool lti::decimation::apply | ( | const vector< T > & | src, | |
vector< T > & | dest | |||
) | const [inline] |
operates on a copy of the given parameters.
src | vector<T> with the source data. | |
dest | vector<T> where the result will be left. |
References lti::genericVector< T >::at(), lti::genericVector< T >::begin(), lti::genericVector< T >::end(), getParameters(), and lti::genericVector< T >::resize().
bool lti::decimation::apply | ( | const matrix< T > & | src, | |
matrix< T > & | dest | |||
) | const [inline] |
operates on a copy of the given parameters.
src | matrix<T> with the source data. | |
dest | matrix<T> where the result will be left. |
References lti::genericMatrix< T >::at(), lti::genericVector< T >::begin(), lti::genericMatrix< T >::columns(), lti::genericVector< T >::end(), getParameters(), lti::matrix< T >::getRow(), lti::genericMatrix< T >::resize(), lti::genericMatrix< T >::rows(), lti::tpoint< T >::x, and lti::tpoint< T >::y.
bool lti::decimation::apply | ( | vector< T > & | srcdest | ) | const [inline] |
operates on the given parameter.
srcdest | vector<T> with the source data. The result will be left here too. |
References apply(), and lti::genericVector< T >::detach().
bool lti::decimation::apply | ( | matrix< T > & | srcdest | ) | const [inline] |
operates on the given parameter.
srcdest | matrix<T> with the source data. The result will be left here too. |
References lti::genericMatrix< T >::detach().
Referenced by apply().
virtual functor* lti::decimation::clone | ( | ) | const [virtual] |
returns a pointer to a clone of this functor.
Implements lti::functor.
decimation& lti::decimation::copy | ( | const decimation & | other | ) |
copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::functor.
const parameters& lti::decimation::getParameters | ( | ) | const |
virtual const char* lti::decimation::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("decimation")
Reimplemented from lti::modifier.