nutonomy / nuscenes-devkit

The devkit of the nuScenes dataset.
https://www.nuScenes.org
Other
2.19k stars 616 forks source link

Are calibration parameters similar for all frames in the same scene? #1041

Closed JohnPekl closed 3 months ago

JohnPekl commented 4 months ago

I tried to calculate the projection matrix in this issue and noticed that the projection matrices in the same scene of different frames are not equal.

For example

'scene-0003', frame 0, camera CAM_BACK projection matrix is

[[-732.5902073366702, 897.6387487524756, -0.14829924916570064, -640554.0590578138], 
  [-497.3264878965934, 39.04146839452271, -798.8061025305894, 89736.95143123713], 
  [-0.9933686907564276, 0.11306387908653805, 0.020861530882568806, 144.50009908738997]]

'scene-0003', frame 1, camera CAM_BACK projection matrix is

[[-729.9443561575806, 899.7915638330295, -0.36838671430345143, -643214.3026841121], 
[-496.782358403863, 40.656381088073275, -799.064082732787, 88106.82138197563], 
[-0.9930425548120105, 0.1159838498849635, 0.02035266317458327, 141.7143836607919]]

I use the following parameters to calculate the projection matrix.

cs_record = nusc.get('calibrated_sensor', cam_front_data['calibrated_sensor_token'])
pose_record = nusc.get('ego_pose', cam_front_data['ego_pose_token'])

pose_record['translation']
pose_record['rotation']
cs_record['translation'])
cs_record['rotation']
cs_record['camera_intrinsic']

Are these calibration parameters (_pose translation, pose rotation, cs translation, cs rotation, cameraintrinsic) similar for all frames in the same scene?

Frame Index 0,

0 pose_record['translation'] [249.89736184222724, 917.5520072342415, 0.0]
0 pose_record['rotation'] [0.9984331635420973, -0.008647395174029798, 0.002563918547139692, -0.055225599296953864]
0 cs_record['translation'] [0.0283260309358, 0.00345136761476, 1.57910346144]
0 cs_record['rotation'] [0.5037872666382278, -0.49740249788611096, -0.4941850223835201, 0.5045496097725578]
0 cs_record['camera_intrinsic'] [[809.2209905677063, 0.0, 829.2196003259838], [0.0, 809.2209905677063, 481.77842384512485], [0.0, 0.0, 1.0]]

Frame Index 1,

1 pose_record['translation'] [249.87296599804552, 917.5585920811261, 0.0]
1 pose_record['rotation'] [0.9983522585573139, -0.008534105965300472, 0.0023151866260605475, -0.05669723784956027]
1 cs_record['translation'] [0.0283260309358, 0.00345136761476, 1.57910346144]
1 cs_record['rotation'] [0.5037872666382278, -0.49740249788611096, -0.4941850223835201, 0.5045496097725578]
1 cs_record['camera_intrinsic'] [[809.2209905677063, 0.0, 829.2196003259838], [0.0, 809.2209905677063, 481.77842384512485], [0.0, 0.0, 1.0]]

After a quick check above (_cs translation, cs rotation, camera_intrinsic) seem to be identical across frames in the same scene while (pose translation, pose rotation_) are different, Do you know the reason?

whyekit-motional commented 3 months ago

@JohnPekl it seems to make sense that the translation of the cameras wrt the ego, rotation of the cameras wrt the ego and camera intrinsics are identical across frames in the same scene since the ego setup is constant throughout a given scene

On the other hand, the translation and rotation of the ego pose would change across the scene if the ego is moving