毕业设计 python opencv实现车牌识别 形状定位
主要代码参考https://blog.csdn.net/wzh191920/article/details/79589506
GitHub:https://github.com/yinghualuowu
上文我们已经让图像变成了很多框框,根据原先版本,这种做法可以使用图形定位,因为车牌有尺寸规定啦,这是原版本的代码,还是别动了。
首先,我们设定一个最小的面积值:2000
先把矩形找到,把面积小的排除了,然后根据长宽比再排除一些,接下来保存合适的就行了
def img_findContours(img_contours,oldimg):
img, contours, hierarchy = cv2.findContours(img_contours, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
contours = [cnt for cnt in contours if cv2.contourArea(cnt) > Min_Area]
print("findContours len = ", len(contours))
# 排除面积最小的点
debug.img_show(img)
car_contours = []
for cnt in contours: ant = cv2.minAreaRect(cnt)
width, height = ant[1]
if width < height:
width, height = height, width
ration = width / height
print(ration)
if ration > 2 and ration < 5.5:
car_contours.append(ant)
box = cv2.boxPoints(ant)
box = np.int0(box)
debug.img_contours(oldimg,box)
return car_contours
会发现圈不全,是因为预处理的原因....以后会用其他方式去定位,我们换一个吧


毕业设计 python opencv实现车牌识别 形状定位的更多相关文章
- 毕业设计 python opencv实现车牌识别 颜色定位
主要代码参考https://blog.csdn.net/wzh191920/article/details/79589506 GitHub:https://github.com/yinghualuow ...
- 毕业设计 python opencv实现车牌识别 界面
主要代码参考https://blog.csdn.net/wzh191920/article/details/79589506 GitHub:https://github.com/yinghualuow ...
- 毕业设计 python opencv实现车牌识别 预处理
主要代码参考https://blog.csdn.net/wzh191920/article/details/79589506 GitHub:https://github.com/yinghualuow ...
- 毕业设计 python opencv实现车牌识别 码云地址
码云地址:https://gitee.com/yinghualuowu/Python_VLPR 删除了冗余代码,可以更加便于运行.其实是为了那些进不去github准备的~
- 毕业设计 python opencv实现车牌识别 矩形矫正
主要代码参考https://blog.csdn.net/wzh191920/article/details/79589506 GitHub:https://github.com/yinghualuow ...
- 毕业设计 python opencv实现车牌识别 颜色判断
主要代码参考https://blog.csdn.net/wzh191920/article/details/79589506 GitHub:https://github.com/yinghualuow ...
- 探索 Python + HyperLPR 进行车牌识别
概要 HyperLRP是一个开源的.基于深度学习高性能中文车牌识别库,由北京智云视图科技有限公司开发,支持PHP.C/C++.Python语言,Windows/Mac/Linux/Android/IO ...
- python+opencv实现车牌定位
写在前面 HIT大三上学期视听觉信号处理课程中视觉部分的实验三,经过和学长们实验的对比发现每一级实验要求都不一样,因此这里标明了是2019年秋季学期的视觉实验三. 由于时间紧张,代码没有进行任何优化, ...
- 基于opencv的车牌识别系统
前言 学习了很长一段时间了,需要沉淀下,而最好的办法就是做一个东西来应用学习的东西,同时也是一个学习的过程. 概述 OpenCV的全称是:Open Source Computer Vision ...
随机推荐
- os.path.join合并 os.path.dirname返回上一级目录 os.path.exists(path) os.stat('path/filename')获取文件/目录信息
import os str1 = "grsdgfd" str2 = "wddf" str3 = "gddgs" # print(str1 + ...
- loader的简单使用过程分析
首先,fragment或者activity必须实现callback接口 必须实现的三个方法为 public Loader<Cursor> onCreateLoader(int id, Bu ...
- 并发之AtomicInteger
并发之AtomicInteger 1 java.util.concurrent.atomic概要 在java.util.concurrent.atomic包下存在着18个类,其中Integer ...
- 25-Fibonacci(矩阵快速幂)
http://poj.org/problem?id=3070 Fibonacci Time Limit: 1000MS Memory Limit: 65536K Total Submiss ...
- 服务机器人的小脑——SLAM技术
博客转载自:https://www.leiphone.com/news/201706/DZlMscTwdIzFyodg.html 雷锋网(公众号:雷锋网)按:本文作者SLAMTEC(思岚科技公号sla ...
- ubuntu下各种解压缩文件方式
tar解包:tar xvf FileName.tar打包:tar cvf FileName.tar DirName(注:tar是打包,不是压缩!)———————————————.gz解压1:gunzi ...
- 树莓派(Raspberry Pi 3) 使用wifi模块连接网络
树莓派3B内置了wifi和蓝牙模块,启动WIFI模块有两种方式,一种是图形界面,一种是命令行模式. 使用图形界面: 在桌面右上角的菜单栏里面选择wifi,输入密码就可以了. 使用命令行: 第一步:配置 ...
- php+mysql入门
mysql+php+apache可以快速的架构动态网站. 首先,为什么php容易搞mysql,因为与mysql交互成为了php语言的一种特性. 一.mysql入门 mysql是一种开源的关系型数据库. ...
- linux文件字符集转换(utf8-gb2312)
一,命令行 在LINUX上进行编码转换时,可以利用iconv命令实现,这是针对文件的,即将指定文件从一种编码转换为另一种编码. iconv命令用法如下:iconv [选项...] [文件...] 1. ...
- .NET 生成生成缩略图
/// <summary> /// 生成缩略图 /// </summary> /// <param name="FromImagePath">源 ...