I am trying to convert bottom centers of camera frame 3d-bounding boxes to ego-vehicle frame. Steps I perform are the following:
- Get center of the box in camera coordinate frame
- Rotate center using
sensor2ego_rotationquaternion and the translate it by
rotation_matrix = pyquaternion.Quaternion(sensor2ego_rotation).rotation_matrix
center = np.dot(rotation_matrix, center)
center += np.array(sensor2ego_translation)
- Take into account box height (size along z axis in ego vehicle frame):
center -= height / 2
Although these steps seem clear and right, resulting z coordinate of the bottom face center never exactly equals zero (as I suppose it should be) and spread around zero with standard deviation about 0.4 m.
I’d like to ask whether is it ok to get such results or am I doing something wrong with my calculations? Thanks in advance.