Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Shao Peng Yang committed Feb 9, 2022
0 parents commit 5da901d
Show file tree
Hide file tree
Showing 56 changed files with 13,017 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/__pycache__
Binary file added 0.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Font/platech.ttf
Binary file not shown.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!--
* @Author: your name
* @Date: 2022-02-09 16:04:11
* @LastEditTime: 2022-02-09 16:04:11
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \prdemo\README.md
-->
This is a demo for hyperlpr to recognize car license plate.
34 changes: 34 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
from flask import Flask, request
from hyperlpr import *
import json
import cv2

app = Flask(__name__)

# 只接受post方法访问


@app.route("/",methods=["POST"])
def check():
# 默认返回内容
return_dict= {'code': '0', 'info': 'SUCCESS', 'result': False}
# 判断入参是否为空
if request.args is None:
return_dict['code'] = '403'
return_dict['info'] = '请求参数为空'
return json.dumps(return_dict, ensure_ascii=False)
# 获取传入的params参数
post_data=request.form.to_dict()
img=post_data.get('img')
# 对参数进行操作
return_dict['result']=scanImage(img)

return json.dumps(return_dict, ensure_ascii=False)

# 功能函数
def scanImage(img):
image = cv2.imread(img)
return HyperLPR_plate_recognition(image)

if __name__ == "__main__":
app.run('0.0.0.0', port=5000, debug=False)
6 changes: 6 additions & 0 deletions hyperlpr-test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from hyperlpr import pipline as pp
import cv2
# 自行修改文件名
image = cv2.imread("./imgs/pr/1.jpg")
image,res = pp.SimpleRecognizePlate(image)
print(res)
8 changes: 8 additions & 0 deletions hyperlpr2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#导入包
from hyperlpr import *
#导入OpenCV库
import cv2
#读入图片
image = cv2.imread("./imgs/ori/3.jpg")
#打印识别结果
print(HyperLPR_plate_recognition(image))
Binary file added imgs/ori/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/ori/10.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/ori/11.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/ori/12.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/ori/13.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/ori/14.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/ori/15.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/ori/16.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/ori/17.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/ori/18.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/ori/19.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/ori/2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/ori/20.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/ori/3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/ori/4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/ori/5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/ori/6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/ori/7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/ori/8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/ori/9.jpg
Binary file added imgs/ori/AB288Y.JPG
Binary file added imgs/ori/JFA3215.jpg
Binary file added imgs/ori/res.jpg
Binary file added imgs/pr/1.jpg
Binary file added imgs/pr/10.jpg
Binary file added imgs/pr/11.jpg
Binary file added imgs/pr/2.jpg
Binary file added imgs/pr/3.jpg
Binary file added imgs/pr/4.jpg
Binary file added imgs/pr/5.jpg
Binary file added imgs/pr/6.jpg
Binary file added imgs/pr/7.jpg
Binary file added imgs/pr/8.jpg
Binary file added imgs/pr/9.jpg
Loading

0 comments on commit 5da901d

Please sign in to comment.