资源简介
matlab程序,实现车牌图片的识别,附带收集的车牌图片作为程序运行的样本。已调试过。
代码片段和文件信息
function [seg] = character_segmentation(bw);
% character_segmentation: Returns the digit segments in the supplied binary image.
% The function uses the “segment“ function keeping only the seven
% segments in the result with largest area and in case less than seven
% segments were found it attempts to recall the function making the
% separation between the already found segments clearer (by cleaning the
% bits which are there.
DIGIT_WIDTH = 18;
MIN_AREA = 250;
load global_var.mat;
plot_vector(sum(bw) 4 ‘Character Segmentation - Columns Sum Graph:‘ debug2);
seg = segment(bw DIGIT_WIDTH MIN_AREA);
[x y] = size(seg);
% If we got less than 7 digits we try to make the sepration between them
% clearer by cleaning the bits between them and we call the “segment“
% function again:
if x < 7
for i = 1 : x
bw(:seg(i2))=0;
end;
seg = segment(bw DIGIT_WIDTH MIN_AREA);
end;
% Keeping in the results the seven segments with the largest area:
area = [];
for i = 1 : x
pic = bw(: seg(i1) : seg(i2) :);
area(i) = bwarea(pic);
end;
area1 = sort(area);
seg = seg‘;
for j = 1:(length(area1)-7)
i = find(area == area1(j));
len = length(area);
if i == 1
area = [area(2:len)];
seg = [seg(:2:len)];
elseif i == len
area = [area(1:i-1)];
seg = [seg(:1:i-1)];
else
area = [area(1:i-1) area(i+1:len)];
seg = [seg(:1:i-1) seg(:i+1:len)];
end;
end;
seg = seg‘;
return;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [segmentation] = segment(im digit_width min_area);
% segment: Segment the pictures in digit images according to the variable
% “digit_width“ and returns a matrix containing the two bounds of the each
% digit segment. The function keeps in the result only segment whose
% “rectangular“ areas is more than “min_area“.
segmentation = [];
% Summing the colums of the pic:
t = sum(im);
% Getting the segments in the pic:
seg = clean(find_valleys(t 2 1 digit_width) 3);
% Keeping in the result only the segments whose rectangular areas is more than min_area:
j = 1;
for i = 1 : (length(seg) - 1)
band_width = seg(i+1) - seg(i);
maxi = max(t(1 seg(i):seg(i+1)));
if(maxi * band_width > min_area)
segmentation(j 1) = seg(i);
segmentation(j 2) = seg(i+1);
j = j + 1;
end;
end;
return;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [s] = find_valleys(t val offset digit_width);
% find_valleys: Uses the method named peak-to-valleyin order to segment the
% pictures in digit images getting the two bounds of the each digit segment
% according to the statistical parameter digit_width = 18.
% The function is recursive; it uses the vector of the sums of the columns
% in the LP binary image supplied in the parameter “t“.
% The function passes over the graph
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 6528 2003-05-04 12:51 Matlab 识别\character_segmentation.m
文件 278 2003-05-03 07:19 Matlab 识别\cleanScreen.m
文件 906 2003-01-31 04:50 Matlab 识别\cut_bw_img.m
文件 457 2003-05-03 07:12 Matlab 识别\display_picture.m
文件 606 2003-03-30 19:56 Matlab 识别\draw_lines.m
文件 10134 2003-05-04 12:26 Matlab 识别\extract_LP.m
文件 1128 2003-01-31 02:39 Matlab 识别\extract_yellow_region.m
文件 1101 2003-01-31 09:18 Matlab 识别\find_angle.m
文件 2114 2003-01-31 03:17 Matlab 识别\find_optimal_threshold.m
文件 327 2011-05-17 19:39 Matlab 识别\global_var.mat
文件 1052 2003-05-03 12:04 Matlab 识别\go.m
文件 1764 2003-05-04 06:54 Matlab 识别\horizontal_crop.m
文件 75168 2003-03-29 15:09 Matlab 识别\images\car.jpeg
文件 151758 2007-01-06 13:46 Matlab 识别\images\im8.JPG
..A.SH. 169984 2011-03-01 17:41 Matlab 识别\images\Thumbs.db
文件 96755 2003-04-07 17:30 Matlab 识别\images\新建文件夹\im1.jpg
文件 60150 2003-04-05 12:43 Matlab 识别\images\新建文件夹\im2.jpg
文件 74249 2003-04-05 12:43 Matlab 识别\images\新建文件夹\im3.jpg
文件 95495 2003-04-05 15:55 Matlab 识别\images\新建文件夹\im4.jpg
文件 87317 2003-04-05 14:31 Matlab 识别\images\新建文件夹\im5.jpg
文件 25866 2003-04-10 05:52 Matlab 识别\images\新建文件夹\im6.JPG
文件 32384 2003-04-06 04:04 Matlab 识别\images\新建文件夹\im7.jpg
文件 7107 2003-04-05 12:42 Matlab 识别\internal_images\black.jpg
文件 41966 2003-05-03 06:33 Matlab 识别\internal_images\ti
文件 28044 2003-05-03 06:44 Matlab 识别\internal_images\ti
文件 30483 2003-05-03 06:46 Matlab 识别\internal_images\ti
文件 24553 2003-05-03 06:48 Matlab 识别\internal_images\ti
文件 64936 2003-03-19 01:19 Matlab 识别\net.mat
文件 2686 2003-05-04 08:13 Matlab 识别\OCR.m
文件 322 2003-05-03 07:29 Matlab 识别\plot_vector.m
............此处省略9个文件信息
相关资源
- 条形码识别 matlab代码 内负条形码
- MATLAB实现K近邻法分类
- Matlab图像识别
- 人眼识别matlab
- 基于LDA(fisherface)和KNN的人脸识别
- 油位计仪表盘识别matlab代码实现
- MATLAB基于BP神经网络的手写数字识别代
- 基于MATLAB的一维条码识别系统
- matlab虹膜识别
- MATLAB-车牌识别代码打包.zip
- 基于MATLABhough变换的表盘刻度识别系统
- 基于MATLAB的库外人脸识别GUI界面源码
- 道路识别
- BP人脸识别
- Human Action Detection Resources 一篇关于总
- 水果识别和分类
- 局部二值模式进行编码的人脸识别
- matlab实现图像边缘检测、图像分割、
- MATLAB模式识别与智能计算代码
- svmplot 支持向量机的画图程序。能很好
- 车牌识别小程序
- 掌纹识别
- 男女声识别
- matlab的车牌定位提取
- face recognition 稀疏表示人脸分类与识别
- svm分类器的汉语声调识别
- 简单的Matlab人脸识别
- 声纹识别
- 手写体数字识别的训练数据库
- 车牌识别系统
评论
共有 条评论