# Class VisionOptions

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

public final class VisionOptions extends Object
Common analyzer configuration. An analyzer captures the supplied options when constructed; reuse it for frames needing the same backend, confidence threshold, and result limit.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VisionOptions()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `VisionOptions`
  `backend(VisionBackend value)`
  `VisionBackend`
  `getBackend()`
  `int`
  `getMaximumResults()`
  `float`
  `getMinimumConfidence()`
  `VisionOptions`
  `maximumResults(int value)`
  Sets a non-negative result limit; zero means backend default/unlimited.
  `VisionOptions`
  `minimumConfidence(float value)`
  Sets the confidence threshold, clamped to 0..1.

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### VisionOptions

    public VisionOptions()

- ## Method Details

  - ### backend

    public VisionOptions backend(VisionBackend value)
    Parameters:
      `value` - selector, or `null` to restore automatic selection
    Returns:
      this options object

  - ### minimumConfidence

    public VisionOptions minimumConfidence(float value)
    Sets the confidence threshold, clamped to 0..1. NaN has no meaningful ordering and is rejected instead of being passed to platform detectors.
    Parameters:
      `value` - requested threshold
    Returns:
      this options object
    Throws:
      `IllegalArgumentException` - if `value` is NaN

  - ### maximumResults

    public VisionOptions maximumResults(int value)
    Sets a non-negative result limit; zero means backend default/unlimited.
    Parameters:
      `value` - requested limit
    Returns:
      this options object

  - ### getBackend

    public VisionBackend getBackend()
    Returns:
      selected backend, never `null`

  - ### getMinimumConfidence

    public float getMinimumConfidence()
    Returns:
      confidence threshold in the range 0..1

  - ### getMaximumResults

    public int getMaximumResults()
    Returns:
      non-negative result limit; zero means backend default/unlimited