SpaceVariantModule Class Reference

Inheritance diagram for SpaceVariantModule:
Inheritance graph
[legend]
Collaboration diagram for SpaceVariantModule:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SpaceVariantModule (OptionManager &mgr, const std::string &descrName="SpaceVariantModule", const std::string &tagName="SpaceVariantModule")
 Constructor.
virtual ~SpaceVariantModule ()
 Destructor.
virtual void clear (const Dims &inp_dims)
 reset transforms to the desired input image size
void clear ()
 clear the transforms
virtual Image< PixRGB< float > > transformRbg (const Image< PixRGB< byte > > &image, const ImageSet< PixRGB< float > > *const pyr_cache=NULL)
 transform a cartesian image to a space variant one
virtual void transformRgbPyramid (const Image< PixRGB< byte > > &image, ImageSet< PixRGB< float > > &pyramid, const SVChanLevels &levels, const ImageSet< PixRGB< float > > *const pyr_cache)
 transform a cartesian image to a space variant pyramid
virtual Image< float > transformFloat (const Image< float > &image, const ImageSet< float > *const pyr_cache=NULL)
 transform a cartesian image to a space variant one
virtual void transformFloatPyramid (const Image< float > &image, ImageSet< float > &pyramid, const SVChanLevels &levels, const ImageSet< float > *const pyr_cache)
 transform a cartesian image to a space variant pyramid
template<class T_or_RGB >
ImageSet< T_or_RGB > getScaleSpace (const Image< T_or_RGB > &inp, const float &maxrf=-1.0F)
 Compute just the scale space sometimes we may want to just get the scale space.
template<class T_or_RGB >
Image< T_or_RGB > transform (const Image< T_or_RGB > &image, const ImageSet< typename promote_trait< T_or_RGB, float >::TP > *const pyr_cache=NULL)
 transform a cartesian image to a space variant one
template<class T_or_RGB >
void transformPyramid (const Image< T_or_RGB > &image, ImageSet< typename promote_trait< T_or_RGB, float >::TP > &pyramid, const SVChanLevels &levels, const ImageSet< typename promote_trait< T_or_RGB, float >::TP > *const pyr_cache=NULL)
 transform a cartesian image to a space variant pyramid
template<class T_or_RGB >
Image< T_or_RGB > transform (const Image< T_or_RGB > &image, const Point2D< int > &fovea, const ImageSet< typename promote_trait< T_or_RGB, float >::TP > *const pyr_cache=NULL)
template<class T_or_RGB >
Image< T_or_RGB > cropTransform (const Image< T_or_RGB > &image, const Point2D< int > &fovea, const Dims &dims, const ImageSet< typename promote_trait< T_or_RGB, float >::TP > *const pyr_cache=NULL)
template<class T_or_RGB >
Image< T_or_RGB > inverseTransform (const Image< T_or_RGB > &ret_image) const
 inverse transform an already space variant transformed image back to a cartesian one
template<class T_or_RGB >
Image< T_or_RGB > inverseMap (const Image< T_or_RGB > &map_image) const
void toSvCoords (Point2D< int > &point) const
 transform a point from cartesian to space variant coords
void fromSvCoords (Point2D< int > &point) const
 transform a point from space variant to cartesian coords
void toSvCoordsMap (Point2D< int > &point) const
 transform a point to space variant coords at the map level
void fromSvCoordsMap (Point2D< int > &point) const
 transform a point from space variant coords at the map level
bool validTransforms () const
 returnt true if we have valid transforms
rutz::shared_ptr
< SpaceVariantTransform
getTransform ()
 return the transform
rutz::shared_ptr
< SpaceVariantTransform
getMapTransform ()
 return the map level transform
void setTransform (rutz::shared_ptr< SpaceVariantTransform > transform)
 set the transform
void setMapTransform (rutz::shared_ptr< SpaceVariantTransform > map_transform)
 set the map level transform
float getMaxRf () const
 get the max rf size in sigmas
float getMaxRf (const float &offset, const float &surround_factor)
 get the max rf size in sigmas given an offset and surround factor

Protected Member Functions

void reset1 ()
 This is called from within reset() before the subcomponents are reset.

Protected Attributes

rutz::shared_ptr
< SpaceVariantTransform
itsTransform
rutz::shared_ptr
< SpaceVariantTransform
itsMapTransform

Detailed Description

Definition at line 56 of file SpaceVariantModule.H.


