在python上使用坐标画框
img = Image.open(img_fpath)
a = ImageDraw.ImageDraw(img)
x1=bbox[0]
y1=bbox[1]
x2=bbox[2]
y2=bbox[3]
a.rectangle(((x1, y1),(x2, y2)), fill=None, outline='red', width=5)
fnt = ImageFont.truetype('1.ttf',40)
a.text((x1, y1), str(i), fill='green', font=f
原创
2022-03-22 22:25:33 ·
1984 阅读 ·
0 评论