未验证 提交 8f7eb086 编写于 作者: D Double_V 提交者: GitHub

Merge pull request #106 from LDOUBLEV/fixocr

fix multi-line txt display
...@@ -227,7 +227,7 @@ def text_visual(texts, scores, img_h=400, img_w=600, threshold=0.): ...@@ -227,7 +227,7 @@ def text_visual(texts, scores, img_h=400, img_w=600, threshold=0.):
first_line = False first_line = False
else: else:
new_txt = ' ' + txt new_txt = ' ' + txt
draw_txt.text((0, gap * (count + 1)), new_txt, txt_color, font=font) draw_txt.text((0, gap * count), new_txt, txt_color, font=font)
txt = tmp[img_w // font_size - 4:] txt = tmp[img_w // font_size - 4:]
if count >= img_h // gap - 1: if count >= img_h // gap - 1:
txt_img_list.append(np.array(blank_img)) txt_img_list.append(np.array(blank_img))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册