I want to convert camera calibration data from one format to another.
The first format (which I have data in) stores both intrinsic and extrinsic info.
Have a look and explain the structure:
“[cam_0]
name = “Camera_000_synchronized”
size = [ 640, 480,]
matrix = [ [ 376.74330923575775, 0.0, 319.5,], [ 0.0, 376.74330923575775, 239.5,], [ 0.0, 0.0, 1.0,],]
distortions = [ -0.29817618932833384, 0.0, 0.0, 0.0, 0.0,]
rotation = [ 0.050469186945933525, -0.11891198185497574, -0.009541225346248,]
translation = [ 0.0, 0.0, 0.0,]
[cam_1]
name = “Camera_001_synchronized”
size = [ 1024, 576,]
matrix = [ [ 727.159718253478, 0.0, 511.5,], [ 0.0, 727.159718253478, 287.5,], [ 0.0, 0.0, 1.0,],]
distortions = [ 0.057761630457236694, 0.0, 0.0, 0.0, 0.0,]
rotation = [ -0.5014967609370493, -0.0170736656488721, 0.06699732860024375,]
translation = [ 228.93383255004622, -1173.912593995495, -116.28887308928773,]
[cam_2]
name = “Camera_002_synchronized”
size = [ 960, 540,]
matrix = [ [ 648.4506250214678, 0.0, 479.5,], [ 0.0, 648.4506250214678, 269.5,], [ 0.0, 0.0, 1.0,],]
distortions = [ 0.07446929253296565, 0.0, 0.0, 0.0, 0.0,]
rotation = [ -0.5235577681885093, -1.6080175387722002, 0.0592917020033214,]
translation = [ 1616.6614211874441, -325.43918075915116, 1829.16321082402,]
[cam_3]
name = “Camera_003_synchronized”
size = [ 1280, 720,]
matrix = [ [ 579.1055346323164, 0.0, 639.5,], [ 0.0, 579.1055346323164, 359.5,], [ 0.0, 0.0, 1.0,],]
distortions = [ 0.09733172801704902, 0.0, 0.0, 0.0, 0.0,]
rotation = [ -0.3667108379897851, 0.45432984850621394, 0.14033998748031082,]
translation = [ -1137.1253640516768, -816.6134726878041, -472.48806997035877,]
[metadata]
charuco_square_size = 50.0
charuco_board_object = “CharucoBoardDefinition(aruco_marker_dict=< cv2.aruco.Dictionary 000001FF49083F30>, number_of_squares_width=7, number_of_squares_height=5, black_square_side_length=1, aruco_marker_length_proportional=0.8)”
path_to_recorded_videos = “C:\Users\Eleana\freemocap_data\recording_sessions\session_2024-01-30_17_05_22\recording_17_23_58_gmt+0_calibration\synchronized_videos”
date_time_calibrated = “2024-01-30T17:25:02”
”