master
the1dog 5 years ago
parent b710eaa879
commit e874e7b4bf

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="D:/opencv/opencv/build/java/x64"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="E:/20208test/admin_yu-yx-image-recognition-master/yx-image-recognition/lib"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="lib/opencv-4.0.1-1.4.4-windows-x86_64.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

23
.gitignore vendored

@ -0,0 +1,23 @@
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>yx-image-recognition</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

@ -0,0 +1,22 @@
¾©A00000 2020-08-17 13:36:08
¾©A00000 2020-08-17 13:51:40
¾©A00001 2020-08-17 13:52:15
¾©A00001 2020-08-17 13:52:17
京A34291 2020-08-17 14:14:08
京A34291 2020-08-17 14:14:55
京AG6666 2020-08-17 14:15:01
京AG6666 2020-08-17 14:15:04
粤B88888 2020-08-17 14:20:02
ç<EFBFBD>¼A 2020-08-17 14:20:02
粤B88888 2020-08-17 14:20:05
ç<EFBFBD>¼A 2020-08-17 14:20:05
京A88731 2020-08-17 14:20:13
京A88731 2020-08-17 14:20:16
湘B5555 2020-08-17 14:20:25
湘B5555 2020-08-17 14:20:47
粤B88888 2020-08-17 14:22:01
ç<EFBFBD>¼A 2020-08-17 14:22:01
粤B88888 2020-08-17 14:22:04
ç<EFBFBD>¼A 2020-08-17 14:22:04
è<EFBFBD>N00000 2020-08-17 14:22:10
è<EFBFBD>N00000 2020-08-17 14:22:12

@ -0,0 +1,29 @@
BSD 3-Clause License
Copyright (c) 2020, yuxue
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

@ -0,0 +1,136 @@
# yx-image-recognition
#### 介绍
- **spring boot + maven 实现的车牌识别及训练系统**
- 基于java语言的深度学习项目在整个开源社区来说都相对较少而基于java语言实现车牌识别EasyPR-Java项目最后的更新已经是五年以前。
- **本人参考了EasyPR原版C++项目、以及fan-wenjie的EasyPR-Java项目同时查阅了部分opencv官方4.0.1版本C++的源码结合个人对java语言理解整理出当前项目**
- 这是一个**入门级教程项目**,本人目前也正在学习图片识别相关技术;大牛请绕路
- 当前项目在原有EasyPR项目基础上增加了绿牌识别功能只不过当前的训练库文件包含绿牌的样本太少还需要重新增加绿牌样本的训练后续会逐步上传
- 当前已经添加基于svm算法的车牌检测训练、以及基于ann算法的车牌号码识别训练功能
- 后续会逐步加入证件识别、人脸识别等功能
#### 包含功能
- ****$\color{yellow}{黄}$** **$\color{blue}{蓝}$** **$\color{green}{绿}$**** **黄蓝绿车牌检测及车牌号码识别**
- 单张图片、多张图片并发、单图片多车牌检测及识别
- **图片车牌检测训练**
- **图片文字识别训练**
- 包含两种依赖包的实现方式: 基于org.bytedeco.javacpp包的实现方式 基于org.opencv官方包的实现方式
- org.opencv官方包提供了java语言apijava项目可以通过build path方式或者环境变量的方式引用
- org.bytedeco.javacpp包JavaCPP是一个开源库它提供了在 Java 中高效访问本地 C++的方法在pom中引入坐标依赖即可
#### 软件版本
- jdk 1.8.61+
- maven 3.0+
- opencv 4.0.1 javacpp1.4.4opencv-platform 4.0.1-1.4.4
- spring boot 2.1.5.RELEASE
- yx-image-recognition 1.0.0版本
#### 软件架构
- B/S 架构前端html + requireJS后端java
- 数据库使用 sqlite3.0
- 接口文档使用swagger 2.0
#### 操作界面
![1.png](./doc/doc_image/1.png)
#### 车牌检测过程
高斯模糊:
![1.png](./doc/doc_image/debug_GaussianBlur.jpg)
图像灰度化:
![1.png](./doc/doc_image/debug_gray.jpg)
Sobel 算子:
![1.png](./doc/doc_image/debug_Sobel.jpg)
图像二值化:
![1.png](./doc/doc_image/debug_threshold.jpg)
图像闭操作:
![1.png](./doc/doc_image/debug_morphology.jpg)
二值图像降噪:
![1.png](./doc/doc_image/debug_morphology1.jpg)
提取外部轮廓:
![1.png](./doc/doc_image/debug_Contours.jpg)
外部轮廓筛选:
![1.png](./doc/doc_image/107_screenblock.jpg)
切图:
![1.png](./doc/doc_image/debug_crop_1.jpg)
![1.png](./doc/doc_image/debug_crop_2.jpg)
![1.png](./doc/doc_image/debug_crop_3.jpg)
重置切图尺寸:
![1.png](./doc/doc_image/debug_resize_1.jpg)
![1.png](./doc/doc_image/debug_resize_2.jpg)
![1.png](./doc/doc_image/debug_resize_3.jpg)
车牌检测结果:
![1.png](./doc/doc_image/result_0.png)
#### 图片车牌文字识别过程
debug_char_threshold
![1.png](./doc/doc_image/debug_char_threshold.jpg)
debug_char_clearLiuDing
![1.png](./doc/doc_image/debug_char_clearLiuDing.jpg)
debug_specMat
![1.png](./doc/doc_image/debug_specMat.jpg)
debug_chineseMat
![1.png](./doc/doc_image/debug_chineseMat.jpg)
debug_char_auxRoi
![1.png](./doc/doc_image/debug_char_auxRoi_0.jpg)
![1.png](./doc/doc_image/debug_char_auxRoi_1.jpg)
![1.png](./doc/doc_image/debug_char_auxRoi_2.jpg)
![1.png](./doc/doc_image/debug_char_auxRoi_3.jpg)
![1.png](./doc/doc_image/debug_char_auxRoi_4.jpg)
![1.png](./doc/doc_image/debug_char_auxRoi_5.jpg)
![1.png](./doc/doc_image/debug_char_auxRoi_6.jpg)
#### 安装教程
- 开发环境搭建: [./doc/01_开发环境搭建.md](./doc/01_开发环境搭建.md)
- 将项目拉取到本地PlateDetect文件夹拷贝到d盘下默认车牌识别操作均在d:/PlateDetect/目录下处理
- 需要修改操作路径修改com/yuxue/constant/Constant.java文件常量参数即可可以使用绝对盘符路径也可以使用项目相对路径
- spring boot方式运行项目浏览器上输入 http://localhost:16666/index 即可打开操作界面
- 浏览器上输入 http://localhost:16666/swagger-ui.html 即可打开接口文档页面
#### 使用说明
- **车牌图片来源于网络,仅用于交流学习,不得用于商业用途;如有侵权,请联系本人删除**
- 转发请注明出处; 本项目作者yuxue一个不资深的java语言从业者
- 作者gitee地址: https://gitee.com/admin_yu
- 作者csdn微博地址https://blog.csdn.net/weixin_42686388
#### 参考文档
- liuruoze/EasyPRhttps://gitee.com/easypr/EasyPR?_from=gitee_search
- fan-wenjie/EasyPR-Java https://github.com/fan-wenjie/EasyPR-Java
- opencv官方 https://opencv.org/
Loading…
Cancel
Save