Hmax Class Reference

Object recognition model inspired from Riesenhuber & Poggio's HMAX model. More...

#include <HMAX/Hmax.H>

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

List of all members.

Public Member Functions

 Hmax ()
 Default constructor. Need to call init() later.
 Hmax (const int nori, const std::vector< int > &spacess, const std::vector< int > &scaless, const int c1spaceol=2, const bool angleflag=true, const float s2t=1.0F, const float s2s=1.0F, const float stdmin=1.75F, const float stdstep=0.5F, const int fsmin=3, const int fsstep=1)
 Constructor.
void init (const int nori, const std::vector< int > &spacess, const std::vector< int > &scaless, const int c1spaceol=2, const bool angleflag=true, const float s2t=1.0F, const float s2s=1.0F)
 Initialization.
void initFilters (const float stdmin, const float stdstep, const int fsmin, const int fsstep)
void freeMem ()
 Free internal memory.
 ~Hmax ()
 Destructor.
std::vector< std::stringreadDir (std::string dirName)
 For utilize the operation : read a directory and pass the list of files.
std::vector< std::stringreadList (std::string inName)
Image< float > origGetC2 (const Image< float > &imag)
 This is the code of Max Riesenhuber almost straight out of the box.
Image< float > getC2 (const Image< float > &input)
 Compute C2 responses from an input image.
int getNumOrientations ()
void initC1 (Image< float > **&c1Res)
void clearC1 (Image< float > **&c1Res)
void printCorners (const char name[], const Image< float > &im, bool cond)
void writeOutImage (const Image< float > &im, std::string &fName)
void getC1 (const Image< float > &input, Image< float > **&c1Res)
void sumFilter (const Image< float > &image, const float radius, Image< float > &newImage)
void sumFilter (const Image< float > &image, const Rectangle &support, Image< float > &newImage)

Protected Attributes

bool initialized
 keep track of whether we have allocated some memory
int nsb
 number of scale bands
int ns
 number of scales
int no
 number of orientations
Image< float > ** filter
 low-level processing filters [ns][no]
int c1SpaceOL
 spatial overlap in C1 cells
bool angleFlag
 normalize convolution by image energy if true
float s2Target
 center of S2 target
float s2Sigma
 size of S2 target
std::vector< int > spaceSS
std::vector< int > scaleSS

Detailed Description

Object recognition model inspired from Riesenhuber & Poggio's HMAX model.

See Riesenhuber & Poggio, Nature Neuroscience, 1999.

Definition at line 53 of file Hmax.H.


Constructor & Destructor Documentation

Hmax::Hmax (  ) 

Default constructor. Need to call init() later.

Definition at line 58 of file Hmax.C.

References initialized.

Hmax::Hmax ( const int  nori,
const std::vector< int > &  spacess,
const std::vector< int > &  scaless,
const int  c1spaceol = 2,
const bool  angleflag = true,
const float  s2t = 1.0F,
const float  s2s = 1.0F,
const float  stdmin = 1.75F,
const float  stdstep = 0.5F,
const int  fsmin = 3,
const int  fsstep = 1 
)

Constructor.

Definition at line 62 of file Hmax.C.

References init(), and initialized.

Hmax::~Hmax (  ) 

Destructor.

Definition at line 131 of file Hmax.C.

References freeMem().


Member Function Documentation

void Hmax::freeMem (  ) 

Free internal memory.

Reimplemented in HmaxFL.

Definition at line 120 of file Hmax.C.

References filter, and initialized.

Referenced by init(), and ~Hmax().

Image< float > Hmax::getC2 ( const Image< float > &  input  ) 

Compute C2 responses from an input image.

Definition at line 458 of file Hmax.C.

References c1SpaceOL, Image< T >::clear(), featurePoolHmax(), hmaxActivation(), NO_INIT, s2Sigma, s2Target, Image< T >::setVal(), and Image< T >::size().

void Hmax::init ( const int  nori,
const std::vector< int > &  spacess,
const std::vector< int > &  scaless,
const int  c1spaceol = 2,
const bool  angleflag = true,
const float  s2t = 1.0F,
const float  s2s = 1.0F 
)

Initialization.

Definition at line 75 of file Hmax.C.

References angleFlag, c1SpaceOL, freeMem(), no, ns, nsb, s2Sigma, and s2Target.

Referenced by Hmax().

Image< float > Hmax::origGetC2 ( const Image< float > &  imag  ) 

This is the code of Max Riesenhuber almost straight out of the box.

Definition at line 191 of file Hmax.C.

References angleFlag, Image< T >::begin(), c1SpaceOL, filter, Image< T >::getArrayPtr(), Image< T >::getHeight(), Image< T >::getWidth(), hmaxActivation(), image, Image< T >::resize(), s2Sigma, s2Target, safecopy(), and sqrt().

std::vector< std::string > Hmax::readDir ( std::string  dirName  ) 

For utilize the operation : read a directory and pass the list of files.

Definition at line 135 of file Hmax.C.


Member Data Documentation

bool Hmax::angleFlag [protected]

normalize convolution by image energy if true

Definition at line 106 of file Hmax.H.

Referenced by init(), and origGetC2().

int Hmax::c1SpaceOL [protected]

spatial overlap in C1 cells

Definition at line 105 of file Hmax.H.

Referenced by HmaxFL::extractRandC1Patch(), getC2(), init(), and origGetC2().

Image<float>** Hmax::filter [protected]

low-level processing filters [ns][no]

Definition at line 103 of file Hmax.H.

Referenced by HmaxFL::freeMem(), freeMem(), and origGetC2().

bool Hmax::initialized [protected]

keep track of whether we have allocated some memory

Definition at line 99 of file Hmax.H.

Referenced by HmaxFL::freeMem(), freeMem(), Hmax(), and HmaxFL::HmaxFL().

int Hmax::no [protected]

number of orientations

Definition at line 102 of file Hmax.H.

Referenced by init().

int Hmax::ns [protected]

number of scales

Definition at line 101 of file Hmax.H.

Referenced by init().

int Hmax::nsb [protected]

number of scale bands

Definition at line 100 of file Hmax.H.

Referenced by HmaxFL::getC2(), HmaxFL::init(), and init().

float Hmax::s2Sigma [protected]

size of S2 target

Definition at line 108 of file Hmax.H.

Referenced by getC2(), init(), and origGetC2().

float Hmax::s2Target [protected]

center of S2 target

Definition at line 107 of file Hmax.H.

Referenced by getC2(), init(), and origGetC2().


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