python利用txt文件再图像中画框,显示文本
import cv2
import os
import numpy as np
a='a'+'\n'
tifpath = r'F:\test_img\trans.tif'
txt = r'F:\test_img\test.txt'
img = cv2.imread(tifpath)
'''with open(r'F:\test_img\text2.txt','w') as f:
#f.write(a, 'a')
for i in range(12):
with open(r'F:\test_img\text2.txt', 'a') as f:
f.write(str(i))'''
def rawimage_box():
i = 0
#img1 = cv2.imread(img)
with open(txt) as f:
for line in f