# Class FaceDetector

java.lang.Object
com.codename1.ai.vision.FaceDetector

All Implemented Interfaces:
  `VisionAnalyzer<Face[]>, AutoCloseable`

public final class FaceDetector extends Object
Creates reusable on-device face analyzers.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FaceDetector()`
  Creates an analyzer using the platform default backend and options.
  `FaceDetector(VisionOptions options)`
  Creates a reusable analyzer with explicit backend and result options.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final void`
  `close()`
  Idempotently releases the retained native backend.
  `final boolean`
  `isSupported()`
  Tests the exact feature/backend pair configured for this analyzer.
  `final AsyncResource<Face[]>`
  `process(VisionImage image)`
  Starts one analysis using the retained native backend.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### FaceDetector

    public FaceDetector()
    Creates an analyzer using the platform default backend and options.
    See Also:
      - `VisionOptions`

  - ### FaceDetector

    public FaceDetector(VisionOptions options)
    Creates a reusable analyzer with explicit backend and result options.
    Parameters:
      `options` - configuration captured by this analyzer; `null` uses defaults

- ## Method Details

  - ### isSupported

    public final boolean isSupported()
    Description copied from interface: `VisionAnalyzer`
    Tests the exact feature/backend pair configured for this analyzer.
    Specified by:
      `isSupported` in interface `VisionAnalyzer<T>`
    Returns:
      whether this analyzer's feature/backend is available and open

  - ### process

    public final AsyncResource<Face[]> process(VisionImage image)
    Starts one analysis using the retained native backend.
    Specified by:
      `process` in interface `VisionAnalyzer<T>`
    Parameters:
      `image` - immutable encoded or raw input
    Returns:
      asynchronous typed result

  - ### close

    public final void close()
    Idempotently releases the retained native backend.
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `VisionAnalyzer<T>`