Hi all ,

I see all this options of Auto focus mode in the documentation.

OFF

AUTO

MACRO

CONTINUOUS_VIDEO

CONTINUOUS_PICTURE

EDOF

Is there a description for each option ? because I cannot find it in the documentation.

Thank you

    6 months later

    martin181818 Is there a description for each option ?

    I cannot find as well, so I'm going to propose some with correction and clarification needed:

    https://docs.luxonis.com/projects/api/en/latest/components/messages/camera_control/#cameracontrol:~:text=name-,class,AutoFocusMode,-Members%3A

    classAutoFocusMode
    Members:

    OFF: Terminates auto focus operation at the current focus position

    AUTO: Attempts to achieve best focus once then locks focus?

    MACRO: Sets lens focus at closest distance possible for device

    CONTINUOUS_VIDEO: Continuously adjusts focus with smooth transitions of focus distance

    CONTINUOUS_PICTURE: Continuously adjusts focus aggressively to current distance.

    EDOF: Digital deblur is applied, at the current focus distance? to extend depth of field

    Use cases:

    • Default: setAutoFocusMode(CONTINUOUS_VIDEO)
    • Constant Distance From Camera:
      • setAutoFocusMode(AUTO) followed by setAutoFocusMode(OFF)
    • Faster auto focusing:
      • setAutoFocusMode(CONTINUOUS_PICTURE)
    • Scene with greatly varied distances:
      • setAutoFocusMode(Auto), followed by setAutoFocusMode(EDOF)
    • Desire full control of focus distance:
      • setManualFocus(0..255)
    • Desire to give hint to auto focus:
      • setAutoFocusRange(infinityPosition=0..255, macroPosition=0.255)
        Requires: infinityPosition > macroPosition

    Q: The Android docs refer to an autoFocus callback to check if autofocus is complete. Is there such animal for Oak-D-Lite?

    Would love to see sample code for these use cases.

      Hi cycob
      Thanks for the research, this is from the header file for camera control:

      enum class AutoFocusMode : uint8_t {
              /**
               * Autofocus disabled. Suitable for manual focus
               */
              OFF = 0,
              /**
               * Basic automatic focus mode. In this mode, the lens does not move unless the autofocus trigger action is called.
               */
              AUTO,
              /**
               * Close-up focusing mode - this mode is optimized for focusing on objects very close to the camera.
               */
              MACRO,
              /**
               * In this mode, the AF algorithm modifies the lens position continually to attempt to provide a constantly-in-focus image stream.
               * The focusing behavior should be suitable for good quality video recording; typically this means slower focus movement and no overshoots.
               */
              CONTINUOUS_VIDEO,
              /**
               * In this mode, the AF algorithm modifies the lens position continually to attempt to provide a constantly-in-focus image stream.
               * The focusing behavior should be suitable for still image capture; typically this means focusing as fast as possible
               */
              CONTINUOUS_PICTURE,
              /**
               * Extended depth of field (digital focus) mode. The camera device will produce images with an extended depth of field automatically.
               * AF triggers are ignored.
               */
              EDOF,

      cycob Q: The Android docs refer to an autoFocus callback to check if autofocus is complete. Is there such animal for Oak-D-Lite?

      No builtin feature currently, but you could poll the lens position to find out when it stopped.

      Thanks,
      Jaka

        jakaskerl autofocus trigger action is called.

        The depthai API is going to take me a lifetime to get comfortable I know how to get the best performance in every circumstance my robot may encounter.