Skip to content

Commit

Permalink
Save one inverse call in building transformation matrix (commaai#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
dek3rr authored and emmertex committed Oct 23, 2018
1 parent 305f218 commit 6efd33f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions common/transformations/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,8 @@ def get_model_height_transform(camera_frame_from_road_frame, height):
[0, 0, 1],
]))

ground_from_camera_frame = np.linalg.inv(camera_frame_from_road_ground)

low_camera_from_high_camera = np.dot(camera_frame_from_road_high, ground_from_camera_frame)
high_camera_from_low_camera = np.linalg.inv(low_camera_from_high_camera)
road_high_from_camera_frame = np.linalg.inv(camera_frame_from_road_high)
high_camera_from_low_camera = np.dot(camera_frame_from_road_ground, road_high_from_camera_frame)

return high_camera_from_low_camera

Expand Down

0 comments on commit 6efd33f

Please sign in to comment.