3DiVi Face SDK  3.21.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups
com.vdt.face_recognition.sdk.Recognizer Class Reference

Interface object for creating and matching templates. More...

Classes

class  MatchResult
 Result of template matching. More...
 
enum  SearchAccelerationType
 Types of search acceleration. More...
 
class  SearchResult
 Result of searching the Template query in the TemplatesIndex. More...
 

Public Member Functions

void dispose ()
 Release internal object.
 
boolean isDisposed ()
 Check if an object is released. More...
 
String getMethodName ()
 Get a method name. Thread-safe. More...
 
MatchResult getROCCurvePointByDistanceThreshold (final double distance_threshold)
 Get a point on the ROC curve with a given distance threshold. Thread-safe. More...
 
MatchResult getROCCurvePointByFAR (final double desired_far)
 Get a point on the ROC curve with a given false acceptance rate (FAR). Thread-safe. More...
 
MatchResult getROCCurvePointByFRR (final double desired_frr)
 Get a point on the ROC curve with a given false rejection rate (FRR). Thread-safe. More...
 
MatchResult getROCCurvePointByScoreThreshold (final double score_threshold)
 Get a point on the ROC curve with a given similarity score threshold. Thread-safe. More...
 
Template processing (final RawSample sample)
 Create a template. More...
 
Template loadTemplate (InputStream binary_stream)
 Load the template. The format is platform-independent. Only the templates that were created with the same method (i.e. with the same ini_file) can be loaded. More...
 
MatchResult verifyMatch (final Template template1, final Template template2)
 Compare two templates. The order of templates does not matter. Only the templates that were created with the same method (i.e. with the same ini_file) can be loaded. More...
 
TemplatesIndex createIndex (final Vector< Template > templates, final int search_threads_count)
 Create the TemplatesIndex for quick search. The total size of all indexes is limited by the license. More...
 
TemplatesIndex createIndex (final Vector< Template > templates, final int search_threads_count, final int reserve_queries_count)
 Create the TemplatesIndex for quick search. The total size of all indexes is limited by the license. More...
 
Vector< SearchResultsearch (final Template query_template, final TemplatesIndex templates_index, final int k, final SearchAccelerationType acceleration)
 Search for the k nearest Templates in the TemplatesIndex. The search time depends on k and the size of the TemplatesIndex. More...
 
Vector< Vector< SearchResult > > search (final Vector< Template > queries_templates, final TemplatesIndex templates_index, final int k, final SearchAccelerationType acceleration)
 Search for the k nearest Templates in the TemplatesIndex. The search time depends on k and the size of the TemplatesIndex. More...
 
Vector< Integer > chooseRepresentativeTemplatesSet (final int set_size, final Vector< Template > templates, final Vector< Integer > inviolable_templates_indexes)
 Choose templates set that best represent original templates. More...
 

Detailed Description

Interface object for creating and matching templates.

Member Function Documentation

Vector<Integer> com.vdt.face_recognition.sdk.Recognizer.chooseRepresentativeTemplatesSet ( final int  set_size,
final Vector< Template templates,
final Vector< Integer >  inviolable_templates_indexes 
)
inline

Choose templates set that best represent original templates.

Parameters
[in]set_sizeRequired set size.
[in]templatesOriginal templates.
[in]inviolable_templates_indexesIndexes of templates, required to be included in the result set. Can be null.
Returns
Indexes of templates that make up the result set.
TemplatesIndex com.vdt.face_recognition.sdk.Recognizer.createIndex ( final Vector< Template templates,
final int  search_threads_count 
)
inline

Create the TemplatesIndex for quick search. The total size of all indexes is limited by the license.

Parameters
[in]templatesList of templates for creating an index.
[in]search_threads_countCount of threads that will be used while searching in this index.
Returns
Created index.
TemplatesIndex com.vdt.face_recognition.sdk.Recognizer.createIndex ( final Vector< Template templates,
final int  search_threads_count,
final int  reserve_queries_count 
)
inline

