matlab车牌识别源代码资源,车牌识别系统MATLAB源代码完整

clc; clear all; close all;

[filename, pathname, filterindex] = uigetfile({'*.jpg;*.tif;*.png;*.gif','All Image Files';...

'*.*','All Files' }, '选择待处理图像', ...

'images\01.jpg');

file = fullfile(pathname, filename);%文件路径和文件名创建合成完整文件名

id = Get_Id(file);%得到file中的所有对象

Img = imread(file);%根据路径和文件名读取图片到Img

[Plate, bw, Loc] = Pre_Process(Img); % 车牌区域预处理

result = Plate_Process(Plate, id); % 车牌区域二值化处理

% 寻找连续有文字的块,若长度大于某阈值,则认为该块有两个字符组成,需要分割bw = Segmation(result);

words = Main_Process(bw); % 主流程处理

Write_Mask(words, id); % 写出到模板库

str = Pattern_Recognition(words); % 识别

function id = Get_Id(file)

% 获取图像id信息

% 输入参数:

% file——图像路径

% 输出参数:

% id——图像id信息

info = imfinfo(file);

FS = [422227 354169 293184 235413 214202 ...

130938 490061 120297 98686 137193 ...

80558 46208 69947 58110 62115 ...

59072 52168 60457 53979 50223];

id = find(FS == info.FileSize);

if isempty(id)

warndlg('未建立该图像模板库,可能运行出错!', '警告');

id = 1;

end

function R = Cubic_Spline(P)

% 三次样条插值

% 输入参数:

% P——节点矩阵

% 输出参数:

% R——样条节点矩阵

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值