Hugintrunk
0.1
|
interpolation at non-integer positions. More...
#include <Interpolators.h>
Public Types | |
typedef VALUETYPE | value_type |
the iterators' pixel type More... | |
Public Member Functions | |
InterpolatingAccessor (ACCESSOR a, INTERPOLATOR inter) | |
init from given accessor More... | |
template<class ITERATOR > | |
value_type | operator() (ITERATOR const &i, float x, float y) const |
Interpolate the data item at a non-integer position x , y . More... | |
template<class ITERATOR , class ALPHAITERATOR , class ALPHAACCESSOR > | |
bool | operator() (ITERATOR const &i, std::pair< ALPHAITERATOR, ALPHAACCESSOR > const &alpha, float x, float y, value_type &result) const |
Interpolate the data item at a non-integer position x , y . More... | |
Private Attributes | |
ACCESSOR | a_ |
INTERPOLATOR | inter_x |
INTERPOLATOR | inter_y |
interpolation at non-integer positions.
This accessor allows an image be accessed at arbitrary non-integer coordinates and performs an interpolation to obtain a pixel value. It uses the given ACCESSOR (which is usually the accessor originally associated with the iterator) to access data.
The interpolation algorithm is given as a template parameter, INTERPOLATOR. See the interp_bilin interp_cubic, interp_spline16, interp_spline36, interp_spline64 and interp_sinc for possible interpolators
Namespace: vigra
Usage
Definition at line 857 of file Interpolators.h.
typedef VALUETYPE vigra_ext::InterpolatingAccessor< ACCESSOR, VALUETYPE, INTERPOLATOR >::value_type |
the iterators' pixel type
Definition at line 862 of file Interpolators.h.
|
inline |
init from given accessor
Definition at line 866 of file Interpolators.h.
|
inline |
Interpolate the data item at a non-integer position x
, y
.
be careful, no bounds checking is done here. take INTERPOLATOR::size into accout before iterating over the picture.
the used image pixels are [i-(n/2 -1) .. i+n/2], where n is the size of the interpolator
i | base iterator |
x | x position, relative to i and alpha.first |
y | y position, relative to i and alpha.first |
Definition at line 887 of file Interpolators.h.
References vigra_ext::InterpolatingAccessor< ACCESSOR, VALUETYPE, INTERPOLATOR >::a_, vigra_ext::InterpolatingAccessor< ACCESSOR, VALUETYPE, INTERPOLATOR >::inter_x, and vigra_ext::InterpolatingAccessor< ACCESSOR, VALUETYPE, INTERPOLATOR >::inter_y.
|
inline |
Interpolate the data item at a non-integer position x
, y
.
It checks if the interpolation would access a pixel with alpha = 0 and returns false in that case.
be careful, no bounds checking is done here. take INTERPOLATOR::size into accout before iterating over the picture.
the used image pixels are [i-(n/2 -1) .. i+n/2], where n is the size of the interpolator
i | base iterator |
alpha | alpha image |
x | x position, relative to i and alpha.first |
y | y position, relative to i and alpha.first |
result | the interpolation result |
Definition at line 937 of file Interpolators.h.
References vigra_ext::InterpolatingAccessor< ACCESSOR, VALUETYPE, INTERPOLATOR >::a_, vigra_ext::InterpolatingAccessor< ACCESSOR, VALUETYPE, INTERPOLATOR >::inter_x, and vigra_ext::InterpolatingAccessor< ACCESSOR, VALUETYPE, INTERPOLATOR >::inter_y.
|
private |
Definition at line 975 of file Interpolators.h.
Referenced by vigra_ext::InterpolatingAccessor< ACCESSOR, VALUETYPE, INTERPOLATOR >::operator()().
|
private |
Definition at line 976 of file Interpolators.h.
Referenced by vigra_ext::InterpolatingAccessor< ACCESSOR, VALUETYPE, INTERPOLATOR >::operator()().
|
private |
Definition at line 976 of file Interpolators.h.
Referenced by vigra_ext::InterpolatingAccessor< ACCESSOR, VALUETYPE, INTERPOLATOR >::operator()().