In order to form a stereo map, I want to get camera calibration information. However, the calibration program in opencv / samples / cpp is difficult for me to write and operate, so I choose to calibrate the camera in MATLAB, but I don’t know how to convert it into opencv readable XML file. If possible, I also want to know for binocular camera extrinsics.yml (XML) and intrinsics.yml (XML) the format of these two files.
(complete file here)
(you’re free to change the names (“camera_matrix”, “distortion_coefficients”) to whatever you like)
to read it back, use:
FileStorage fs("my.yml", 0);
Mat cm; fs["camera_matrix"] >> cm; // or whatever name you used before
Mat dc; fs["distortion_coefficients"] >> dc;
fs.release();