• Checking whether fixed focus or auto-focus

Before requesting support, please see: https://docs.luxonis.com/en/latest/pages/support/

Hi,

We are using Fixed focus. when we checked our camera the "hasAutofocus: 1"is showing. Could you share the way of how to check the focus (fixed focus or auto focus) ?? And Can we check whether the camera we tested is fixed or auto focus from below messages?? what "hasAutofocus: 1" is meanging for?


others: {socket: RGB/CENTER/CAM_A, sensorName: IMX378, width: 4056, height: 3040, orientation: AUTO, supportedTypes: [COLOR], hasAutofocus: 1, name: color}, {socket: LEFT/CAM_B, sensorName: OV9282, width: 1280, height: 800, orientation: AUTO, supportedTypes: [MONO], hasAutofocus: 0, name: left}, {socket: RIGHT/CAM_C, sensorName: OV9282, width: 1280, height: 800, orientation: AUTO, supportedTypes: [MONO], hasAutofocus: 0, name: right}


Best regards,

Ryan.

    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.