毕业设计 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 ...
随机推荐
- 3-在EasyNetQ上使用SSL连接(黄亮翻译)
EasyNetQ可以通过SSL进行连接.这篇指南的作者Gordon Coulter最初为回应一个提问写的. 首先,你必须仔细依据https://www.rabbitmq.com/ssl.html文章中 ...
- CentOS 6.3安装jdk(笔记整理)
1. 下载bin文件,切忌oracle上现在下载到的旧版本的jdk的bin都是网页(执行会报错,见本文最后的截图),他们需要登录oracle后才能下载,所以我这里的url是从googlecode里觅来 ...
- SpringBoot表单验证
需求:年龄在18岁以下的女生不能注册 处理器中的写法: 实体类中的写法:
- DOM详习讲解
http://www.cnblogs.com/wupeiqi/articles/5643298.html
- c# ??和运算符先后的问题
; ; - not1??; Console.WriteLine(a); 输出结果为:10 问题因该是??运算符没有-的优先级高,实际这个 操作等于: ; ; - not1)??); 解决这个问题的办法 ...
- 算法Sedgewick第四版-第1章基础-014一用stack把前置表达式转为后置表达式并计算值
1. /************************************************************************* * Exercise 1.3.10 * * ...
- ubuntu下各种解压缩文件方式
tar解包:tar xvf FileName.tar打包:tar cvf FileName.tar DirName(注:tar是打包,不是压缩!)———————————————.gz解压1:gunzi ...
- web 后台打印
//提交打印 function sbumitPrint() { printHidden("AppsDSPrintDoub.aspx?type=print"); } function ...
- C#实现类只实例化一次(被多个类访问调用)
C#简单写法如下: public class Singleton { private static Singleton _instance = null; private Single ...
- 一键结束port 5037占用
输入cmd进入dos界面,进入android-sdk-windows\platform-tools目录,执行下面命令启动adb start-server出现下面错误* daemon not runni ...