|
visageSDK
|
Implementation of simple interface around visage|SDK VisageFeaturesDetector functionality. More...
#include <jni.h>#include <EGL/egl.h>#include <GLES/gl.h>#include <vector>#include <stdio.h>#include "VisageRendering.h"#include "VisageFeaturesDetector.h"#include "Common.h"#include "VisageFaceRecognition.h"#include "LicenseString.h"#include "Utils.h"#include <android/log.h>Go to the source code of this file.
Functions | |
| void | Java_com_visagetechnologies_facedetectdemo_DetectorActivity_DetectorInit (JNIEnv *env, jobject obj, jstring appPath, jstring modelName) |
| Method for initializing the detector. More... | |
| void | Java_com_visagetechnologies_facedetectdemo_ImageDetectorView_DetectFeatures (JNIEnv *env, jobject obj, jbyteArray frame, jint width, jint height) |
| Method for passing raw image data to detector and initiating detection of features in it. More... | |
| void | Java_com_visagetechnologies_facedetectdemo_DetectorRenderer_displayResults (JNIEnv *env, jobject obj, jint width, jint height) |
| Method for displaying detection results. More... | |
| void | Java_com_visagetechnologies_facedetectdemo_DetectorActivity_CleanUp (JNIEnv *env, jobject obj) |
| Method for cleaning up resources used by application. | |
Implementation of simple interface around visage|SDK VisageFeaturesDetector 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 VisageFeaturesDetectorWrapper.cpp.
| void Java_com_visagetechnologies_facedetectdemo_DetectorActivity_DetectorInit | ( | JNIEnv * | env, |
| jobject | obj, | ||
| jstring | appPath, | ||
| jstring | modelName | ||
| ) |
Method for initializing the detector.
This method creates a new VisageFeaturesDetector object and initializes it.
| appPath | path to root folder where Android application data is stored |
| modelName | name of generic Active Appearance Model file used for detection |
Definition at line 62 of file VisageFeaturesDetectorWrapper.cpp.
| void Java_com_visagetechnologies_facedetectdemo_DetectorRenderer_displayResults | ( | JNIEnv * | env, |
| jobject | obj, | ||
| jint | width, | ||
| jint | height | ||
| ) |
Method for displaying detection results.
| width | width of the viewport |
| height | height of the viewport |
Definition at line 125 of file VisageFeaturesDetectorWrapper.cpp.
References glHeight, glWidth, VsImage::height, VisageSDK::VisageRendering::SetFontTexture(), videoAspect, and VsImage::width.
| void Java_com_visagetechnologies_facedetectdemo_ImageDetectorView_DetectFeatures | ( | JNIEnv * | env, |
| jobject | obj, | ||
| jbyteArray | frame, | ||
| jint | width, | ||
| jint | height | ||
| ) |
Method for passing raw image data to detector and initiating detection of features in it.
Detection results are returned through FDP object. By calling static method DrawFDP of Common class detection results are drawn directly on top of image used for detection.
| frame | raw image data of image used for detection. |
| width | width of image used for detection. |
| height | height of image used for detection. |
Definition at line 98 of file VisageFeaturesDetectorWrapper.cpp.
References VsImage::imageData, and VsImage::imageSize.
1.8.13