|
visageSDK
|
Implementation of simple interface around visage|SDK VisageFaceRecogntion functionality. More...
#include <jni.h>#include <EGL/egl.h>#include <GLES/gl.h>#include <vector>#include <stdio.h>#include "VisageFeaturesDetector.h"#include "Common.h"#include "VisageFaceRecognition.h"#include <android/log.h>#include <android/asset_manager.h>#include <android/asset_manager_jni.h>#include "LicenseString.h"#include "VisageRendering.h"#include "Utils.h"Go to the source code of this file.
Functions | |
| void | Java_com_visagetechnologies_facedetectdemo_RecognitionActivity_InitRecognition (JNIEnv *env, jobject obj, jstring appPath) |
| Method for initializing the recognizer. More... | |
| void | Java_com_visagetechnologies_facedetectdemo_ImageDetectorView_recognizeFace (JNIEnv *env, jobject obj, jbyteArray frame, jint width, jint height) |
| Method which performs face recognition on a given image. More... | |
| void | Java_com_visagetechnologies_facedetectdemo_DetectorRenderer_displayIdentity (JNIEnv *env, jobject obj, jint width, jint height) |
| Method for displaying recognition results. More... | |
| void | Java_com_visagetechnologies_facedetectdemo_RecognitionActivity_CleanUp (JNIEnv *env, jobject obj) |
| Method for cleaning up resources used by application. | |
Implementation of simple interface around visage|SDK VisageFaceRecogntion functionality.
In order for Android application, which uses Java as its primary programming language, to communicate with visage|SDK functionality, which uses C++ as its primary language it is necessary to use Java Native Interface as a framework between the two.
Key members of wrapper are:
Definition in file VisageFaceRecognitionWrapper.cpp.
| void Java_com_visagetechnologies_facedetectdemo_DetectorRenderer_displayIdentity | ( | JNIEnv * | env, |
| jobject | obj, | ||
| jint | width, | ||
| jint | height | ||
| ) |
Method for displaying recognition results.
| width | width of the viewport |
| height | height of the viewport |
Definition at line 172 of file VisageFaceRecognitionWrapper.cpp.
References VisageSDK::VisageRendering::DisplayResults(), glHeight, glWidth, VsImage::height, VisageSDK::VisageRendering::SetFontTexture(), videoAspect, and VsImage::width.
| void Java_com_visagetechnologies_facedetectdemo_ImageDetectorView_recognizeFace | ( | JNIEnv * | env, |
| jobject | obj, | ||
| jbyteArray | frame, | ||
| jint | width, | ||
| jint | height | ||
| ) |
Method which performs face recognition on a given image.
Performs face recognition on a given image and returns the image with the name of the recognized person or the person with the most similar face found in the VisageFaceRecognition gallery.
Definition at line 130 of file VisageFaceRecognitionWrapper.cpp.
References VsImage::imageData, and VsImage::imageSize.
| void Java_com_visagetechnologies_facedetectdemo_RecognitionActivity_InitRecognition | ( | JNIEnv * | env, |
| jobject | obj, | ||
| jstring | appPath | ||
| ) |
Method for initializing the recognizer.
This method creates a new VisageFaceRecognition object and calls method createGallery() for loading VisageFaceRecognition gallery.
Definition at line 96 of file VisageFaceRecognitionWrapper.cpp.
1.8.13