日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人工智能 > 循环神经网络 >内容正文

循环神经网络

基于OCR的字母识别算法的matlab仿真

發布時間:2025/4/5 循环神经网络 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 基于OCR的字母识别算法的matlab仿真 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1.算法簡介

? ? ? OCR識別可以分為數字掃描對象的獲取,數字圖像的生產,數字圖像的處理和OCR文本識別等四個階段.OCR識別在信息資源數字化工作中應用時,其準確度一直是人們關注的焦點,因為OCR精確識別是保證數字化產品質量進而為整項工作提供用戶保障的一個重要環節.?

2.部分核心代碼

% OCR (Optical Character Recognition).% PRINCIPAL PROGRAM warning off %#ok<WNOFF> % Clear all clc, close all, clear all % Read image imagen=imread('TEST_1.jpg'); % Show image imshow(imagen); title('INPUT IMAGE WITH NOISE') % Convert to gray scale if size(imagen,3)==3 %RGB imageimagen=rgb2gray(imagen); end % Convert to BW threshold = graythresh(imagen); imagen =~im2bw(imagen,threshold); % Remove all object containing fewer than 30 pixels imagen = bwareaopen(imagen,30); %Storage matrix word from image word=[ ]; re=imagen; %Opens text.txt as file for write fid = fopen('text.txt', 'wt'); % Load templates load templates global templates % Compute the number of letters in template file num_letras=size(templates,2); while 1%Fcn 'lines' separate lines in text[fl re]=lines(re);imgn=fl;%Uncomment line below to see lines one by one%imshow(fl);pause(0.5) %----------------------------------------------------------------- % Label and count connected components[L Ne] = bwlabel(imgn); for n=1:Ne[r,c] = find(L==n);% Extract lettern1=imgn(min(r):max(r),min(c):max(c)); % Resize letter (same size of template)img_r=imresize(n1,[42 24]);%Uncomment line below to see letters one by one%imshow(img_r);pause(0.5)%-------------------------------------------------------------------% Call fcn to convert image to textletter=read_letter(img_r,num_letras);% Letter concatenationword=[word letter];end%fprintf(fid,'%s\n',lower(word));%Write 'word' in text file (lower)fprintf(fid,'%s\n',word);%Write 'word' in text file (upper)% Clear 'word' variableword=[ ];%*When the sentences finish, breaks the loopif isempty(re) %See variable 're' in Fcn 'lines'breakend end fclose(fid); %Open 'text.txt' file winopen('text.txt') fprintf('For more information, visit: <a href= "http://www.matpic.com">www.matpic.com </a> \n') % clear all

3.仿真演示

?

4.相關參考文獻

[1]郭軍. 信息資源數字化文本型數字圖像OCR識別準確度影響因素及提高策略研究[D]. 鄭州大學.

C69

總結

以上是生活随笔為你收集整理的基于OCR的字母识别算法的matlab仿真的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。