• DepthAI
  • Using custom manual focus with RGB-Depth align

Hello!
We have an OAK-D setup and we're using the RGB-Depth alignment feature. In the online example, it says

# For now, RGB needs fixed focus to properly align with depth.
# This value was used during calibration
camRgb.initialControl.setManualFocus(130)

Turns out for our setup (camera is 2-3m from region of interest) this manual focus value leads to a fairly blurry image while auto focus is much much better.

The comment above implies that it could be possible to use a manual focus value other than 130. Do you have any advice on how to do this? Is this something that will be worked on relatively soon? I couldn't find any information, so anything would be helpful 😀

Thanks for all your help and hard work! We appreciate it.

a month later

Oh sorry we missed this. You can do other focus distances, including autofocus. The RGB-depth alignment may just not be quite as well aligned.

I'd recommend giving this a shot and see how it works out. I suspect it will be fine. If it isn't fine, then I'd recommend re-calibrating at the focal distance of interest, using a large Charuco board.

But I think it will just work.

Thoughts?

Thanks,
Brandon

Thanks a lot Brandon!
I confirm that we did try with other focus values and autofocus, and things seemed to be working. In my tests, RGB-depth seemed to align fine (and the image quality was great), but since I wasn't sure what was happening under the hood I was still concerned.

But overall it works on my end too, which matches your expectation!! Thanks again.