2021SC@SDUSC
源代码下载地址:https://gitee.com/zeusees/HyperLPR
源码配置的详情见第一篇分析
本篇内容将继续根据小组分配的任务进行分析,内容如下:
一、drawRectBox()函数
此函数为SimpleRecognizePlateByE2E()函数的最后一行
if confidence>0.7:
image = drawRectBox(image, rect, res+" "+str(round(confidence,3)))
源码如下:
def drawRectBox(image,rect,addText):
cv2.rectangle(image, (int(rect[0]), int(rect[1])), (int(rect[0] + rect[2]), int(rect[1] + rect[3])), (0,0, 255), 2,cv2.LINE_AA)
cv2.rectangle(image, (int(rect[0]-1), int(rect[1])-16), (int(rect[0] + 115), int(rect[1])), (0, 0, 255), -1,