
Object recognition model inspired from Riesenhuber & Poggio's HMAX model. More...
#include <HMAX/Hmax.H>


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::string > | readDir (std::string dirName) |
| For utilize the operation : read a directory and pass the list of files. | |
| std::vector< std::string > | readList (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 |
Object recognition model inspired from Riesenhuber & Poggio's HMAX model.
See Riesenhuber & Poggio, Nature Neuroscience, 1999.
Definition at line 53 of file Hmax.H.
| 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 | |||
| ) |
| void Hmax::freeMem | ( | ) |
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 | |||
| ) |
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 | ) |
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] |
int Hmax::ns [protected] |
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().
1.6.3