|
37 | 37 | GRID_SIZE = 15.0
|
38 | 38 |
|
39 | 39 | CLASS_COLORS = np.array([
|
40 |
| - [44, 117, 255] # People |
41 |
| - , [255, 0, 255] # Vehicle |
42 |
| - , [0, 0, 255] |
| 40 | + [44, 117, 255] # People |
| 41 | + , [255, 0, 255] # Vehicle |
| 42 | + , [0, 0, 255] |
43 | 43 | , [0, 255, 255]
|
44 | 44 | , [0, 255, 0]
|
45 | 45 | , [255, 255, 255]]
|
46 | 46 | , np.float32)
|
47 | 47 |
|
48 | 48 | ID_COLORS = np.array([
|
49 |
| - [0.231, 0.909, 0.69] |
| 49 | + [0.231, 0.909, 0.69] |
50 | 50 | , [0.098, 0.686, 0.816]
|
51 | 51 | , [0.412, 0.4, 0.804]
|
52 | 52 | , [1, 0.725, 0]
|
@@ -253,7 +253,7 @@ def __add_quad(self, _quad_pts, _alpha1, _alpha2, _clr):
|
253 | 253 | self.indices.append(len(self.indices))
|
254 | 254 |
|
255 | 255 | def add_vertical_faces(self, _pts, _clr):
|
256 |
| - # For each face, we need to add 4 quads (the first 2 indexes are always the top points of the quad) |
| 256 | + # For each face, we need to add 4 quads (the first 2 indexes are always the top points of the quad) |
257 | 257 | quads = [[0, 3, 7, 4] # Front face
|
258 | 258 | , [3, 2, 6, 7] # Right face
|
259 | 259 | , [2, 1, 5, 6] # Back face
|
@@ -396,8 +396,8 @@ def draw(self):
|
396 | 396 | layout(location = 0) in vec3 vert;
|
397 | 397 | out vec2 UV;
|
398 | 398 | void main() {
|
399 |
| - UV = (vert.xy+vec2(1,1))/2; |
400 |
| - gl_Position = vec4(vert, 1); |
| 399 | + UV = (vert.xy+vec2(1,1))/2; |
| 400 | + gl_Position = vec4(vert, 1); |
401 | 401 | }
|
402 | 402 | """
|
403 | 403 |
|
@@ -618,13 +618,13 @@ def update_view(self, _image, _objs): # _objs of type sl.Objects
|
618 | 618 |
|
619 | 619 | def create_bbox_rendering(self, _bbox, _bbox_clr):
|
620 | 620 | # First create top and bottom full edges
|
621 |
| - self.BBox_edges.add_full_edges(_bbox, _bbox_clr) |
622 |
| - # Add faded vertical edges |
623 |
| - self.BBox_edges.add_vertical_edges(_bbox, _bbox_clr) |
624 |
| - # Add faces |
625 |
| - self.BBox_faces.add_vertical_faces(_bbox, _bbox_clr) |
626 |
| - # Add top face |
627 |
| - self.BBox_faces.add_top_face(_bbox, _bbox_clr) |
| 621 | + self.BBox_edges.add_full_edges(_bbox, _bbox_clr) |
| 622 | + # Add faded vertical edges |
| 623 | + self.BBox_edges.add_vertical_edges(_bbox, _bbox_clr) |
| 624 | + # Add faces |
| 625 | + self.BBox_faces.add_vertical_faces(_bbox, _bbox_clr) |
| 626 | + # Add top face |
| 627 | + self.BBox_faces.add_top_face(_bbox, _bbox_clr) |
628 | 628 |
|
629 | 629 | def create_id_rendering(self, _center, _clr, _id):
|
630 | 630 | tmp = ObjectClassName()
|
|
0 commit comments