Constructor & Destructor Documentation

SpaceVariantModule::SpaceVariantModule ( OptionManager mgr,
const std::string descrName = "SpaceVariantModule",
const std::string tagName = "SpaceVariantModule" 
)

Constructor.

See ModelComponent.H for details

Definition at line 46 of file SpaceVariantModule.C.

SpaceVariantModule::~SpaceVariantModule (  )  [virtual]

Destructor.

Definition at line 53 of file SpaceVariantModule.C.


Member Function Documentation

void SpaceVariantModule::clear ( void   ) 
void SpaceVariantModule::clear ( const Dims inp_dims  )  [virtual]

reset transforms to the desired input image size

Reimplemented in FovealTransformModule, and SpaceVariantEdgeModule.

Definition at line 57 of file SpaceVariantModule.C.

template<class T_or_RGB >
Image< T_or_RGB > SpaceVariantModule::cropTransform ( const Image< T_or_RGB > &  image,
const Point2D< int > &  fovea,
const Dims dims,
const ImageSet< typename promote_trait< T_or_RGB, float >::TP > *const   pyr_cache = NULL 
) [inline]

transform a cartesian image to a space variant one, but first center the image to the desired point and crop.

Definition at line 169 of file SpaceVariantModule.C.

References Image< T >::getHeight(), Image< T >::getWidth(), Dims::h(), Point2D< T >::i, shiftClean(), transform(), and Dims::w().

void SpaceVariantModule::fromSvCoords ( Point2D< int > &  point  )  const

transform a point from space variant to cartesian coords

Definition at line 211 of file SpaceVariantModule.C.

References Point2D< T >::i, and rutz::shared_ptr< T >::is_valid().

void SpaceVariantModule::fromSvCoordsMap ( Point2D< int > &  point  )  const

transform a point from space variant coords at the map level

Definition at line 225 of file SpaceVariantModule.C.

References Point2D< T >::i, and rutz::shared_ptr< T >::is_valid().

rutz::shared_ptr< SpaceVariantTransform > SpaceVariantModule::getMapTransform (  ) 

return the map level transform

Definition at line 244 of file SpaceVariantModule.C.

float SpaceVariantModule::getMaxRf ( const float &  offset,
const float &  surround_factor 
)

get the max rf size in sigmas given an offset and surround factor

Definition at line 268 of file SpaceVariantModule.C.

float SpaceVariantModule::getMaxRf (  )  const

get the max rf size in sigmas

Definition at line 262 of file SpaceVariantModule.C.

template<class T_or_RGB >
ImageSet< T_or_RGB > SpaceVariantModule::getScaleSpace ( const Image< T_or_RGB > &  inp,
const float &  maxrf = -1.0F 
) [inline]

Compute just the scale space sometimes we may want to just get the scale space.

Definition at line 101 of file SpaceVariantModule.C.

References clear(), Image< T >::getDims(), Image< T >::initialized(), and validTransforms().

rutz::shared_ptr< SpaceVariantTransform > SpaceVariantModule::getTransform (  ) 

return the transform

Definition at line 238 of file SpaceVariantModule.C.

template<class T_or_RGB >
Image< T_or_RGB > SpaceVariantModule::inverseMap ( const Image< T_or_RGB > &  map_image  )  const [inline]

We may perform pyramid operations on space variant images and this function allows for images at the output map scale (see LevelSpec.H) to be inverse transformed back to the input image dimensions.

Definition at line 195 of file SpaceVariantModule.C.

References Image< T >::getDims(), and rutz::shared_ptr< T >::is_valid().

template<class T_or_RGB >
Image< T_or_RGB > SpaceVariantModule::inverseTransform ( const Image< T_or_RGB > &  ret_image  )  const [inline]

inverse transform an already space variant transformed image back to a cartesian one

Definition at line 185 of file SpaceVariantModule.C.

References Image< T >::getDims(), and rutz::shared_ptr< T >::is_valid().

void SpaceVariantModule::reset1 (  )  [protected, virtual]

This is called from within reset() before the subcomponents are reset.

Reimplemented from ModelComponent.

Definition at line 69 of file SpaceVariantModule.C.

References clear().

void SpaceVariantModule::setMapTransform ( rutz::shared_ptr< SpaceVariantTransform map_transform  ) 

set the map level transform

Definition at line 256 of file SpaceVariantModule.C.

