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

Inconsistent Camera Calibration Parameter #671

Open
2 tasks done
Willyzw opened this issue Jan 9, 2025 · 0 comments
Open
2 tasks done

Inconsistent Camera Calibration Parameter #671

Willyzw opened this issue Jan 9, 2025 · 0 comments

Comments

@Willyzw
Copy link

Willyzw commented Jan 9, 2025

Preliminary Checks

  • This issue is not a duplicate. Before opening a new issue, please search existing issues.
  • This issue is not a question, feature request, or anything other than a bug report directly related to this project.

Description

I am using a ZED 2 stereo camera and have recorded a SVO file. When I replay the data using ZED_Explorer, it displays a set of camera parameters as follows:
Screenshot from 2025-01-09 15-10-40
However, when I query the camera parameters using the Python API, the values are different.
Screenshot from 2025-01-09 15-12-58
This difference has left me unsure which camera parameter set I should use. Additionally, I use the command zed.retrieve_measure(depth_image, sl.MEASURE.DEPTH) to retrieve the depth image. I observed the retrieved depth image is aligned with the left image. But I would like to clarify which camera parameters I should use for processing the depth image with or wihout distortion parameters.

Steps to Reproduce

  1. Record a SVO file
  2. Run ZED_Explorer -> select the recorded SVO file -> settings -> calibration
  3. Run python API
    init_params = sl.InitParameters()
    init_params.set_from_svo_file(svo_input_path)
    init_params.svo_real_time_mode = False  # Don't convert in realtime
    init_params.coordinate_units = sl.UNIT.MILLIMETER  # Use milliliter units (for depth measurements)
    init_params.depth_mode = sl.DEPTH_MODE.NEURAL
    zed = sl.Camera()
    zed.open(init_params)
    calibration_params = zed.get_camera_information().camera_configuration.calibration_parameters
    focal_left_x = calibration_params.left_cam.fx
    focal_left_y = calibration_params.left_cam.fy
    center_x = calibration_params.left_cam.cx
    center_y = calibration_params.left_cam.cy
    focal_right_x = calibration_params.right_cam.fx
    focal_right_y = calibration_params.right_cam.fy
    center_right_x = calibration_params.right_cam.cx
    center_right_y = calibration_params.right_cam.cy
    k1 = calibration_params.left_cam.disto
    k1_right = calibration_params.right_cam.disto
    print("Calibration parameters of the left camera: ", focal_left_x, focal_left_y, center_x, center_y)
    print("Calibration parameters of the right camera: ", focal_right_x, focal_right_y, center_right_x, center_right_y)
    print("Radial distortion coefficient of the left camera: ", k1)
    print("Radial distortion coefficient of the right camera: ", k1_right)
    

...


### Expected Result

same camera calibration parameter

### Actual Result

different camera calibration parameter as attached screen shots

### ZED Camera model

ZED

### Environment

```shell
Ubuntu 22.04
ZED SDK 4.2.1 
Nvidia 4090 CUDA 11.8

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant