Ignore:
Timestamp:
07/29/2009 03:49:34 PM (10 years ago)
Author:
dave
Message:

Benchmark testing added for the eigen face recognition

File:
1 edited

Legend:

Unmodified
Added
Removed
  • foam/trunk/faceclassifier/src/FaceBank.cpp

    r95 r96  
    5151{ 
    5252        // Subtract the mean as an attempt to deal with global lighting changes 
    53         //face.SubMean(); 
     53        face.SubMean(); 
    5454         
    5555        m_Classifier->AddFeature(ID,face.Scale(m_FaceWidth,m_FaceHeight).RGB2GRAY().ToFloatVector()); 
     
    6262{ 
    6363        // Subtract the mean as an attempt to deal with global lighting changes 
    64         //face.SubMean(); 
     64        face.SubMean(); 
    6565         
    6666        float error; 
    6767        ID = m_Classifier->Classify(face.Scale(m_FaceWidth,m_FaceHeight).RGB2GRAY().ToFloatVector(),error); 
    68  
     68         
     69        if (error!=0) error=1/error; 
     70        else return 1; 
     71         
    6972        // if the error is less than the threshold, return the id 
    70         //if (error<m_ErrorThresh) 
     73        //if (error>m_ErrorThresh) 
    7174        { 
    72                 return 1-error; 
     75                return error; 
    7376        } 
    7477         
Note: See TracChangeset for help on using the changeset viewer.