• DepthAI-v2
  • SDK: Stereo config options not being applied

Hello, I am working with the SDK to do some stereo video work with my OAK-D PRO. I saw in the Stereo Component Documentation that you can use the SDK to configure the stereo camera similar to using the API directly. However, the configs I am setting don't seem to be making any changes:

For example, I have this block of code that should set the stereo camera to extended disparity with LR checking and set the IR projection to 1000, but the IR still sets itself to the default 800 and neither extended nor LR checking are enabled:

with OakCamera() as oak:
color = oak.camera('color')
stereo = oak.stereo('800p', fps=60)
stereo.config_stereo(extended=True, lr_check=True)
stereo.set_ir(dot_projector_brightness=1000)
oak.visualize([stereo], fps=True, callback=cb)
oak.start(blocking=True)

I'm sure I'm just making a simple mistake but some help would be appreciated, thank you

    Hi WestwardWinds
    Your code is weird, perhaps you are using an older version of depthai_sdk?
    I checked on my side by changing oak.camera with oak.create_camera and the same was done for stereo. I can clearly see a difference in IR projector brightness as well as lr_check and extended.

    Thoughts?
    Jaka

      jakaskerl Thanks for taking a look at this.

      I am using the current version of depthai-sdk, 1.12.1, and the current version of depthai, 2.22.00. I switched over to using oak.camera() instead of oak.create_camera because I saw that it was deprecated.

      In an irritating development, everything is working today with no changes. I went into my code and changed everything over to create camera and I could see an obvious difference in the IR projector brightness and other configs. The console still says Setting IR laser dot projector brightness to 800mA but I suppose that is just initializing the camera at 800mA and then later changing it to my input.

      Then I changed create camera back to just camera() and it is still all working so who knows!

      Sorry if my code looks weird, this is actually my first big coding project and I just switched over to using the SDK instead of the API so I'm kind of flying blind on best practices!

      Thanks again for checking it out for me

        Hi WestwardWinds
        Oh, didn't realize the new sdk dropped with these changes. :0
        Yes the 800mA always gets displayed regardless if you set it manually. Guess it's a feature not a bug.

        Thanks,
        Jaka