File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change
1
+ from email .mime import image
1
2
import sys
2
3
import numpy as np
3
4
import json
10
11
from threading import Lock , Thread
11
12
from time import sleep
12
13
14
+ import ogl_viewer .viewer as gl
15
+ import cv_viewer .tracking_viewer as cv_viewer
16
+
13
17
14
18
def initialize_camera_params (zed , input_type ):
15
19
init_params = sl .InitParameters (
@@ -123,7 +127,7 @@ def main():
123
127
tmp .unique_object_id = sl .generate_unique_id ()
124
128
tmp .probability = box .conf .item () # what if array is bigger than 1?
125
129
tmp .label = int (box .cls .item ())
126
- tmp .bounding_box_2d = xywh2abcd (box .xywh [0 ], image_net )
130
+ tmp .bounding_box_2d = xywh2abcd (box .xywh [0 ], image_net . shape )
127
131
tmp .is_grounded = True
128
132
objects_in .append (tmp )
129
133
@@ -141,7 +145,7 @@ def main():
141
145
# Draw 3D bounding box
142
146
for obj in objects .object_list :
143
147
bbox = obj .bounding_box
144
- if bbox :
148
+ if bbox . any () :
145
149
for i in range (4 ):
146
150
start = (int (bbox [i ][0 ]), int (bbox [i ][1 ]))
147
151
end = (int (bbox [(i + 1 ) % 4 ][0 ]), int (bbox [(i + 1 ) % 4 ][1 ]))
You can’t perform that action at this time.
0 commit comments