|
visageSDK
|
Derives from TrackerView. More...
Public Member Functions | |
| void | surfaceCreated (SurfaceHolder holder) |
| Implementation of surfaceCreated method provided by SurfaceHolder.Callback class. More... | |
| void | surfaceChanged (SurfaceHolder holder, int format, int width, int height) |
| Implementation of surfaceChanged method provided by SurfaceHolder.Callback class. More... | |
| void | surfaceDestroyed (SurfaceHolder holder) |
| Implementation of surfaceDestroyed method provided by SurfaceHolder.Callback class. | |
| int | getBitmapWidth () |
| Called to obtain width of bitmap used for tracking. More... | |
| int | getBitmapHeight () |
| Called to obtain height of bitmap used for tracking. More... | |
| Bitmap | SetOptimalBitmapSize (Bitmap bitmap) |
| Utility method used to resize bitmap of image used for tracking. More... | |
| byte [] | ConvertToByte (Bitmap bitmap, boolean opacity) |
| Utility method called to obtain raw pixel data from bitmap object in which image used for detection is loaded. More... | |
| void | CreateGallery () throws IOException |
| Method used to create face recognition gallery from set of images. More... | |
| void | run () |
| Implementation of run method of Runnable interface. More... | |
Public Member Functions inherited from com.visagetechnologies.facedetectdemo.DetectorView | |
| void | setGLView (DetectorGLSurfaceView tview) |
| Called to set GLSurfaceView used for rendering with OpenGL. More... | |
Static Public Member Functions | |
| static Bitmap | LoadFromFile (Activity activity, Uri uri) throws IOException |
| Utility method called for loading the image from file into a Bitmap object. More... | |
| static native void | DetectFeatures (byte[] frame, int width, int height) |
| Interface to native method used for passing raw pixel data to detector. More... | |
Derives from TrackerView.
Class ImageTrackerView is used for providing detector with necessary image data and controlling surface used to display results of detection. Implements Runnable interface provided by Android. Runnable interface is used for implementation of simple multi-threading.
Definition at line 28 of file ImageDetectorView.java.
|
inline |
Utility method called to obtain raw pixel data from bitmap object in which image used for detection is loaded.
Pixel data is obtained as array of integers by calling getPixels method of Bitmap class. Each element of obtained array of integer represents one pixel of bitmap. In order to create pixel data usable by tracker it is necessary to extract red, green and blue color values from array of integers and store it as a byte array.
| bitmap | bitmap image from which pixel data will be obtained |
| opacity | opacity flag indicating if image is transparent |
Definition at line 267 of file ImageDetectorView.java.
Referenced by com.visagetechnologies.facedetectdemo.ImageDetectorView.CreateGallery(), and com.visagetechnologies.facedetectdemo.ImageDetectorView.surfaceCreated().
|
inline |
Method used to create face recognition gallery from set of images.
Path to directory where images are located is defined in pathToGallery. For each image that is loaded and converted to pixel data, JNI method AddToGallery is called.
Definition at line 305 of file ImageDetectorView.java.
References com.visagetechnologies.facedetectdemo.ImageDetectorView.ConvertToByte(), com.visagetechnologies.facedetectdemo.ImageDetectorView.LoadFromFile(), and com.visagetechnologies.facedetectdemo.ImageDetectorView.SetOptimalBitmapSize().
Referenced by com.visagetechnologies.facedetectdemo.ImageDetectorView.surfaceCreated().
|
static |
Interface to native method used for passing raw pixel data to detector.
Called from surfaceCreated.
| frame | raw pixel data of image used for tracking. |
| width | width of image used for tracking. |
| height | height of image used for tracking. |
Referenced by com.visagetechnologies.facedetectdemo.ImageDetectorView.run(), and com.visagetechnologies.facedetectdemo.ImageDetectorView.surfaceCreated().
|
inline |
Called to obtain height of bitmap used for tracking.
Definition at line 123 of file ImageDetectorView.java.
|
inline |
Called to obtain width of bitmap used for tracking.
Definition at line 114 of file ImageDetectorView.java.
|
inlinestatic |
Utility method called for loading the image from file into a Bitmap object.
Definition at line 243 of file ImageDetectorView.java.
Referenced by com.visagetechnologies.facedetectdemo.ImageDetectorView.CreateGallery().
|
inline |
Implementation of run method of Runnable interface.
Android requires that all rendering to a surface is done from separate thread than the one which created the View object. Rendering thread is started from surfaceCreated method. Method calls rendering logic of application.
Definition at line 322 of file ImageDetectorView.java.
References com.visagetechnologies.facedetectdemo.ImageDetectorView.DetectFeatures().
|
inline |
Utility method used to resize bitmap of image used for tracking.
Images that are larger than the screen are resized to fit the screen while keeping the initial ratio between height and width. In order to interpret images in a correct way OpenCV requires image size to be power of two. Images that have either width or height value that does not satisfy this condition are additionally resized until they do. This slightly changes ratio between width and height.
Definition at line 133 of file ImageDetectorView.java.
Referenced by com.visagetechnologies.facedetectdemo.ImageDetectorView.CreateGallery(), and com.visagetechnologies.facedetectdemo.ImageDetectorView.surfaceCreated().
|
inline |
Implementation of surfaceChanged method provided by SurfaceHolder.Callback class.
Sets new width and height values of view.
Definition at line 95 of file ImageDetectorView.java.
|
inline |
Implementation of surfaceCreated method provided by SurfaceHolder.Callback class.
Creates and starts rendering thread. Calls DetectFeatures method to pass image data to detector.
Definition at line 74 of file ImageDetectorView.java.
References com.visagetechnologies.facedetectdemo.ImageDetectorView.ConvertToByte(), com.visagetechnologies.facedetectdemo.ImageDetectorView.CreateGallery(), com.visagetechnologies.facedetectdemo.ImageDetectorView.DetectFeatures(), and com.visagetechnologies.facedetectdemo.ImageDetectorView.SetOptimalBitmapSize().
1.8.13