public class GKFaces
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
GKFaces.OnCameraCompletionListener
Interface of camera completion results
|
static class |
GKFaces.Template
A Template contains captured facial biometric data.
|
| Constructor and Description |
|---|
GKFaces()
Create a
GKFaces instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
captureImage()
Captures results from the current camera thread when thread is active
No-op when there is no camera capture thread
|
GKFaces.Template |
createTemplateFromBitmap(android.graphics.Bitmap bitmap)
Extract a face
Template from the given Bitmap. |
GKFaces.Template |
createTemplateFromImage(java.io.File file)
Extract a face
Template from the given image File. |
GKFaces.Template |
createTemplateFromStream(java.io.InputStream inputStream)
Retrieve a face
Template from the given InputStream. |
void |
finishCameraCapture()
Cancels the current camera capture thread
No-op when there is no camera capture thread
|
NFaceView |
setFaceCaptureView(android.content.Context context,
android.view.ViewGroup container)
Set up view for face capturing
|
void |
startCapturing(NFaceView faceView,
GKFaces.OnCameraCompletionListener listener)
Start the camera for face capturing
|
public GKFaces.Template createTemplateFromBitmap(android.graphics.Bitmap bitmap)
Template from the given Bitmap.bitmap - a Bitmap image of a face to extractTemplate with facial capture datapublic GKFaces.Template createTemplateFromImage(java.io.File file) throws java.io.IOException
Template from the given image File.file - an image File of a face to extractTemplate with facial capture datajava.io.IOException - when a template fails to be createdpublic GKFaces.Template createTemplateFromStream(java.io.InputStream inputStream) throws java.io.IOException
Template from the given InputStream.inputStream - stream data of a capture TemplateTemplate created from the stream datajava.io.IOException - when the stream could not be read successfullypublic NFaceView setFaceCaptureView(android.content.Context context,
android.view.ViewGroup container)
context - application/activity context.container - ViewGroup where the camera is going to be displayedNFaceViewpublic void startCapturing(NFaceView faceView,
GKFaces.OnCameraCompletionListener listener)
faceView - the View where the camera will be displayedlistener - OnCameraCompletionListener for success/failure responsespublic void captureImage()
public void finishCameraCapture()