Create the TemplatesIndex for quick search. The total size of all indexes is limited by the license.

Parameters
[in]templatesList of templates for creating an index.
[in]search_threads_countCount of threads that will be used while searching in this index.
[in]reserve_queries_countInteger passed to TemplatesIndex.reserveSearchMemory, which is called with the created index.
Returns
Created index.
String com.vdt.face_recognition.sdk.Recognizer.getMethodName ( )
inline

Get a method name. Thread-safe.

Returns
The name of the method.
MatchResult com.vdt.face_recognition.sdk.Recognizer.getROCCurvePointByDistanceThreshold ( final double  distance_threshold)
inline

Get a point on the ROC curve with a given distance threshold. Thread-safe.

Returns
Point on the ROC curve in the form of a MatchResult struct.
MatchResult com.vdt.face_recognition.sdk.Recognizer.getROCCurvePointByFAR ( final double  desired_far)
inline

Get a point on the ROC curve with a given false acceptance rate (FAR). Thread-safe.

Returns
Point on the ROC curve in the form of a MatchResult struct.
MatchResult com.vdt.face_recognition.sdk.Recognizer.getROCCurvePointByFRR ( final double  desired_frr)
inline

Get a point on the ROC curve with a given false rejection rate (FRR). Thread-safe.

Returns
Point on the ROC curve in the form of a MatchResult struct.
MatchResult com.vdt.face_recognition.sdk.Recognizer.getROCCurvePointByScoreThreshold ( final double  score_threshold)
inline

Get a point on the ROC curve with a given similarity score threshold. Thread-safe.

Returns
Point on the ROC curve in the form of a MatchResult struct.
boolean com.vdt.face_recognition.sdk.Recognizer.isDisposed ( )
inline

Check if an object is released.

Returns
true if an object is released, false otherwise.
Template com.vdt.face_recognition.sdk.Recognizer.loadTemplate ( InputStream  binary_stream)
inline

Load the template. The format is platform-independent. Only the templates that were created with the same method (i.e. with the same ini_file) can be loaded.

Parameters
[in]binary_streamInput stream object.
Returns
Loaded template.
Template com.vdt.face_recognition.sdk.Recognizer.processing ( final RawSample  sample)
inline

Create a template.

Parameters
[in]sampleFace sample. At the moment, all methods can only be used with frontal samples.
Returns
Created template.
Vector<SearchResult> com.vdt.face_recognition.sdk.Recognizer.search ( final Template  query_template,
final TemplatesIndex  templates_index,
final int  k,
final SearchAccelerationType  acceleration 
)
inline

Search for the k nearest Templates in the TemplatesIndex. The search time depends on k and the size of the TemplatesIndex.

Parameters
[in]query_templateThe Template query.
[in]templates_indexTemplatesIndex for search.
[in]kCount of the nearest templates for search.
[in]accelerationAcceleration type.
Returns
List with min(k, templates_index.size()) elements in ascending order of distance to the query_template.
Vector<Vector<SearchResult> > com.vdt.face_recognition.sdk.Recognizer.search ( final Vector< Template queries_templates,
final TemplatesIndex  templates_index,
final int  k,
final SearchAccelerationType  acceleration 
)
inline

Search for the k nearest Templates in the TemplatesIndex. The search time depends on k and the size of the TemplatesIndex.

Parameters
[in]queries_templatesVector of queries.
[in]templates_indexTemplatesIndex for search.
[in]kCount of the nearest templates for search.
[in]accelerationAcceleration type.
Returns
List with queries_templates.size() elements, each is a list with min(k, templates_index.size()) elements in ascending order of distance to the query_template.
MatchResult com.vdt.face_recognition.sdk.Recognizer.verifyMatch ( final Template  template1,
final Template  template2 
)
inline

Compare two templates. The order of templates does not matter. Only the templates that were created with the same method (i.e. with the same ini_file) can be loaded.

Parameters
[in]template1Template created by the same method.
[in]template2Template created by the same method.
Returns
Result of the matching.