1 简介
随着社会经济的发展,道路上车流增加,从而造成了交通拥堵,环境污染,以及能源浪费等问题.一般解决办法为扩建道路等,然而由于城市人口增加道路远远不能满足车辆的增长速度.因此人们提出了智能交通系统,利用各种检测技术和智能控制算法提高路网通行能力.本文着重阐述了利用Matlab软件进行的图像识别应用在交通信号灯的智能控制.
2 部分代码
function S = GetDatabase(dirName)
if exist(fullfile(pwd, 'S.mat'), 'file')
load(fullfile(pwd, 'S.mat'));
return;
end
if nargin < 1
dirName = './wav/Database';
end
h = waitbar(0, '', 'Name', '获取音频信号特征...');
fileList = getAllFiles(dirName);
steps = length(fileList);
for i = 1 : steps
file = fileList{i};
[~, name, ~]= fileparts(file);
ind = strfind(name, '语音信号');
if ~isempty(ind)
name = name(1:ind-1);
name = strtrim(name);
end
MC = GetFeather(file);
S(i).name = name;
S(i).MC = MC;
waitbar(i/steps, h, sprintf('已处理:%d%%', round(i/steps*100)));
end
close(h);
save S.mat S
3 仿真结果
4 参考文献
[1]张玉宝, 赵玮. 基于Matlab图像识别的交通信号灯智能控制[J]. 工业, 2015, 000(025):P.140-140.