void SpaceVariantModule::setTransform ( rutz::shared_ptr< SpaceVariantTransform transform  ) 

set the transform

Definition at line 250 of file SpaceVariantModule.C.

void SpaceVariantModule::toSvCoords ( Point2D< int > &  point  )  const

transform a point from cartesian to space variant coords

Definition at line 204 of file SpaceVariantModule.C.

References Point2D< T >::i, and rutz::shared_ptr< T >::is_valid().

void SpaceVariantModule::toSvCoordsMap ( Point2D< int > &  point  )  const

transform a point to space variant coords at the map level

Definition at line 218 of file SpaceVariantModule.C.

References Point2D< T >::i, and rutz::shared_ptr< T >::is_valid().

template<class T_or_RGB >
Image< T_or_RGB > SpaceVariantModule::transform ( const Image< T_or_RGB > &  image,
const Point2D< int > &  fovea,
const ImageSet< typename promote_trait< T_or_RGB, float >::TP > *const   pyr_cache = NULL 
) [inline]

transform a cartesian image to a space variant one, but first center the image to the desired point.

Definition at line 158 of file SpaceVariantModule.C.

References Image< T >::getHeight(), Image< T >::getWidth(), Point2D< T >::i, shiftClean(), and transform().

template<class T_or_RGB >
Image< T_or_RGB > SpaceVariantModule::transform ( const Image< T_or_RGB > &  image,
const ImageSet< typename promote_trait< T_or_RGB, float >::TP > *const   pyr_cache = NULL 
) [inline]

transform a cartesian image to a space variant one

Definition at line 121 of file SpaceVariantModule.C.

References clear(), Image< T >::getDims(), Image< T >::initialized(), and validTransforms().

Referenced by cropTransform(), transform(), transformFloat(), and transformRbg().

Image< float > SpaceVariantModule::transformFloat ( const Image< float > &  image,
const ImageSet< float > *const   pyr_cache = NULL 
) [virtual]

transform a cartesian image to a space variant one

Reimplemented in SpaceVariantDoGModule, and SpaceVariantEdgeModule.

Definition at line 88 of file SpaceVariantModule.C.

References transform().

void SpaceVariantModule::transformFloatPyramid ( const Image< float > &  image,
ImageSet< float > &  pyramid,
const SVChanLevels levels,
const ImageSet< float > *const   pyr_cache 
) [virtual]

transform a cartesian image to a space variant pyramid

Reimplemented in SpaceVariantDoGModule, and SpaceVariantEdgeModule.

Definition at line 94 of file SpaceVariantModule.C.

References transformPyramid().

template<class T_or_RGB >
void SpaceVariantModule::transformPyramid ( const Image< T_or_RGB > &  image,
ImageSet< typename promote_trait< T_or_RGB, float >::TP > &  pyramid,
const SVChanLevels levels,
const ImageSet< typename promote_trait< T_or_RGB, float >::TP > *const   pyr_cache = NULL 
) [inline]

transform a cartesian image to a space variant pyramid

Definition at line 140 of file SpaceVariantModule.C.

References clear(), Image< T >::getDims(), SVChanLevels::getVariance(), Image< T >::initialized(), SVChanLevels::numLevels(), and validTransforms().

Referenced by transformFloatPyramid(), and transformRgbPyramid().

Image< PixRGB< float > > SpaceVariantModule::transformRbg ( const Image< PixRGB< byte > > &  image,
const ImageSet< PixRGB< float > > *const   pyr_cache = NULL 
) [virtual]

transform a cartesian image to a space variant one

Here, for polymoprhism, we provide virtual functions for commonly used types. However, for flexibility we also provide generic template functions.

Definition at line 75 of file SpaceVariantModule.C.

References image, and transform().

void SpaceVariantModule::transformRgbPyramid ( const Image< PixRGB< byte > > &  image,
ImageSet< PixRGB< float > > &  pyramid,
const SVChanLevels levels,
const ImageSet< PixRGB< float > > *const   pyr_cache 
) [virtual]

transform a cartesian image to a space variant pyramid

Reimplemented in SpaceVariantDoGModule, and SpaceVariantEdgeModule.

Definition at line 82 of file SpaceVariantModule.C.

References image, and transformPyramid().

bool SpaceVariantModule::validTransforms (  )  const

The documentation for this class was generated from the following files:
Generated on Sun May 8 08:25:49 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3