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

[BUG] Failed to calibrate devices with only color cameras #1081

Closed
lincolnxlw opened this issue Jul 13, 2023 · 3 comments
Closed

[BUG] Failed to calibrate devices with only color cameras #1081

lincolnxlw opened this issue Jul 13, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@lincolnxlw
Copy link

Describe the bug
calibrate.py script failed to calibrate boards with only color cameras (OAK-1, OAK-1-Lite) or any custom boards with only rgb cameras defined.

Minimal Reproducible Example
Use the board config for OAK-1-Lite and run the calibration script by python3 calibrate.py -s 2.5 -db -brd /config/OAK-1-LITE.json.json -ih

Expected behavior
Since only color camera available in the device, calibration will only run the rgb calibration for the color camera.

Screenshots
Calibration script expecting stereo_config and get the following log

File "/depthai/calibrate.py", line 699, in capture_images_sync

leftStereo = self.board_config['cameras'][self.board_config['stereo_config']['left_cam']]['name']

KeyError: 'stereo_config'
@lincolnxlw lincolnxlw added the bug Something isn't working label Jul 13, 2023
@lincolnxlw lincolnxlw changed the title [BUG] {Failed to calibrate devices with only color cameras} [BUG] Failed to calibrate devices with only color cameras Jul 13, 2023
@MaticTonin
Copy link
Contributor

MaticTonin commented Jul 13, 2023

Hi.
Yes, I see that the program always assumes that board_config includes stereo calibration even if board does not incluce one.
You can in that case just change the lines as:

if 'stereo_config' in self.board_config['cameras']:
    leftStereo =  self.board_config['cameras'][self.board_config['stereo_config']['left_cam']]['name']
    rightStereo = self.board_config['cameras'][self.board_config['stereo_config']['right_cam']]['name']
    print(f'Left Camera of stereo is {leftStereo} and right Camera of stereo is {rightStereo}')

and try the calibration process again.

@themarpe
Copy link
Collaborator

@MaticTonin please open a PR with this changes such that our calibration procedure gets improved overall

@themarpe
Copy link
Collaborator

@lincolnxlw does that resolve your issue? Feel free to reopen otherwise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants