luxonis / depthai-python

DepthAI Python Library
MIT License
360 stars 193 forks source link

HDR on OAK-1 max #1071

Open dk-teknologisk-bgd opened 2 months ago

dk-teknologisk-bgd commented 2 months ago

I bought the OAK-1 max mainly due to its HDR support. I build this repo from source from the branch "camera_controls_misc", which makes it possible to run:

camRGB.initialControl.setMisc("hdr-exposure-ratio", 4 if hdr else 0)  # enables HDR when set `> 1`, current options: 2, 4, 8
camRGB.initialControl.setMisc("hdr-local-tone-weight", 75)  # default 75, range 0..100

However, I'm pretty sure the HDR is not enabled. The picture looks unchanged. What could be wrong? Do I need to make more modifications to enable HDR in this beta-setup? I am outputting the isp-image like this:

camRGB = pipeline.createColorCamera() camRGB.setResolution(dai.ColorCameraProperties.SensorResolution.THE_5312X6000) camRGB.setFps(targetFps) camRGB.setNumFramesPool(2,2,2,2,2) camRGB.initialControl.setSharpness(0) camRGB.initialControl.setLumaDenoise(0) camRGB.initialControl.setChromaDenoise(4) camRGB.initialControl.setMisc("hdr-exposure-ratio", 4 if hdr else 0) # enables HDR when set > 1, current options: 2, 4, 8 camRGB.initialControl.setMisc("hdr-local-tone-weight", 75) # default 75, range 0..100

xoutVideo = pipeline.create(dai.node.XLinkOut)
xoutVideo.setStreamName("isp")
xoutVideo.input.setBlocking(False)
xoutVideo.input.setQueueSize(1)
camRGB.isp.link(xoutVideo.input)
Erol444 commented 2 months ago

Hi @dk-teknologisk-bgd , could you post images with hdr-exposure-ratio at 0/2/4, just so we can double check?