Open datvuthanh opened 1 year ago
Sorry for late response. I suggest checking whether ego2img_rt
is correct or not. I don't think you can directly take the inverse of the 4x4 transformation matrix. A example should be like
cam2ego_rotation = Quaternion(cs_record['rotation']).rotation_matrix
cam2ego_translation = np.array(cs_record['translation'])
ego2cam_rotation = cam2ego_rotation.T
ego2cam_translation = ego2cam_rotation.dot(-cam2ego_translation)
transform_matrix = np.eye(4) #ego2cam
transform_matrix[:3, :3] = ego2cam_rotation
transform_matrix[:3, 3] = ego2cam_translation
Hi Tsinghua-MARS-Lab,
Thank you for your work. Currently, I want to visualize vector on camera image from nuscenes dataset. This is my pseudo code:
Assume that, i obtained vector points from sample vector line (N,2)
My script code return no valid points, thank you.