Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


How do I perform identification of a person from a database?


This article outlines the implementation of using face recognition for identifying a person from a database of


The main steps involved in implementing the identification process are registration and identificationknown people. It may be applied to cases such as whitelists for access control or attendance management, blacklists for alerts and similar. The main processes involved in implementing this scenario are registration and matching, as follows.

Register all students in a school, let’s say 2000 of them, by doing the following for each (presuming you have their images):


run face tracker on the image to find the face (VisageTracker.Track()) and obtain the FaceData;



Assuming that you have an image and an ID (name, number or similar) for each person, you register each person by storing their face descriptor into a gallery (database). For each person, the process is as follows:

  • Locate the face in the image:

    • To locate the face, you can use detection (for a single image) or tracking (for a series of images from a camera feed).

      • See function VisageSDK::VisageTracker::track() or VisageFeaturesDetector::detectFacialFeatures().

    • Each of these functions returns the number of faces in the image - if there is not exactly one face you may report an error or take other action.

    • Furthermore, these functions return the FaceData structure for each detected face, containing the face location.

  • Use VisageFaceRecognition.AddDescriptor() to get the face descriptor and add it

    to the gallery of known faces together with the name or ID of the student;save the galery

    to the gallery of known faces together with the name or ID of the person.

    • The descriptor is an array of short integers that describes the face - similar faces will have similar descriptors.

    • The gallery is simply a database of face descriptors, each with attached ID.

      • Note that you could store the descriptors in your own database, without using the provided gallery implementation.

  • Save the gallery using VisageFaceRecognition.SaveGallery().Then, for each


In this stage, you match a new facial image (for example, a person arriving at


run face tracker on live camera image to find the face (VisageTracker.Track()) and obtain the FaceData;


a gate, reception, control point or similar) against the previously stored gallery, and obtain IDs of one or more most similar persons registered in the gallery.

  • First, locate the face(s) in the new image.

    • The steps are the same as explained above in the Registration part. You obtain a FaceData structure for each located face.

  • Pass the FaceData to VisageFaceRecognition.ExtractDescriptor() to get the face descriptor of the person



  • pass

    Pass this descriptor to VisageFaceRecognition.Recognize(), which will match it to all the descriptors you have previously stored in the gallery and return the name/ID of the most similar person (or a desired number of most similar



    • the Recognize() function also returns a similarity value, which you may use to cut off the false positives.