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] {Wrong intrinsic matrix for resized RGB image} #842

Open
AntonioConsiglio opened this issue Nov 10, 2022 · 4 comments
Open

[BUG] {Wrong intrinsic matrix for resized RGB image} #842

AntonioConsiglio opened this issue Nov 10, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@AntonioConsiglio
Copy link

AntonioConsiglio commented Nov 10, 2022

Describe the bug

Wrong intrinsic matrix for resized RGB image. While in version 2.15.0.0 the intrinsic matrix is correct, in version depthai >= 2.17.3.1 the intrinisc matrix is different in that case and it's wrong.

Minimal Reproducible Example

self.device_ = dhai.Device(pipeline,usb2Mode=True)
calibration_info = self.device_.readCalibration()
intrinsic_matrix = calibration_info.getCameraIntrinsics(dhai.CameraBoardSocket.RGB,resizeHeight=480,resizeWidth=640)

Additional context
camera = OAK-D Lite
depthai version tested: 2.15.0.0 (work) - 2.16.0.0 (work) - 2.17.0.0 (work) - 2.17.3.1 (wrong) - 2.18.0.0 (wrong) - 2.19.0.0 (wrong)

@AntonioConsiglio AntonioConsiglio added the bug Something isn't working label Nov 10, 2022
@brmarkus
Copy link

Can you provide sample output of a wrong and a correct version, please?

@AntonioConsiglio
Copy link
Author

right output
image

wrong output
image

@daxoft
Copy link
Contributor

daxoft commented Nov 14, 2022

Hi @AntonioConsiglio sorry for the issue, can you share the output of calibration_dump script? And also check if it's the same for both depthai versions?

@AntonioConsiglio
Copy link
Author

AntonioConsiglio commented Nov 14, 2022

Hello @daxoft,
calibration_dump.zip
Here you can find the json file made using the calibration_dump script. I've checked the user_calibration*.json and the output is the same for both 2.17.0.0 and 2.19.1.0 version.

Looking at the source code, I saw that the method used to request calibration information has changed. A flag was added and also the "calculation" part was changed. For a resize with the same ratio the calculation of the new intrinsic matrix is quite obvious, probably because my ratio does not remain the same as the original this leads to a calculation error.

Thanks.

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