// 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 ]);