gdlg / simple-waymo-open-dataset-reader

Simple Waymo Open Dataset Reader
Apache License 2.0
120 stars 20 forks source link

what does axes_transformation mean? #10

Open Phoebe-ovo opened 4 years ago

Phoebe-ovo commented 4 years ago

https://github.com/gdlg/simple-waymo-open-dataset-reader/blob/master/simple_waymo_open_dataset_reader/utils.py#L174 I want to know want dose this axes_transformation mean the vehicle coordinate and the camera coordinate is the same, why should we transform the axes?

gdlg commented 4 years ago

This is to transform to image space. According to the Waymo data description: “The origin of this frame is set to the vehicle position when the vehicle starts. It is an ‘East-North-Up’ coordinate frame. ‘Up(z)’ is aligned with the gravity vector, positive upwards. ‘East(x)’ points directly east along the line of latitude. ‘North(y)’ points towards the north pole.” however image space uses a Right-Down-Forward coordinate frame by convention. This matrix converts between the two.

Phoebe-ovo commented 4 years ago

I think the transformation is like this: vehicle space -> camera space -> image space we use inv(extrinsic) to transform the vehicle frame to camera frame then we use intrinsic to transform the camera frame to image frame from the paper image we can see the vehicle coordinate system is consistent with the camera coordinate system so I think we don't need the axes_transformation

gdlg commented 4 years ago

Thanks for the figure. If you look at the camera frame shown in the figure, it’s front,left,up. I think that it’s a little bit unusual to choose this space for a camera.

The conventional image space is right,down,front. Since the camera frame doesn’t match this, we have to convert between the two.

The intrinsic matrix (the variable camera_model) in this function does the perspective projection but not the coordinate frame change.