There aren't any reply, so I guess not everyone is excited about the new Face detection api as I do.
Instead of warping the API, can I take the function out from the sample code from below blog and put it in mine as inline Java? Please kindly show me how it can be done? Thanks!!!!!!
http://www.sitepoint.com/face-detection-in-android-with-google-play-services/
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
InputStream stream = getResources().openRawResource(R.raw.image01);
Bitmap bitmap = BitmapFactory.decodeStream(stream);
FaceDetector detector = new FaceDetector.Builder(getApplicationContext())
.setTrackingEnabled(false)
.build();
// Create a frame from the bitmap and run face detection on the frame.
Frame frame = new Frame.Builder().setBitmap(bitmap).build();
SparseArray<Face> faces = detector.detect(frame);
TextView faceCountView = (TextView) findViewById(R.id.face_count);
faceCountView.setText(faces.size() + " faces detected");
detector.release();
}