iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Image Rescaling Operations

These methods perform various rescaling operations on Images.

Todo:
Make some nice forwarding methods (e.g. just decimate(), rescale() (which would decide whether do call downsize, or rescaleBilinear), etc..)
See Also
Image macros to facilitate promotion of pixel types

Functions

template<NRT_PROMOTE_PIX_NO_DEFAULT_PROMO >
Image< DestType > nrt::rescaleBilinear (Image< PixType > const &src, Dims< int32 > const &dims)
 Scale to new width & height using bilinear interpolation.
 
template<typename promo = void>
GenericImage nrt::rescaleBilinear (GenericImage const &src, Dims< int32 > const &dims)
 Scale to new width & height using bilinear interpolation - GenericImage version.
 
template<NRT_PROMOTE_PIX_NO_DEFAULT_PROMO >
nrt::Image< DestType > nrt::decimateX (nrt::Image< PixType > const &src, int factor=2)
 Decimate in X (take one every 'factor' pixels).
 
template<NRT_PROMOTE_PIX_NO_DEFAULT_PROMO >
nrt::Image< DestType > nrt::decimateY (nrt::Image< PixType > const &src, int const factor=2)
 Decimate in Y (take one every 'factor' pixels). More...
 
template<NRT_PROMOTE_PIX_NO_DEFAULT_PROMO >
nrt::Image< DestType > nrt::decimateXY (nrt::Image< PixType > const &src, int const xfactor=2, int const yfactor=-1)
 Decimate in X and Y (take one every 'factor' pixels). More...
 
template<NRT_PROMOTE_PIX_NO_DEFAULT_PROMO >
nrt::Image< DestType > nrt::downSize (nrt::Image< PixType > const &src, nrt::Dims< int > const &dims, int const filterWidth=9)
 Downsize using alternating lowpass/decimate operations. More...
 
template<NRT_PROMOTE_PIX_NO_DEFAULT_PROMO >
nrt::Image< DestType > nrt::lowPass5xDecX (nrt::Image< PixType > const &src, int const factor=2)
 Low-pass filter, Anderson's 5x5 separable, applied in X, and X decimated by factor.
 
template<NRT_PROMOTE_PIX_NO_DEFAULT_PROMO >
nrt::Image< DestType > nrt::lowPass5yDecY (nrt::Image< PixType > const &src, int const factor=2)
 Low-pass filter, Anderson's 5x5 separable, applied in Y, and Y decimated by factor.
 

Function Documentation

template<NRT_PROMOTE_PIX_NO_DEFAULT_PROMO >
nrt::Image< DestType > nrt::decimateY ( nrt::Image< PixType > const &  src,
int const  factor = 2 
)
inline

Decimate in Y (take one every 'factor' pixels).

Definition at line 163 of file RescaleImpl.H.

References nrt::Image< T, Flags >::begin(), nrt::Image< T, Flags >::const_begin(), nrt::Image< T, Flags >::height(), nrt::None, and nrt::Image< T, Flags >::width().

template<NRT_PROMOTE_PIX_NO_DEFAULT_PROMO >
nrt::Image< DestType > nrt::decimateXY ( nrt::Image< PixType > const &  src,
int const  xfactor = 2,
int const  yfactor = -1 
)
inline

Decimate in X and Y (take one every 'factor' pixels).

Parameters
srcsource Image
xfactorfactor by which to decimate in the x direction
yfactorfactor by which to decimate in the y direction; if this value is less than zero, then just take yfactor=xfactor

Definition at line 191 of file RescaleImpl.H.

References nrt::Image< T, Flags >::begin(), nrt::Image< T, Flags >::const_begin(), nrt::Image< T, Flags >::height(), nrt::None, and nrt::Image< T, Flags >::width().

template<NRT_PROMOTE_PIX_NO_DEFAULT_PROMO >
nrt::Image<DestType> nrt::downSize ( nrt::Image< PixType > const &  src,
nrt::Dims< int > const &  dims,
int const  filterWidth = 9 
)

Downsize using alternating lowpass/decimate operations.

The width used internally in the lowpass filters is given by filterWidth (default = 9).

Note
The dims parameter must have the same aspect ratio as src.dims().
Todo:
This seems to not work