Ignore:
Timestamp:
04/23/2009 05:05:31 PM (12 years ago)
Author:
dave
Message:

changed file format to xml, experimental multiple image/face matching, better makefile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • foam/trunk/simple-faceident/src/FaceBank.h

    r59 r76  
    1717#include <iostream> 
    1818#include <map> 
     19#include <vector> 
    1920#include <assert.h> 
    2021#include "cv.h" 
     22#include "Face.h" 
    2123 
    2224#ifndef FACE_BANK 
    2325#define FACE_BANK 
    24  
    25 ///////////////////////////////////////////////////////////////////////////////// 
    26 // A face representation for the facebank 
    27  
    28 class Face 
    29 { 
    30 public: 
    31         Face(IplImage *image); 
    32         ~Face(); 
    33  
    34         // Blends a newly detected face into this image, 
    35         // an attempt at making it a little more dynamic 
    36         // needs more testing. 
    37         void Learn(const IplImage *image, float blend); 
    38  
    39         IplImage *m_Image; 
    40 }; 
    4126 
    4227///////////////////////////////////////////////////////////////////////////////// 
     
    4934        // comparison, ErrorThresh is the error amount which will trigger a new face to be stored 
    5035        FaceBank(unsigned int FaceWidth, unsigned int FaceHeight, float ErrorThresh); 
    51          
    5236        ~FaceBank(); 
    5337 
     
    5943 
    6044        // Gives the id, given a face, and returns the confidence 
    61         float Identify(IplImage *face, unsigned int &ID); 
     45        float Identify(IplImage *face, unsigned int &ID, int &imagenum); 
     46         
     47        // Collect multiple images per user 
     48        void AllowMultiFaceImages(bool s) { m_MultiFaceImages=s; } 
    6249         
    6350        std::map<unsigned int, Face*> &GetFaceMap() { return m_FaceMap; } 
     
    7461        unsigned int m_FaceHeight; 
    7562        float m_ErrorThresh; 
     63        bool m_MultiFaceImages; 
    7664         
    7765        std::map<unsigned int, Face*> m_FaceMap; 
Note: See TracChangeset for help on using the changeset viewer.