hello. This is my first time using ZED2i.
I’m posting because I have a question.
why is calibration information of ZED2i different from ZED Explorer option and ZED SDK?
attach calibration information below.
calibration information of left cam in ZED explorer option
fx : 1069.8800
fy : 1070.8000
cx : 959.2890
cy : 538.5630
k1 : -1.2089
k2 : 2.4725
p1 : -0.000
p2 : 0.0002
k3 : 0.1334
calibration information of left cam from ZED SDK 4.0
fx = 1078.4971923828125
fy = 1078.4971923828125
cx = 975.4281005859375
cy = 553.989990234375
dist_coeffs = [0. 0. 0. 0.]
*** code ***
def main():
# ZED 카메라 초기화
zed = sl.Camera()
# 카메라 설정
init_params = sl.InitParameters()
init_params.camera_resolution = sl.RESOLUTION.HD1080
init_params.coordinate_units = sl.UNIT.METER
init_params.depth_mode = sl.DEPTH_MODE.ULTRA # Use ULTRA depth mode
# 카메라 열기
err = zed.open(init_params)
if err != sl.ERROR_CODE.SUCCESS:
print(f"Error, unable to open ZED camera: {err}")
zed.close()
return 1
camera_info = zed.get_camera_information().camera_configuration
image_size = camera_info.resolution
image_zed = sl.Mat(image_size.width, image_size.height, sl.MAT_TYPE.U8_C4)
image_ocv_rgb = np.zeros((image_size.height, image_size.width, 3), dtype=np.uint8)
depth_map = sl.Mat(image_size.width, image_size.height, sl.MAT_TYPE.F32_C1)
point_cloud = sl.Mat()
runtime_parameters = sl.RuntimeParameters()
runtime_parameters.enable_fill_mode
calib_info = camera_info.calibration_parameters.left_cam
camera_matrix = np.array([[calib_info.fx, 0, calib_info.cx],
[0, calib_info.fy, calib_info.cy],
[0, 0, 1]])
dist_coeffs = np.array(([calib_info.disto[0], calib_info.disto[1], calib_info.disto[2], calib_info.disto[3]]))
print(f'fx = {calib_info.fx}\n fy = {calib_info.fy}\n cx = {calib_info.cx}\n cy = {calib_info.cy}')
print(f'dist_coeffs = {dist_coeffs}')
and how to extract k1, k2, p1, p2, k3 using ZED SDK?
i have another problem
after recalibation using calibration tool, new calibration information is not loaded from sdk.
*** calib_info from sdk ***
fx: 1075.4091796875 fy:1075.4091796875 cx:974.0137939453125 cy:550.4146118164062
*** New calibration file(*.conf file) ***
[LEFT_CAM_2K]
fx=1067.17
fy=1067.9
cx=1103.66
cy=616.059
k1=-0.0727677727482817
k2=0.06090582313382647
p1=6.853173013136698e-06
p2=0.00022630862399272667
k3=-0.025719463801251986
[LEFT_DISTO]
k1=-1.0724739669803673
k2=2.063610857259505
k4=-0.9770272517285726
p1=-4.2440955301696344e-05
p2=0.00014894736381681939
k3=0.21466864318299017
k5=1.908747868408827
k6=0.36927291391248757
[STEREO]
CV_2K=0.00467358
RX_2K=0.00287806
RZ_2K=0.00180658
CV_FHD=0.00467358
RX_FHD=0.00287806
RZ_FHD=0.00180658
CV_HD=0.00467358
RX_HD=0.00287806
RZ_HD=0.00180658
CV_VGA=0.00467358
RX_VGA=0.00287806
RZ_VGA=0.00180658
Baseline=78.3139
TY=-0.108556
TZ=0.303637
[RIGHT_CAM_2K]
fx=1070.44
fy=1070.97
cx=1122.72
cy=645.024
k1=-0.08494717260955635
k2=0.08475776272606621
p1=0.000274402258628824
p2=7.74611252415663e-05
k3=-0.03854064563583371
[RIGHT_DISTO]
k1=-1.1597190005290574
k2=2.4865111301445793
k4=-1.068043292912125
p1=0.00017130333178831116
p2=4.857966549662027e-05
k3=-0.010621900062602312
k5=2.347031760741172
k6=0.13624010977474146
[LEFT_CAM_FHD]
fx=1067.17
fy=1067.9
cx=959.66
cy=535.059
k1=-0.0727677727482817
k2=0.06090582313382647
p1=6.853173013136698e-06
p2=0.00022630862399272667
k3=-0.025719463801251986
[RIGHT_CAM_FHD]
fx=1070.44
fy=1070.97
cx=978.717
cy=564.024
k1=-0.08494717260955635
k2=0.08475776272606621
p1=0.000274402258628824
p2=7.74611252415663e-05
k3=-0.03854064563583371
[LEFT_CAM_HD]
fx=533.584
fy=533.948
cx=638.33
cy=356.03
k1=-0.0727677727482817
k2=0.06090582313382647
p1=6.853173013136698e-06
p2=0.00022630862399272667
k3=-0.025719463801251986
[RIGHT_CAM_HD]
fx=535.219
fy=535.486
cx=647.859
cy=370.512
k1=-0.08494717260955635
k2=0.08475776272606621
p1=0.000274402258628824
p2=7.74611252415663e-05
k3=-0.03854064563583371
[LEFT_CAM_VGA]
fx=266.792
fy=266.974
cx=334.665
cy=185.515
k1=-0.0727677727482817
k2=0.06090582313382647
p1=6.853173013136698e-06
p2=0.00022630862399272667
k3=-0.025719463801251986
[RIGHT_CAM_VGA]
fx=267.61
fy=267.743
cx=339.429
cy=192.756
k1=-0.08494717260955635
k2=0.08475776272606621
p1=0.000274402258628824
p2=7.74611252415663e-05
k3=-0.03854064563583371
[MISC]
Sensor_ID=0
Hello,
On what platform are you using your camera ?
Can you send a SVO so we can investigate ?
HD1080_SN34091908_09-18-49.svo (1.9 MB)
Here is my SVO (HD1080)
And i try ubuntu 20.04 (originally i test on window10)
but problem is same.
Calib information is different from SDK and Explorer tools in factory state.
Hi,
From your SVO, I get this calibration file from the factory. I did not use ZED Explorer but the website: Download Calibration File
[LEFT_CAM_2K]
fx=1064.07
fy=1064.58
cx=1102.14
cy=621.822
k1=-0.058729
k2=0.0341059
p1=-0.000368328
p2=0.000387867
k3=-0.0135664
[RIGHT_CAM_2K]
fx=1068.15
fy=1068.35
cx=1123.4
cy=650.469
k1=-0.0612634
k2=0.0368029
p1=8.93281e-05
p2=-0.000202741
k3=-0.014291
[LEFT_CAM_FHD]
fx=1064.07
fy=1064.58
cx=958.14
cy=540.822
k1=-0.058729
k2=0.0341059
p1=-0.000368328
p2=0.000387867
k3=-0.0135664
[RIGHT_CAM_FHD]
fx=1068.15
fy=1068.35
cx=979.4
cy=569.469
k1=-0.0612634
k2=0.0368029
p1=8.93281e-05
p2=-0.000202741
k3=-0.014291
[LEFT_CAM_HD]
fx=532.035
fy=532.29
cx=637.57
cy=358.911
k1=-0.058729
k2=0.0341059
p1=-0.000368328
p2=0.000387867
k3=-0.0135664
[RIGHT_CAM_HD]
fx=534.075
fy=534.175
cx=648.2
cy=373.2345
k1=-0.0612634
k2=0.0368029
p1=8.93281e-05
p2=-0.000202741
k3=-0.014291
[LEFT_CAM_VGA]
fx=266.0175
fy=266.145
cx=334.285
cy=186.9555
k1=-0.058729
k2=0.0341059
p1=-0.000368328
p2=0.000387867
k3=-0.0135664
[RIGHT_CAM_VGA]
fx=267.0375
fy=267.0875
cx=339.6
cy=194.11725
k1=-0.0612634
k2=0.0368029
p1=8.93281e-05
p2=-0.000202741
k3=-0.014291
[LEFT_DISTO]
k1=-1.53426
k2=2.68001
k3=0.132874
k4=-1.44452
k5=2.52041
k6=0.303291
p1=-0.000173022
p2=0.000126353
[RIGHT_DISTO]
k1=-1.17448
k2=2.75432
k3=0.0338083
k4=-1.07989
k5=2.61111
k6=0.199011
p1=3.58713e-05
p2=1.31603e-05
[STEREO]
Baseline=119.995
TY=-0.167367
TZ=0.400913
CV_2K=0.00285351
CV_FHD=0.00285351
CV_HD=0.00285351
CV_VGA=0.00285351
RX_2K=0.00241414
RX_FHD=0.00241414
RX_HD=0.00241414
RX_VGA=0.00241414
RZ_2K=0.00186863
RZ_FHD=0.00186863
RZ_HD=0.00186863
RZ_VGA=0.00186863
[MISC]
Sensor_ID=0
As for the results from the SVO, unfortunately I cnnot change its resolution. Can you record it again with HD2K so I can compare the values ?