1 package com.visagetechnologies.facedetectdemo;
3 import javax.microedition.khronos.egl.EGLConfig;
4 import javax.microedition.khronos.opengles.GL10;
5 import javax.microedition.khronos.opengles.GL11;
6 import javax.microedition.khronos.opengles.GL11Ext;
8 import android.content.Context;
9 import android.graphics.Bitmap;
10 import android.graphics.Canvas;
11 import android.graphics.Point;
12 import android.graphics.drawable.Drawable;
13 import android.opengl.GLSurfaceView;
14 import android.opengl.GLUtils;
15 import android.view.Display;
16 import android.view.WindowManager;
24 int[] textures =
new int[3];
45 gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);
46 gl.glEnable(GL10.GL_BLEND);
48 gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
68 public void onSurfaceCreated(GL10 gl, EGLConfig config)
70 WindowManager wm = (WindowManager) _context.getSystemService(Context.WINDOW_SERVICE);
71 Display display = wm.getDefaultDisplay();
72 Point size =
new Point();
73 display.getSize(size);
75 gl.glGenTextures(3, textures, 0);
99 System.loadLibrary(
"VisageVision");
100 System.loadLibrary(
"FaceDetectorWrapper");
void onSurfaceChanged(GL10 gl, int width, int height)
Implementation of surfaceChanged method provided by SurfaceHolder.Callback class. ...
native void displayIdentity(int width, int height)
Interface to native method used to draw recognition results.
native void displayResults(int width, int height)
Interface to native method used to draw detection results.
void onDrawFrame(GL10 gl)
Implementation of onDrawFrame method provided by GLSurfaceView.Renderer interface.
TrackerRenderer class provides implementation of rendering functions required for displaying detectio...