Summary: Nested Classes | Ctors | Inherited Methods | [Expand All]
public class

# LargestFaceFocusingProcessor

extends FocusingProcessor<Face>

java.lang.Object
↳ | com.google.android.gms.vision.FocusingProcessor<com.google.android.gms.vision.face.Face>
| ↳ | com.google.android.gms.vision.face.LargestFaceFocusingProcessor

## Class Overview

Face processor that focuses on tracking a single "prominent face", in conjunction with the associated `FaceDetector`. A prominent face is defined as a face which was initially the largest, most central face when tracking began. This face will continue to be tracked as the prominent face for as long as it is visible, even when it is not the largest face.

When the current prominent face is no longer present, another face will be selected as the new prominent face.

If you need to detect multiple faces in addition to the prominent face, you should use `MultiProcessor` instead of this class.

As an optimization, once the prominent face has been identified, the associated detector is instructed to track only that face. This makes face tracking faster.

For example, the code below creates and starts a pipeline that continuously receives preview frames from a camera source for the front facing camera, runs detection on the frames, manages tracking of the most prominent face, and delivers continuous update notifications over time to a developer-defined "FaceTracker" instance.

    detector.setProcessor(
       new LargestFaceFocusingProcessor.Builder(detector, new FaceTracker())
         .build());

     CameraSource cameraSource = new CameraSource.Builder(context, detector)
       .setFacing(CameraSource.CAMERA_FACING_FRONT)
       .setRequestedPreviewSize(320, 240)
       .build()
       .start();

Where "detector" is a `FaceDetector` instance and "FaceTracker" is a `Tracker` callback for receiving notifications on the detected prominent face.

## Summary

Nested Classes
class | LargestFaceFocusingProcessor.Builder | Builder for creating a LargestFaceFocusingProcessor.

Public Constructors
| LargestFaceFocusingProcessor(Detector<Face> detector, Tracker<Face> tracker)

[Expand] Inherited Methods
From class com.google.android.gms.vision.FocusingProcessor
void | release() Notifies the associated tracker that tracking has completed.
abstract int | selectFocus(Detections<Face> detections) Subclasses implement this method to select the item on which to focus.
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
final void | wait()
From interface com.google.android.gms.vision.Detector.Processor
abstract void | receiveDetections(Detections<Face> detections) Called by the detector to deliver detection results to the processor.
abstract void | release() Shuts down and releases associated processor resources.

## Public Constructors

#### public LargestFaceFocusingProcessor (Detector<Face> detector, Tracker<Face> tracker)