We tried to take some images in a greenhouse environment today, but saw that multiple of the oak cameras which use the OV9782 sensor had a purple glare over the rgb image.

We used 2 oak-d-pro cameras with the same pipeline, aimed at the same position, where one output had the glare, and the other was perfectly fine.

We also tested the Oak-d SR ToF, where both rgb sensors had this purple glare.
In normal outdoor or office conditions it looks fine, but deeper into the greenhouse the effect got worse.

It is also not a uniform distributed issue as it gets pinker more towards the edges, and less of a problem in the center of the image. Based on other forumposts, we have the idea that there is something wrong with the IR filtering (or perhaps uv light?). We tried to set the exposure time in different ranges, but this did not effect the glare at all. Any idea what is going on or how to tackle this?

Did another test by using the camtest.py script, and pumping up the IR flood to max while watching with the other camera, and it is clearly an Infra Red issue. Is this somehow solveable with software / settings, or is this a hardware issue?

    Tsjarly Is this somehow solveable with software / settings, or is this a hardware issue?

    HW issue, but can be solved with a custom tuning blob as described here.

    Thanks,
    Jaka

    Hi @jakaskerl

    I tried this, but it breaks both the pipelines for the ToF camera as well as the stereo pair.

    For the ToF I get this output:

    [19443010F12E9B2E00] [1.1] [11.098] [ToF(1)] [error] Unexpected input image size 1280 x 800, maybe connected camera is not ToF?

    and for the stereo:

    [19443010F12E9B2E00] [1.1] [0.811] [system] [critical] Fatal error. Please report to developers. Log: 'PlgSrcCtrl' '87'
    [19443010F12E9B2E00] [1.1] [1720016479.587] [host] [warning] Device crashed, but no crash dump could be extracted.
    Traceback (most recent call last):
      File "record_images.py", line 192, in <module>
        record_images(args)
      File "record_images.py", line 68, in record_images
        input_images = {name: queue.get().getCvFrame() for name, queue in queues.items()}
      File "record_images.py", line 68, in <dictcomp>
        input_images = {name: queue.get().getCvFrame() for name, queue in queues.items()}
    RuntimeError: Communication exception - possible device error/misconfiguration. Original message 'Couldn't read data from stream: 'depth' (X_LINK_ERROR)'

    I also noticed that there was a comment on the blogpost you linked that mentions it only works for rgb cam only usage, which is not our use case unfortunately. Is there a workaround for this to still get the aligned/synced ToF/stereo depth in combination with the custom tuning?

    oh whoops, the ToF error was because the usb one was still plugged in as well, but gave the same error as the stereo one before.

    [14442C1051F939D100] [169.254.1.222] [6.636] [system] [critical] Fatal error. Please report to developers. Log: 'PlgSrcCtrl' '87'
    [14442C1051F939D100] [169.254.1.222] [1720017377.286] [host] [warning] Device crashed, but no crash dump could be extracted.
    Traceback (most recent call last):
      File "/home/jarl/Desktop/VBTI projecten/Depth AI/v2.26/depthai-python/examples/ImageAlign/record_images_with_tof.py", line 306, in <module>
        messageGroup = queue.get()
    RuntimeError: Communication exception - possible device error/misconfiguration. Original message 'Couldn't read data from stream: 'out' (X_LINK_ERROR)'

    Hi @Tsjarly
    No SW workaround unfortunately. Since 9782 has a bandpass at 940nm, the sunlight will disturb it. That is to be expected and can only be resolved by using an IR-CUT filter over sensors. But this will disable the active stereo - you still have TOF which should be enough.

    Thanks,
    Jaka

    6 days later

    Hi @jakaskerl,

    To be clear, the ToF and the stereo are separate devices. and for the stereo, we had 2 devices where one worked fine and the other one showed the glare. Could it be that one of them had the IR-CUT filter installed? And is this something we can install ourselves somehow?

      Tsjarly
      It's possible, depending on the device (and when it was manufactured).

      Tsjarly And is this something we can install ourselves somehow?

      Yep, you can place the IR-CUT filter over the glass. Kinda like it is done for telescopes.

      Thanks,
      Jaka

        jakaskerl

        Do you have any recommendations at hand for a filter that we could use?

        Hi @Tsjarly
        Just get some random IR filter off Amazon, it should do the trick. Never bought one myself so I don't have any recommendations unfortunately.

        Thanks,
        Jaka