ImageEn, unit ievision

TIEVisionFaceRecognizer


Declaration

TIEVisionFaceRecognizer = interface(TIEVisionBase)


Description

An interface to perform face learning and recognition.




Demos

Demo  Demos\IEVision\FaceRecognizer\FaceRecognizer.dpr
Demo  Demos\IEVision\FaceRecognizerVideo\FaceRecognizerVideo.dpr


Examples

// Train our dataset with faces from a multibitmap (where the name associated with each face has been stored in the image dictionary as "Name")
m_faceRecognizer.clear();
for i := 0 to m_faces.Count - 1 do
  m_faceRecognizer.addTrainImage(mbitmap.GetTIEBitmap(i).GetIEVisionImage(),                  // Face image
                                 PWideChar( mbitmap.ImageDictionary[i].GetString('Name') ));  // Face name or label
if  m_faces.Count > 0 then
  m_faceRecognizer.train();
lblDBSize.Caption := format( 'Face DB Size: %d', [ m_faces.Count ]);


// Look up a face in the database
recName := m_faceRecognizer.detect( faceBitmap.GetIEVisionImage(), confidence );
ShowMessage( Format( 'This face is "%s" (Confidence: %s)', [ recName, FloatToStr(confidence) ]));


Methods and Properties

Public Method  addTrainImage
Public Method  detect
Public Method  clear
Public Method  isTrained
Public Method  load
Public Method  save
Public Method  selectEigenFaceRecognizer
Public Method  selectFisherFaceRecognizer
Public Method  selectLBPHFaceRecognizer
Public Method  train


See Also

createFaceRecognizer