Hi Eric,
The stereo camera pair intrinsics and extrinsics are saved to /data/modalai/opencv_stereo_intrinsics.yaml and /data/modalai/opencv_stereo_extrinsics.yaml
We then use the following opencv calls to generate the rectification maps for each left and right image
cv::Mat R1, P1, R2, P2; cv::Mat map11, map12, map21, map22; cv::Mat Q; // Output 4×4 disparity-to-depth mapping matrix, to be used later double alpha = -1; // default scaling, similar to our "zoom" parameter cv::stereoRectify(M1, D1, M2, D2, img_size, R, T, R1, R2, P1, P2, Q, cv::CALIB_ZERO_DISPARITY, alpha, img_size); // make sure this uses CV_32_FC2 map format so we can read it and convert to our own // MCV undistortion map format, map12 and 22 are empty/unused!! cv::initUndistortRectifyMap(M1, D1, R1, P1, img_size, CV_32FC2, map11, map12); cv::initUndistortRectifyMap(M2, D2, R2, P2, img_size, CV_32FC2, map21, map22);Those maps then get converted into a format that can be used by the Qualcomm hardware acceleration blocks for image dewarping, but the fundamental matrices and undistortion coefficients stay the same. I think the above lines is what you are after.
You are correct that the disparity map is centered about the left camera, I believe this is typical in OpenCV land too.
Note that we do not do a precise calibration between the Stereo and Hires Cameras from the factory, depending on how precise you need to alignment to be you may need to use a tool like Kalibr to do that.