• Checking whether fixed focus or auto-focus

Hi RyanLee

"hasAutofocus" only means that the camera is capable of automatically adjusting focus. There is to my knowledge no method for reading the autofocus mode of the camera. Setting the mode at start is the easiest way to ensure fixed focus is active (by default, the camera is set to CONTINUOUS_VIDEO).

Hope this helps,
Jaka

    jakaskerl

    Thanks, i got it but how can i check or see it is fixed focus or not?? for example, printed messages or api?? Can we check?

    Best regards,

    Ryan.

      Hi RyanLee
      I'm not entirely sure what you mean.
      If camera is fixed focus, then hasAutofocus will be 0
      If camera is auto focus, then hasAutofocus will be 1
      Whether an auto focus camera is currently in AF or FF mode, you currently cannot check.

      Hope this helps.
      Jaka

        Hi RyanLee,
        Yes, Oak-D color camera is AF, while Oak-D mono cameras are both FF. I believe this confirms my previous posts.

        Regards,
        Jaka

          jakaskerl Thanks Jaka, i was confused. now i got your point. it means only "capable" not acutally working mode. Thanks again.

          Best regards,

          Ryan.

          2 years later

          Currently, i have AF as hasAutofocus is 1. How to enable FF for the color camera. I have oak-d s2 in which default AF.

          Thanks, Liene.

            lienec
            What do you mean enable FF? FF/AF is a hardware capability of the camera.

            Thanks,
            Jaka

            Am I correct that the color camera of oak-d s2 can work in AutoFocus (AF) mode or in FixedFocus mode (FF) ? Currently color camera configruation is the fallowing - [{socket: CAM_A, sensorName: IMX378, width: 4056, height: 3040, orientation: AUTO, supportedTypes: [COLOR], hasAutofocus: 1, hasAutofocusIC: 1, name: color}.

            In my case it is important to work with FF to avoid of motion blur. Can you advise the way to configure that ?

            Thanks

              Thank you, but I already saw these links.

              The reason I need a Fixed focus, is because the camera will be in constant movement and there will be a lot of vibration.

              It seems like auto focus is not recommended is such a case. Therefor using auto focus and manually set the single value is not the best solution, i think.

              Just found a thread that tells the thing. I have a camera S2-AF.

              Thank you for support.