-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
41 lines (36 loc) · 992 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from vis_image import vis_image
from vis_points import vis_points
from views import *
import cv2
# define frame name and get path for each file
frame = '000032'
img_path = 'data/' + frame + '.png'
pts_path = 'data/' + frame + '.bin'
calib_path = 'data/' + frame + '_calib.txt'
label_path = 'data/' + frame + '_label.txt'
# define output path for image visualisation and create image
output_path = "output/vis_image.png"
img = vis_image(
output_path,
img_path,
pts_path,
calib_path,
label_path,
lidar=False,
boxes_2d=False,
boxes_3d=True
)
cv2.imwrite(output_path, img)
print("Saved img:", output_path)
# define output path for points visualisation and create image
output_path = "output/vis_points.png"
img = vis_points(
output_path,
pts_path,
label_path,
calib_path,
boxes_3d=True,
view_dict=TPV # TPV(third person view), FPV(first person view), BEV(birds eye view)
)
cv2.imwrite(output_path, img)
print("Saved img:", output_path)