1.完整项目描述和程序获取
>面包多安全交易平台:https://mbd.pub/o/bread/Y52bkppx
>如果链接失效,可以直接打开本站店铺搜索相关店铺:
>如果链接失效,程序调试报错或者项目合作也可以加微信或者QQ联系。
2.部分仿真图预览
3.算法概述
文字识别(OCR)目前在多个行业中得到了广泛应用,比如金融行业的单据识别输入,餐饮行业中的发票识别, 交通领域的车票识别,企业中各种表单识别,以及日常工作生活中常用的身份证,驾驶证,护照识别等等。
OCR(文字识别)是目前常用的一种AI能力。 一般OCR的识别结果是一种按行识别的结构化输出,能够给出一行文字的检测框坐标及文字内容。
4.部分源码
imagen=imread('TEST_1.jpg');
imshow(imagen);
if size(imagen,3)==3 %RGB image
imagen=rgb2gray(imagen);
end
% Convert to BW
threshold = graythresh(imagen);
imagen =~im2bw(imagen,threshold);
imagen = bwareaopen(imagen,30);
word=[ ];
re=imagen;
fid = fopen('text.txt', 'wt');
% Load templates
load templates
global templates
num_letras=size(templates,2);
while 1
%Fcn 'lines' separate lines in text
[fl re]=lines(re);
imgn=fl;
[L Ne] = bwlabel(imgn);
for n=1:Ne
[r,c] = find(L==n);
% Extract letter
n1=imgn(min(r):max(r),min(c):max(c));
img_r=imresize(n1,[42 24]);
letterread_letter(img_r,num_letras);
word=[word letter];
end
fprintf(fid,'%s\n',word);%Write 'word' in text file (upper)
word=[ ];
if isempty(re) %See variable 're' in Fcn 'lines'
break
end
end
fclose(fid);
winopen('text.txt')
A163