latest version v1.9 - last update 10 Apr 2010 |
Scaling implements a functor to rescale an image using a real valued scaling factor. More...
#include <ltiScaling.h>
Classes | |
class | parameters |
The parameters for the class scaling. More... | |
Public Member Functions | |
scaling () | |
scaling (const parameters &par) | |
scaling (const scaling &other) | |
virtual | ~scaling () |
virtual const char * | getTypeName () const |
scaling & | copy (const scaling &other) |
scaling & | operator= (const scaling &other) |
virtual functor * | clone () const |
const scaling::parameters & | getParameters () const |
virtual bool | updateParameters () |
Standard apply methods. | |
bool | apply (image &srcdest) const |
bool | apply (const image &src, image &dest) const |
bool | apply (matrix< ubyte > &srcdest) const |
bool | apply (const matrix< ubyte > &src, matrix< ubyte > &dest) const |
bool | apply (matrix< float > &srcdest) const |
bool | apply (const matrix< float > &src, matrix< float > &dest) const |
bool | apply (matrix< int > &srcdest) const |
bool | apply (const matrix< int > &src, matrix< int > &dest) const |
Symmetric scaling apply methods. | |
bool | apply (const float scale, image &srcdest) const |
bool | apply (const float scale, const image &src, image &dest) const |
bool | apply (const float scale, matrix< ubyte > &srcdest) const |
bool | apply (const float scale, const matrix< ubyte > &src, matrix< ubyte > &dest) const |
bool | apply (const float scale, matrix< float > &srcdest) const |
bool | apply (const float scale, const matrix< float > &src, matrix< float > &dest) const |
bool | apply (const float scale, matrix< int > &srcdest) const |
bool | apply (const float scale, const matrix< int > &src, matrix< int > &dest) const |
Asymmetric scaling apply methods. | |
The scaling factor for horizontal and vertical axes are given through the x and y components of the point respectivelly. | |
bool | apply (const tpoint< float > &scale, image &srcdest) const |
bool | apply (const tpoint< float > &scale, const image &src, image &dest) const |
bool | apply (const tpoint< float > &scale, matrix< ubyte > &srcdest) const |
bool | apply (const tpoint< float > &scale, const matrix< ubyte > &src, matrix< ubyte > &dest) const |
bool | apply (const tpoint< float > &scale, matrix< float > &srcdest) const |
bool | apply (const tpoint< float > &scale, const matrix< float > &src, matrix< float > &dest) const |
bool | apply (const tpoint< float > &scale, matrix< int > &srcdest) const |
bool | apply (const tpoint< float > &scale, const matrix< int > &src, matrix< int > &dest) const |
Protected Attributes | |
scalingWorker * | worker |
Scaling implements a functor to rescale an image using a real valued scaling factor.
This functor represents a faster alternative to lti::geometricTransform, used if you only need to scale the image, without any other kind of geometric mapping.
It is usually employed to upsample an image, using some interpolation policy indicated in the parameters. At this point only bilinear interpolation is supported, but this may change as soon as the new family of interpolators for the LTI-Lib are available.
You can give also factors smaller than one to downsample an image, but this will just take the interpolated corresponding pixel of the original image, without consideration of its neighborhood. For a more theoretically founded downsampling functor, you can use lti::downsampling, which allows you to make a low-pass filtering, to avoid artifacts resulting from a violation of the Nyquist sampling theorem. Nevertheless, if you just one to downsample for some visualization, this functor might be enough (lti::decimation can be even faster if the downsampling factor is integer).
For more complex operations you can still use the lti::geometricTransform functor.
lti::scaling::scaling | ( | ) |
Default constructor.
lti::scaling::scaling | ( | const parameters & | par | ) |
Construct a functor using the given parameters.
lti::scaling::scaling | ( | const scaling & | other | ) |
Copy constructor.
other | the object to be copied |
virtual lti::scaling::~scaling | ( | ) | [virtual] |
Destructor.
bool lti::scaling::apply | ( | const tpoint< float > & | scale, | |
const matrix< int > & | src, | |||
matrix< int > & | dest | |||
) | const |
Operates on a copy of the given parameters.
scale | scaling factor used instead of the value given in the parameters object. | |
src | matrix<int> with the source data. | |
dest | matrix<int> where the result will be left. |
Operates on the given parameter.
scale | scaling factor used instead of the value given in the parameters object. | |
srcdest | matrix<int> with the source data. The result will be left here too. |
bool lti::scaling::apply | ( | const tpoint< float > & | scale, | |
const matrix< float > & | src, | |||
matrix< float > & | dest | |||
) | const |
Operates on a copy of the given parameters.
scale | scaling factor used instead of the value given in the parameters object. | |
src | matrix<float> with the source data. | |
dest | matrix<float> where the result will be left. |
Operates on the given parameter.
scale | scaling factor used instead of the value given in the parameters object. | |
srcdest | matrix<float> with the source data. The result will be left here too. |
bool lti::scaling::apply | ( | const tpoint< float > & | scale, | |
const matrix< ubyte > & | src, | |||
matrix< ubyte > & | dest | |||
) | const |
Operates on a copy of the given parameters.
scale | scaling factor used instead of the value given in the parameters object. | |
src | matrix<ubyte> with the source data. | |
dest | matrix<ubyte> where the result will be left. |
Operates on the given parameter.
scale | scaling factor used instead of the value given in the parameters object. | |
srcdest | matrix<ubyte> with the source data. The result will be left here too. |
Operates on a copy of the given parameters.
scale | scaling factor used instead of the value given in the parameters object. | |
src | image with the source data. | |
dest | image where the result will be left. |
Operates on the given parameter.
scale | scaling factor used instead of the value given in the parameters object. | |
srcdest | image with the source data. The result will be left here too. |
bool lti::scaling::apply | ( | const float | scale, | |
const matrix< int > & | src, | |||
matrix< int > & | dest | |||
) | const |
Operates on a copy of the given parameters.
scale | scaling factor used for both, the horizontal and vertical axes. The scaling factor in the parameters will be ignored. | |
src | matrix<int> with the source data. | |
dest | matrix<int> where the result will be left. |
bool lti::scaling::apply | ( | const float | scale, | |
matrix< int > & | srcdest | |||
) | const |
Operates on the given parameter.
scale | scaling factor used for both, the horizontal and vertical axes. The scaling factor in the parameters will be ignored. | |
srcdest | matrix<int> with the source data. The result will be left here too. |
bool lti::scaling::apply | ( | const float | scale, | |
const matrix< float > & | src, | |||
matrix< float > & | dest | |||
) | const |
Operates on a copy of the given parameters.
scale | scaling factor used for both, the horizontal and vertical axes. The scaling factor in the parameters will be ignored. | |
src | matrix<float> with the source data. | |
dest | matrix<float> where the result will be left. |
bool lti::scaling::apply | ( | const float | scale, | |
matrix< float > & | srcdest | |||
) | const |
Operates on the given parameter.
scale | scaling factor used for both, the horizontal and vertical axes. The scaling factor in the parameters will be ignored. | |
srcdest | matrix<float> with the source data. The result will be left here too. |
bool lti::scaling::apply | ( | const float | scale, | |
const matrix< ubyte > & | src, | |||
matrix< ubyte > & | dest | |||
) | const |
Operates on a copy of the given parameters.
scale | scaling factor used for both, the horizontal and vertical axes. The scaling factor in the parameters will be ignored. | |
src | matrix<ubyte> with the source data. | |
dest | matrix<ubyte> where the result will be left. |
Operates on the given parameter.
scale | scaling factor used for both, the horizontal and vertical axes. The scaling factor in the parameters will be ignored. | |
srcdest | matrix<ubyte> with the source data. The result will be left here too. |
Operates on a copy of the given parameters.
scale | scaling factor used for both, the horizontal and vertical axes. The scaling factor in the parameters will be ignored. | |
src | image with the source data. | |
dest | image where the result will be left. |
bool lti::scaling::apply | ( | const float | scale, | |
image & | srcdest | |||
) | const |
Operates on the given parameter.
scale | scaling factor used for both, the horizontal and vertical axes. The scaling factor in the parameters will be ignored. | |
srcdest | image with the source data. The result will be left here too. |
Operates on a copy of the given parameters.
src | matrix<int> with the source data. | |
dest | matrix<int> where the result will be left. |
Reimplemented from lti::modifier.
bool lti::scaling::apply | ( | matrix< int > & | srcdest | ) | const [virtual] |
Operates on the given parameter.
srcdest | matrix<int> with the source data. The result will be left here too. |
Reimplemented from lti::modifier.
Operates on a copy of the given parameters.
src | matrix<float> with the source data. | |
dest | matrix<float> where the result will be left. |
Reimplemented from lti::modifier.
bool lti::scaling::apply | ( | matrix< float > & | srcdest | ) | const [virtual] |
Operates on the given parameter.
srcdest | matrix<float> with the source data. The result will be left here too. |
Reimplemented from lti::modifier.
Operates on a copy of the given parameters.
src | matrix<ubyte> with the source data. | |
dest | matrix<ubyte> where the result will be left. |
Operates on the given parameter.
srcdest | matrix<ubyte> with the source data. The result will be left here too. |
Operates on a copy of the given parameters.
Reimplemented from lti::modifier.
bool lti::scaling::apply | ( | image & | srcdest | ) | const [virtual] |
Operates on the given parameter.
srcdest | image with the source data. The result will be left here too. |
Reimplemented from lti::modifier.
virtual functor* lti::scaling::clone | ( | ) | const [virtual] |
Returns a pointer to a clone of this functor.
Implements lti::functor.
Copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::functor.
const scaling::parameters& lti::scaling::getParameters | ( | ) | const |
Returns used parameters.
Reimplemented from lti::modifier.
virtual const char* lti::scaling::getTypeName | ( | ) | const [virtual] |
Returns the name of this type ("scaling").
Reimplemented from lti::modifier.
virtual bool lti::scaling::updateParameters | ( | ) | [virtual] |
returns used parameters
Reimplemented from lti::functor.
scalingWorker* lti::scaling::worker [protected] |
Class containing the real algorithms.
This is set in setParameters();