Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous camera controls, IMX582/IMX586 on-sensor HDR #986

Merged
merged 14 commits into from
Sep 23, 2024

Conversation

alex-luxonis
Copy link
Collaborator

Related: luxonis/depthai-core#972 (see for a detailed description)

utilities/cam_test.py: new option

  -misc MISC_CONTROLS [MISC_CONTROLS ...], --misc-controls MISC_CONTROLS [MISC_CONTROLS ...]
                       List of miscellaneous camera controls to set initially, as pairs:
                       key1=value1 key2=value2 ...

For example to enable HDR on IMX582 (OAK-1-MAX):

python3 utilities/cam_test.py -cams rgb,c -rs -cres 12mp -fps 10 -misc hdr-exposure-ratio=4
  • R key to select HDR exposure ratio, then adjust with -_ and +=
  • G key to select HDR local tone weight, then adjust with -_ and +=
  • H key to toggle HCG (high conversion gain) mode on/off on IMX462 or IMX678

(when testing HDR, it's also suggested for now to set manual exposure, I O K L)

.initialControl.setMisc("downsampling-mode", "binning")  # default: "scaling"
.initialControl.setMisc("binning-mode", "sum")  # default: "avg"

Max FPS for IMX378 1080p back to 118 (from 60) with binning enabled
…misc control:

.initialControl.setMisc("manual-exposure-handling", "fast")
…DR, with:

.initialControl.setMisc("hdr-exposure-ratio", 4) # enables HDR when set `> 1`, current options: 2, 4, 8
.initialControl.setMisc("hdr-local-tone-weight", 75) # default 75, range 0..100
… enabled by default. Values: 0, 1, can also change during streaming, `H` key with cam_test.py
- better config for 10fps HDR
- runtime configurable hdr-exposure-ratio (1,2,4,8), hdr-local-tone-weight (0..1, float normalized)
cam_test.py `R` and `G` keys to select HDR controls, then change with `-_` `+=`
```
cam["cama"].initialControl.setMisc("3a-follow", dai.CameraBoardSocket.CAM_A)
cam["camb"].initialControl.setMisc("3a-follow", dai.CameraBoardSocket.CAM_B)
```

generic fast manual exposure (for all sensors)
@alex-luxonis alex-luxonis requested a review from moratom August 26, 2024 12:08
@dk-teknologisk-bgd
Copy link

what is the plan for this merge request / HDR functionality? I purchased the oak-1 max specifically for the HDR functionality, so I am disappointed to learn that this has not yet (~8 months later) been added to main branch

Copy link
Collaborator

@moratom moratom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM!

Copy link
Collaborator

@moratom moratom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alex-luxonis alex-luxonis merged commit ba0e78b into develop Sep 23, 2024
@alex-luxonis alex-luxonis deleted the camera_controls_misc branch September 23, 2024 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants