• Matches given descriptor to a closest entry in array of descriptors

    Parameters

    • descriptor: Descriptor

      face descriptor

    • descriptors: Descriptor[]

      array of face descriptors to commpare given descriptor to

    • options: MatchOptions = ...

      see similarity method for options description Returns

      • index index array index where best match was found or -1 if no matches
      • distance calculated distance of given descriptor to the best match
      • similarity calculated normalized similarity of given descriptor to the best match

    Returns { distance: number; index: number; similarity: number }