Skip to content

Commit f854391

Browse files
committed
Add font thickness
1 parent c2a371d commit f854391

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

avapi/visualize/base.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def draw_box2d(image, qs, color=(255, 255, 255), thickness=2):
4343

4444

4545
def draw_projected_box3d(
46-
image, qs, color=(255, 255, 255), thickness=2, ID=None, fontscale=1, filled=False
46+
image, qs, color=(255, 255, 255), thickness=2, ID=None, fontscale=1, font_thickness=3, filled=False
4747
):
4848
"""Draw 3d bounding box in image
4949
qs: (8,3) array of vertices for the 3d box in following order:
@@ -120,7 +120,6 @@ def draw_projected_box3d(
120120
edge, np.min(qs[:, 1]) - sep
121121
)
122122
fontColor = (255, 255, 255)
123-
font_thickness = 1
124123
lineType = 2
125124
cv2.putText(
126125
image,

avapi/visualize/snapshot.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ def show_image_with_boxes(
350350
color=col,
351351
ID=ID,
352352
fontscale=fontscale,
353+
font_thickness=font_thickness,
353354
)
354355
elif isinstance(
355356
box,
@@ -365,7 +366,10 @@ def show_image_with_boxes(
365366
img1, (int(pt[0]), int(pt[1])), radius, color=(0, 255, 0), thickness=-1
366367
)
367368
bl_edge = (pt[0], pt[1])
368-
add_text_to_image(img1, bl_edge, ID, fontscale=fontscale)
369+
# add id
370+
add_text_to_image(
371+
img1, bl_edge, ID, fontscale=fontscale, font_thickness=font_thickness
372+
)
369373
else:
370374
raise NotImplementedError(type(box))
371375
if addbox:

0 commit comments

Comments
 (0)