kitti convert velodyne point to 2d point
def get_2d_pt_from_vel(velo_pt):
vld = velo_pt.T.reshape(4, 1)
pt3d = vld[:, vld[-1, :] > 0].copy()
pt3d[-1, :] = 1
pt3d_cam = R0 @ Tr @ pt3d
mask = pt3d_cam[2, :] >= 0 # Z >= 0
pt2d_cam = P2 @ pt3d_cam[:, mask]
pt2d = (pt2d_cam / pt2d_cam[2, :])[:-1, :].T
return pt2d
velo_pts = np.fromfile(os.path.join(velo_file_location),
dtype=np.float32, count=-1).reshape([-1, 4])
velo_pts = list(velo_pts)
for v in velo_pts:
pt2d = get_2d_pt_from_vel(v)
Are there any code examples left?
New code examples in category Other
-
Other 2023-03-27 22:50:10 how to select the whole line in vscode with keyboard shortcut
-
Other 2022-03-27 22:45:24 income of a web developer
-
Other 2022-03-27 22:35:01 \pyrcc_main.py: File does not exist 'resources.qrc'
-
Other 2022-03-27 22:30:45 rick roll embed code
-
Other 2022-03-27 22:20:08 Circuit_04_Potentiometer
-
Other 2022-03-27 22:20:05 iterative power
-
Other 2022-03-27 22:15:11 flutter run all
-
Other 2022-03-27 22:10:05 when is karlson release
-
Other 2022-03-27 22:10:02 wp .htaccess example
-
Other 2022-03-27 22:00:08 bash pause in file read line by line