Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/blundell/facedetectiontutorialwithpreview

Simple Android front camera face detection with a preview of the camera for the user
https://github.com/blundell/facedetectiontutorialwithpreview

Last synced: 2 months ago
JSON representation

Simple Android front camera face detection with a preview of the camera for the user

Awesome Lists containing this project

README

        

FaceDetectionTutorial
=====================

Explanatory tutorial can be found here: http://blog.blundell-apps.com/tut-front-camera-face-detection-with-preview/

Load your front facing camera like this

`FrontCameraRetriever.retrieveFor(context);`

Add a preview to your activity layout

```java
SurfaceView cameraSurface = new CameraSurfaceView(context, camera, this);
((FrameLayout) findViewById(R.id.helloWorldCameraPreview)).addView(cameraSurface);
```

Listen for face detection like this

```java
@Override
public void onFaceDetected() {

}

@Override
public void onFaceTimedOut() {

}

@Override
public void onFaceDetectionNonRecoverableError() {

}
```