# Class VisionBackends

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

public final class VisionBackends extends Object

Vision backend selectors. `auto()` chooses Apple Vision on iOS and ML Kit on Android. Feature-specific ML Kit methods are separate so one selector never adds unrelated OCR, barcode, face, pose, labeling, or segmentation pods.

Each ML Kit selector call is also a build-time dependency marker. The methods intentionally return the same runtime backend id but must remain distinct so the builder can include only the selected feature. Pass the selector that corresponds to the analyzer being constructed; for example, the face-detection selector cannot satisfy a text recognizer and that mismatched analyzer reports unsupported.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static VisionBackend`
  `appleVision()`
  Selects Apple Vision/Core Image without adding a third-party dependency.
  `static VisionBackend`
  `auto()`
  `static VisionBackend`
  `mlKitBarcodeScanning()`
  Selects ML Kit for barcode scanning on iOS.
  `static VisionBackend`
  `mlKitFaceDetection()`
  Selects ML Kit for face detection on iOS.
  `static VisionBackend`
  `mlKitImageLabeling()`
  Selects ML Kit for image labeling on iOS.
  `static VisionBackend`
  `mlKitPoseDetection()`
  Selects ML Kit for pose detection on iOS.
  `static VisionBackend`
  `mlKitSelfieSegmentation()`
  Selects ML Kit for selfie segmentation on iOS.
  `static VisionBackend`
  `mlKitTextRecognition()`
  Selects ML Kit for text recognition on iOS.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### auto

    public static VisionBackend auto()
    Returns:
      the dependency-minimal platform default

  - ### appleVision

    public static VisionBackend appleVision()
    Selects Apple Vision/Core Image without adding a third-party dependency.
    Returns:
      Apple-native backend selector

  - ### mlKitTextRecognition

    public static VisionBackend mlKitTextRecognition()
    Selects ML Kit for text recognition on iOS. Android already uses ML Kit for the automatic backend.
    Returns:
      the ML Kit backend selector

  - ### mlKitBarcodeScanning

    public static VisionBackend mlKitBarcodeScanning()
    Selects ML Kit for barcode scanning on iOS.
    Returns:
      the ML Kit backend selector

  - ### mlKitFaceDetection

    public static VisionBackend mlKitFaceDetection()
    Selects ML Kit for face detection on iOS.
    Returns:
      the ML Kit backend selector

  - ### mlKitImageLabeling

    public static VisionBackend mlKitImageLabeling()
    Selects ML Kit for image labeling on iOS.
    Returns:
      the ML Kit backend selector

  - ### mlKitPoseDetection

    public static VisionBackend mlKitPoseDetection()
    Selects ML Kit for pose detection on iOS.
    Returns:
      the ML Kit backend selector

  - ### mlKitSelfieSegmentation

    public static VisionBackend mlKitSelfieSegmentation()
    Selects ML Kit for selfie segmentation on iOS.
    Returns:
      the ML Kit backend selector