Skip to content

Commit 201714b

Browse files
improved accuracy matrices
1 parent 096c28c commit 201714b

2 files changed

Lines changed: 15 additions & 12 deletions

File tree

GEMstack/offboard/calibration/lidar_to_camera.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import numpy as np
22

3-
T_lidar_vehicle = np.array([[ 0.99939639, 0.02547917, 0.023615, 1.1 ],
4-
[-0.02530848, 0.99965156, -0.00749882, 0.03773583],
5-
[-0.02379784, 0.00689664, 0.999693, 1.95320223],
6-
[ 0., 0., 0., 1. ]])
3+
T_camera_vehicle = np.array([[ 0.00349517, -0.03239524, 0.99946903, 1.75864913],
4+
[-0.99996547, 0.00742285, 0.0037375, 0.01238124],
5+
[-0.00753999, -0.99944757, -0.03236817, 1.54408419],
6+
[0,0,0,1]])
77

8-
T_camera_vehicle = np.array([[-0.025131, -0.0304479, 0.99922038, 1.78251567],
9-
[-0.99892897, 0.0396095, -0.0239167, 0.18649424],
10-
[-0.0388504, -0.99875123, -0.03141071, 1.5399846 ],
11-
[ 0., 0., 0., 1. ]])
8+
T_lidar_vehicle = np.array([[ 0.99941328, 0.02547416, 0.02289458, 1.1],
9+
[-0.02530855, 0.99965159, -0.00749488, 0.03773044170906172],
10+
[-0.02307753, 0.00691106, 0.99970979, 1.9525244316515322],
11+
[0,0,0,1]])
1212

1313
# Invert Camera->Vehicle transformation
1414
T_vehicle_camera = np.linalg.inv(T_camera_vehicle)

GEMstack/offboard/calibration/test_transforms.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@
1111
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) # Convert BGR to RGB
1212

1313
# Transformation Matrix
14+
import numpy as np
15+
1416
T_lidar_camera = np.array([
15-
[0.001090, -0.999489, -0.031941, 0.149698],
16-
[-0.007664, 0.031932, -0.999461, -0.397813],
17-
[0.999970, 0.001334, -0.007625, -0.691405],
18-
[0.000000, 0.000000, 0.000000, 1.000000]
17+
[ 2.89748006e-02, -9.99580136e-01, 3.68439439e-05, -3.07300513e-02],
18+
[-9.49930618e-03, -3.12215512e-04, -9.99954834e-01, -3.86689354e-01],
19+
[ 9.99534999e-01, 2.89731321e-02, -9.50437214e-03, -6.71425124e-01],
20+
[ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00]
1921
])
2022

23+
2124
# Convert LiDAR points to homogeneous coordinates
2225
num_points = lidar_points.shape[0]
2326
lidar_homogeneous = np.hstack((lidar_points, np.ones((num_points, 1)))) # (N, 4)

0 commit comments

Comments
 (0)