Object recognition model inspired from Riesenhuber & Poggio's HMAX model. More...
#include <CUDA/CudaHmax.H>
Public Member Functions | |
CudaHmax () | |
Default constructor. Need to call init() later. | |
CudaHmax (MemoryPolicy mp, int dev, 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 (MemoryPolicy mp, int dev, 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. | |
~CudaHmax () | |
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) |
CudaImage< float > | getC2 (const CudaImage< float > &input) |
Compute C2 responses from an input image. | |
void | initC1 (CudaImage< float > **&c1Res) |
void | clearC1 (CudaImage< float > **&c1Res) |
void | printCorners (const char name[], const CudaImage< float > &cim, bool cond) |
void | writeOutImage (const CudaImage< float > &cim, std::string &fName) |
void | getC1 (const CudaImage< float > &input, CudaImage< float > **&c1Res) |
void | sumFilter (const CudaImage< float > &image, const float radius, CudaImage< float > &newImage) |
void | sumFilter (const CudaImage< float > &image, const Rectangle &support, CudaImage< 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 | |
CudaImage< float > ** | filter |
low-level processing filters [ns][no] | |
MemoryPolicy | itsMp |
int | itsDev |
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 CudaHmax.H.
CudaHmax::CudaHmax | ( | ) |
Default constructor. Need to call init() later.
Definition at line 63 of file CudaHmax.C.
References initialized.
CudaHmax::CudaHmax | ( | MemoryPolicy | mp, | |
int | dev, | |||
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 | |||
) |
CudaHmax::~CudaHmax | ( | ) |
void CudaHmax::freeMem | ( | ) |
Free internal memory.
Reimplemented in CudaHmaxFL.
Definition at line 125 of file CudaHmax.C.
References filter, and initialized.
Referenced by init(), and ~CudaHmax().
Compute C2 responses from an input image.
Definition at line 300 of file CudaHmax.C.
References NO_INIT.
void CudaHmax::init | ( | MemoryPolicy | mp, | |
int | dev, | |||
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 79 of file CudaHmax.C.
References angleFlag, c1SpaceOL, freeMem(), initialized, no, ns, nsb, s2Sigma, and s2Target.
Referenced by CudaHmax().
std::vector< std::string > CudaHmax::readDir | ( | std::string | dirName | ) |
For utilize the operation : read a directory and pass the list of files.
Definition at line 140 of file CudaHmax.C.
bool CudaHmax::angleFlag [protected] |
normalize convolution by image energy if true
Definition at line 105 of file CudaHmax.H.
Referenced by init().
int CudaHmax::c1SpaceOL [protected] |
CudaImage<float>** CudaHmax::filter [protected] |
low-level processing filters [ns][no]
Definition at line 100 of file CudaHmax.H.
Referenced by freeMem().
bool CudaHmax::initialized [protected] |
keep track of whether we have allocated some memory
Definition at line 96 of file CudaHmax.H.
Referenced by CudaHmax(), CudaHmaxFL::CudaHmaxFL(), freeMem(), CudaHmaxFL::freeMem(), and init().
int CudaHmax::no [protected] |
int CudaHmax::ns [protected] |
int CudaHmax::nsb [protected] |
number of scale bands
Definition at line 97 of file CudaHmax.H.
Referenced by CudaHmaxFL::getC2(), CudaHmaxFL::init(), and init().
float CudaHmax::s2Sigma [protected] |
float CudaHmax::s2Target [protected] |