The Machine Perception Toolbox

[Introduction]- [News]- [Download]- [Screenshots]- [Manual (pdf)]- [Forums]- [API Reference]- [Repository ]

 

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

MPISearchMex Class Reference

#include <mpisearchMex.h>

Inheritance diagram for MPISearchMex:

Inheritance graph
[legend]
Collaboration diagram for MPISearchMex:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MPISearchMex (const mxArray **ci, const int &max_num_patches_, mxArray *&patch_array)
int patchSize ()
 ~MPISearchMex ()

Protected Member Functions

void processFace (MPIScaledImage< float >::const_iterator &window, const float &one_over__sf2_times_std, const float &mean_over_std, const int &numFaces)

Protected Attributes

bool isBinary
int max_num_patches
double * patches

Constructor & Destructor Documentation

MPISearchMex const mxArray **  ci,
const int &  max_num_patches_,
mxArray *&  patch_array
 

Definition at line 38 of file mpisearchMexObject.cc.

References gentleFace1::assignData(), isBinary, mpisearchMexData::loadStruct(), max_num_patches, patches, and FeatureData::patchsize.

00039 {
00040   cout << "Entered MPISearchMex constructor" << endl;
00041   if(ci){
00042     mpisearchMexData::loadStruct(ci,data);
00043     isBinary = false;
00044   } else {
00045     //ci::assignData(data);
00046     gentleFace1::assignData(data);
00047     isBinary = true;
00048   }     
00049   max_num_patches = max_num_patches_;
00050 
00051   // Allocate memory for patches
00052   int dims[3] = {data.patchsize, data.patchsize, max_num_patches};
00053   if(max_num_patches)
00054     patch_array = mxCreateNumericArray(3,dims,mxDOUBLE_CLASS, mxREAL);
00055   else
00056     patch_array = mxCreateNumericMatrix(1, 1, mxDOUBLE_CLASS, mxREAL);
00057   patches = mxGetPr(patch_array);
00058 }

Here is the call graph for this function:

~MPISearchMex  ) 
 

Definition at line 60 of file mpisearchMexObject.cc.

References mpisearchMexData::releaseStruct().

00060                             {
00061   //  cout << "numfeatures: " << data.numfeatures << endl;
00062   if (!isBinary) {
00063     mpisearchMexData::releaseStruct(data);
00064   }
00065   //  data.cascades = NULL;
00066   //  data.features = NULL;
00067   //  data.numfeatures = 0;
00068   //  data.numcascades = 0;
00069 }

Here is the call graph for this function:


Member Function Documentation

int patchSize  ) 
 

Definition at line 72 of file mpisearchMexObject.cc.

References FeatureData::patchsize.

00072 {return data.patchsize;}

void processFace MPIScaledImage< float >::const_iterator &  window,
const float &  one_over__sf2_times_std,
const float &  mean_over_std,
const int &  numFaces
[protected, virtual]
 

Reimplemented from MPISearchObjectDetector< float >.

Definition at line 74 of file mpisearchMexObject.cc.

00076                                                                      {
00077   // write detections into array
00078   // Note that the arrays are transposed for better use in Matlab
00079 
00080   //  if(numFaces < max_num_patches){
00081   //    double * p = &(patches[data.patchsize*data.patchsize*numFaces]);
00082   //    for(int c = 0; c < data.patchsize; ++c)
00083   //      for(int r = 0; r < data.patchsize; ++r)
00084   //    *(p++) = static_cast<double>(window.getScalePixel(0,c,r));
00085   //  }
00086 }


Member Data Documentation

bool isBinary [protected]
 

Definition at line 44 of file mpisearchMex.h.

Referenced by MPISearchMex().

int max_num_patches [protected]
 

Definition at line 42 of file mpisearchMex.h.

Referenced by MPISearchMex().

double* patches [protected]
 

Definition at line 43 of file mpisearchMex.h.

Referenced by MPISearchMex().


The documentation for this class was generated from the following files:
Generated on Mon Nov 8 17:08:38 2004 for MPT by  doxygen 1.3.9.1