一、HyperLRP简介
HyperLRP是一个开源的、基于深度学习高性能中文车牌识别库,由北京智云视图科技有限公司开发,支持PHP、C/C++、Python语言,Windows/Mac/Linux/Android/IOS 平台。
二、所需库安装
三、源代码参考
import hyperlpr as pp
import cv2
from PIL import ImageFont
from PIL import Image
from PIL import ImageDraw
import numpy as npfontC = uetype("C:\WINDOWS\Fonts\SIMYOU.TTF", 30)
def draw_info(image, rect, addText):angle(image, (int(rect[0]), int(rect[1])), (int( rect[2]), int(rect[3])), (0, 0, 255), 2,cv2.LINE_AA)img = Image.fromarray(image)draw = ImageDraw.Draw(((int(rect[0]), int(rect[1] - 35)), addText, (0, 0, 255), font=fontC)imagex = np.array(img)return imagexdef main(recogImg):img = cv2.imread(recogImg)res = pp.HyperLPR_plate_recognition(img)if not res:print("未识别")returnshowImage=draw_info(img,res[0][2],res[0][0])cv2.imshow("showImage",showImage)cv2.waitKey(5000)if __name__ == '__main__':main("car4.jpg")
四、识别效果
五、注意点
经本人测试绿牌好像识别不了。
本文发布于:2024-02-01 01:37:53,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170672267532909.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |