APP下载

基于神经网络的红绿灯识别研究

2021-07-11詹玉吴钦木

智能计算机与应用 2021年1期

詹玉 吴钦木

摘 要:交通灯的识别对人工智能以及无人驾驶都有着举足轻重的作用,本文研究交通识别中的红绿灯判断,用于改善驾驶员疲劳以及维护交通秩序从而提高驾驶安全系数减少交通事故的发生。通过机器视觉采集红绿灯交通信号图,运用Matlab进行图片处理截取红绿灯区域,提取每张图片的121个像素点RGB值,运用1和2分别表示绿灯和红灯,建立红绿灯样本训练库,通过Matlab自带的数据拟合工具nftool进行神经网絡训练,调整训练、验证、测试数据比例,最终得到识别效果较好的神经网络算法。运用样本均值进行测试也能够得到较好的识别。

关键词: 机器视觉;红绿灯识别;RGB值;数据拟合工具nftool;神经网络

文章编号: 2095-2163(2021)01-0032-04 中图分类号:TP391.41 文献标志码:A

【Abstract】The identification of traffic lights plays a decisive role in both artificial intelligence and unmanned driving. This paper studies the judgment of traffic lights in traffic identification, which can be used to improve driver fatigue and maintain traffic order so as to improve the driving safety coefficient and reduce the occurrence of traffic accidents.By machine vision gathering traffic signal of traffic light, using Matlab image processing to crop traffic area, in each image RGB values of 121 pixels are extracted, 1 and 2 are used to represent the traffic lights respectively, and red and green traffic light sample training library in built, through the Matlab's own data fitting tool nftool neural network training is conducted, the ratio among training, validation, test data is adjusted, so the neural network algorithm with better identification effect is achieved.Using the sample mean for testing can also be well identified.

【Key words】machine vision; traffic light identification; RGB values; nftool, a data fitting tool; the neural network

0 引 言

在道路交通信息中,作为重要交通信号标志的红绿灯出现得最为频繁,及时且准确地识别红绿灯对保障交通安全与交通秩序稳定具有重要意义。因此,本文基于神经网络对红绿灯识别开展研究。以红绿灯颜色为研究对象,通过机器视觉系统采集红绿灯图像数据,建立红绿灯的图像数据库作为训练样本,利用神经网络学习训练模型,实现对红灯与绿灯的识别。

在颜色识别中,传统方法是对图片进行处理,转换颜色空间运用算法进行识别,涉及的方法包括模糊隶属度函数[1]、归一化方法[2]、高斯分布建模方法[3]、残差法[4]、k均值聚类法[5]。这些方法都是通过图像处理来进行颜色识别,在车联网中识别速度有待提高。……

登录APP查看全文