Example usage for android.hardware.camera2 CameraMetadata STATISTICS_FACE_DETECT_MODE_FULL

List of usage examples for android.hardware.camera2 CameraMetadata STATISTICS_FACE_DETECT_MODE_FULL

Introduction

In this page you can find the example usage for android.hardware.camera2 CameraMetadata STATISTICS_FACE_DETECT_MODE_FULL.

Prototype

int STATISTICS_FACE_DETECT_MODE_FULL

To view the source code for android.hardware.camera2 CameraMetadata STATISTICS_FACE_DETECT_MODE_FULL.

Click Source Link

Document

Return all face metadata.

In this mode, face rectangles, scores, landmarks, and face IDs are all valid.

Usage

From source file:com.raulh82vlc.face_detection_sample.camera2.presentation.FDCamera2Presenter.java

private void updatePreview() {
    if (null == cameraDevice) {
        Log.e(TAG, "updatePreview error, return");
    }//from w w  w. ja  v a  2s .c  o m
    captureRequestBuilder.set(CaptureRequest.STATISTICS_FACE_DETECT_MODE,
            CameraMetadata.STATISTICS_FACE_DETECT_MODE_FULL);

    try {
        cameraCaptureSessions.setRepeatingRequest(captureRequestBuilder.build(), captureCallback,
                mainThread.get());
    } catch (CameraAccessException e) {
        e.printStackTrace();
    }
}