I need to use the result of OpenCV calibration with the ZED sdk, and for that I need to convert the resulting .xml file from the OpenCV calibration to a .conf file (ZED calibration format).
The .conf file is divided in 3 sections: [LEFT_CAM_HD], [RIGHT_CAM_HD] and [STEREO].
The LEFT_CAM_HD and RIGHT_CAM_HD sections contains the intrinsic parameters of the cameras fx, fy, cx, cy, k1, k2, k3, p1, p2. These parameters I was able to get from the Intrinsics and Distortion group of the xml file of the OpenCV calibration for each camera.
However, I’m not sure how to get the parameters from the STEREO section, that contains the extrinsic parameters.
In a ZED .conf file, the [STEREO] block is something like this:
But the extrinsics result of the OpenCV calibration is a 3x4 matrix [R | T] like that:
<CameraMatrix type_id="opencv-matrix"> <rows>3</rows> <cols>4</cols> <dt>d</dt> <data> 9.9997883153235922e-01 7.3748315035248343e-04 -6.4647200852331324e-03 -1.1915658468526300e-01 -7.9486280185082892e-04 9.9996027615040162e-01 -8.8777426375674651e-03 -1.8262554804596392e-03 6.4579160960564009e-03 8.8826932748798451e-03 9.9993969472157707e-01 -2.9897274913539143e-03 </data></CameraMatrix>
I’m not sure how to use this matrix to get the Baseline, TX, TY, TZ, RX_HD, CV_HD and RZ_HD to build my ZED .conf file. I would appreciate some help.