visageSDK
docs_VisageRecognitionUnityPlugin.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 
6 
35 
50 bool _initRecognition(string dataPath);
51 
56 void _releaseRecognition();
57 
62  int _getDescriptorSize();
63 
67  bool _prepareDataForRecog();
68 
79 int _extractDescriptor(short[] descriptor, int faceIndex);
80 
89 float _descriptorsSimilarity(short[] firstDescrtiptor, short[] secondDescriptor);
90 
97 int _addDescriptor(short[] descriptor, string name);
98 
103 int _getDescriptorCount();
104 
110 string _getDescriptorName(int galleryIndex);
111 
118 int _replaceDescriptorName(string name, int galleryIndex);
119 
126 int _removeDescriptor(int galleryIndex);
127 
133 int _saveGallery(string fileName);
134 
141 int _loadGallery(string fileName);
142 
145  void _resetGallery();
146 
183 int _recognize(short[] descriptor, int n, System.Text.StringBuilder[] names, int capacity, float[] similarities);
184 
bool _prepareDataForRecog()
Extracts the face descriptor for face recognition.
void _resetGallery()
Clear all face descriptors from the gallery.
string _getDescriptorName(int galleryIndex)
Gets the name of a descriptor at the given index in the gallery.
int _getDescriptorSize()
Returns the size of descriptor.
int _getDescriptorCount()
Gets number of descriptors in the gallery.
void _releaseRecognition()
Releases memory allocated by the face recogntion in the _initRecognition() function.
int _replaceDescriptorName(string name, int galleryIndex)
Replaces the name of a descriptor at the given index in the gallery with new name.
bool _initRecognition(string dataPath)
Initialises VisageFaceRecognition.
int _loadGallery(string fileName)
Loads gallery from a binary file.
int _extractDescriptor(short[] descriptor, int faceIndex)
Extracts the face descriptor for face recognition.
int _removeDescriptor(int galleryIndex)
Removes a descriptor at the given index from the gallery.
int _recognize(short[] descriptor, int n, System.Text.StringBuilder[] names, int capacity, float[] similarities)
Compare a face to all faces in the current gallery and return n names of the most similar faces...
float _descriptorsSimilarity(short[] firstDescrtiptor, short[] secondDescriptor)
Calculates similarity between two descriptors.
int _addDescriptor(short[] descriptor, string name)
Adds descriptor to the gallery.
int _saveGallery(string fileName)
Save gallery as a binary file.