libeblearn
|
Abstract class for normalization of image channels. More...
#include <ebl_preprocessing.h>
Public Member Functions | |
channorm_module (idxdim &kerdim, bool mirror=true, t_norm norm_mode=WSTD_NORM, const char *name="channorm", int nf=1, bool globnorm=true) | |
virtual | ~channorm_module () |
Destructor. | |
virtual void | fprop (Tstate &in, Tstate &out)=0 |
Forward propagation from in to out (abstract). | |
virtual channorm_module< T, Tstate > * | copy ()=0 |
Returns a deep copy of this module (abstract). | |
virtual std::string | describe () |
Returns a string containing describe() string of all modules. | |
module_1_1< T, Tstate > * | new_norm (idxdim &normker, bool mirror, t_norm norm_mode, int nf) |
Returns a new norm module. | |
Protected Member Functions | |
virtual void | resize_output (Tstate &in, Tstate &out, int dim0=-1) |
Protected Attributes | |
idxdim | normker |
norm kernel size | |
Tstate | tmp |
temporary buffer | |
module_1_1< T, Tstate > * | norm |
contrast normalization module | |
bool | mirror |
Mirror padding or not. | |
t_norm | norm_mode |
Normalization mode. |
Abstract class for normalization of image channels.
ebl::channorm_module< T, Tstate >::channorm_module | ( | idxdim & | kerdim, |
bool | mirror = true , |
||
t_norm | norm_mode = WSTD_NORM , |
||
const char * | name = "channorm" , |
||
int | nf = 1 , |
||
bool | globnorm = true |
||
) |
Constructor.
kerdim | Kernel dimensions for local normalization. |
mirror | If true, pad normalization if a mirror of the image instead of with zeros. This can be useful in object detection when objects are close to borders. |
norm_mode | The type of normalization (WSTD_NORM by default). |
nf | The number of features to normalize across. |
globnorm | Normalize channels globally or not. |
void ebl::channorm_module< T, Tstate >::resize_output | ( | Tstate & | in, |
Tstate & | out, | ||
int | dim0 = -1 |
||
) | [protected, virtual] |
Resize the output based on input dimensions
dim0 | An optional size for the first dimension. Set it to 1 when converting from color to greyscale. |
Reimplemented from ebl::channels_module< T, Tstate >.