libeblearn
ebl::fovea_module< T, Tstate > Class Template Reference

#include <ebl_preprocessing.h>

Inheritance diagram for ebl::fovea_module< T, Tstate >:
ebl::resizepp_module< T, Tstate > ebl::s2m_module< T, Tstate > ebl::module_1_1< T, Tstate > ebl::module_1_1< T, Tin, Tout > ebl::module ebl::module

List of all members.

Public Member Functions

 fovea_module (std::vector< double > &fovea, midxdim &fovea_scales_size, idxdim &dsize, bool boxscale=false, uint mode=MEAN_RESIZE, module_1_1< T, Tstate > *pp=NULL, bool own_pp=true, idxdim *dzpad=NULL, const char *name="fovea")
 fovea_module (std::vector< double > &fovea, bool boxscale=false, uint mode=MEAN_RESIZE, module_1_1< T, Tstate > *pp=NULL, bool own_pp=true, idxdim *dzpad=NULL, const char *name="fovea")
virtual void fprop (Tstate &in, Tstate &out)
virtual void fprop (Tstate &in, midx< T > &out)
virtual void fprop (Tstate &in, mstate< Tstate > &out)
virtual void bprop (Tstate &in, mstate< Tstate > &out)
 backward propagation from in to out (empty)
virtual void bbprop (Tstate &in, mstate< Tstate > &out)
 bbackward propagation from in to out (empty)
virtual mfidxdim bprop_size (mfidxdim &osize)
 Returns input dimensions corresponding to output dimensions 'osize'.
virtual std::string describe ()
 Returns a string describing this module and its parameters.
const vector< rect< int > > & get_input_bboxes ()
 Returns bounding boxes of each scale in the input space.
const vector< rect< int > > & get_original_bboxes ()
 Returns bounding boxes of each scale in the output space.
virtual uint nlayers ()
 Returns the number of layers produced by this resizing module.

Protected Attributes

std::vector< double > fovea
midxdim fovea_scales_size
 A vector for sizes of each scale.
bool boxscale
 Scaling input box or input image.
std::vector< rect< int > > obboxes
 Boxes in output.
std::vector< rect< int > > ibboxes
 Boxes in input.

Detailed Description

template<typename T, class Tstate = bbstate_idx<T>>
class ebl::fovea_module< T, Tstate >

Same as resizepp_module, except that it replicates the output at different scales.


Constructor & Destructor Documentation

template<typename T , class Tstate >
ebl::fovea_module< T, Tstate >::fovea_module ( std::vector< double > &  fovea,
midxdim &  fovea_scales_size,
idxdim &  dsize,
bool  boxscale = false,
uint  mode = MEAN_RESIZE,
module_1_1< T, Tstate > *  pp = NULL,
bool  own_pp = true,
idxdim *  dzpad = NULL,
const char *  name = "fovea" 
)

Constructor. Preprocessing module pp will be deleted upon destruction.

Parameters:
boxscaleIf true, rescale input box by fovea factors and input is unchanged, otherwise resize input by 1/(fovea factors) and box is unchanged. Box scaling should be used for training extraction and image scaling for detection (default is false).
ppAn optional pointer to a preprocessing module. If NULL, no preprocessing is performed. This module is responsible for destroying the preprocessing module.
modeThe type of resizing (MEAN_RESIZE, BILINEAR_RESIZE, GAUSSIAN_RESIZE).
sizeThe target dimensions (heightxwidth)
zpadOptional zero-padding is added on each side
template<typename T , class Tstate >
ebl::fovea_module< T, Tstate >::fovea_module ( std::vector< double > &  fovea,
bool  boxscale = false,
uint  mode = MEAN_RESIZE,
module_1_1< T, Tstate > *  pp = NULL,
bool  own_pp = true,
idxdim *  dzpad = NULL,
const char *  name = "fovea" 
)

Constructor without target dimensions. set_dimensions should be called later. Preprocessing module pp will be deleted upon destruction.

Parameters:
boxscaleIf true, rescale input box by fovea factors and input is unchanged, otherwise resize input by 1/(fovea factors) and box is unchanged. Box scaling should be used for training extraction and image scaling for detection (default is false).
ppAn optional pointer to a preprocessing module. If NULL, no preprocessing is performed. This module is responsible for destroying the preprocessing module.
modeThe type of resizing (MEAN_RESIZE, BILINEAR_RESIZE, GAUSSIAN_RESIZE).
zpadOptional zero-padding is added on each side

Member Function Documentation

template<typename T , class Tstate >
void ebl::fovea_module< T, Tstate >::fprop ( Tstate &  in,
midx< T > &  out 
) [virtual]

Process 'in' into 'out' which will contain an array of idx, where each idx is a fovea scale

Reimplemented from ebl::resizepp_module< T, Tstate >.

template<typename T , class Tstate >
void ebl::fovea_module< T, Tstate >::fprop ( Tstate &  in,
Tstate &  out 
) [virtual]

Process 'in' into 'out' which will contain all foveas stacked in first dimensions.

Reimplemented from ebl::resizepp_module< T, Tstate >.

template<typename T , class Tstate >
void ebl::fovea_module< T, Tstate >::fprop ( Tstate &  in,
mstate< Tstate > &  out 
) [virtual]

Process 'in' into 'out' which will contain all foveas separated in each state of the multi-state 'out'.

Reimplemented from ebl::s2m_module< T, Tstate >.


Member Data Documentation

template<typename T , class Tstate = bbstate_idx<T>>
std::vector<double> ebl::fovea_module< T, Tstate >::fovea [protected]

A vector of all fovea scales.


The documentation for this class was generated from the following files: