How to read the text of an image?
조회 수: 4 (최근 30일)
이전 댓글 표시
Trying to set a text reading algorithm.It should be able to read the words and numbers (handwriting excluded), however, the text can be in a spiral shape, angel, different backgrounds and so forth so basically it should be a standard way and not targeting any precise pattern. I did write the following code :
clc,clear all;
[fname, path]=uigetfile('*png','Select an Image');
fname = strcat(path,fname);
img=imread(fname);
imshow(img);
text=ocr(img);
Box = insertObjectAnnotation(img, 'rectangle',...
text.WordBoundingBoxes,...
text.WordConfidences);
imshow(Box);
The image basically undergoes an analysis using ocr to get the words than using insertObjectAnnotation I draw a box around each and every word with an accuracy percentage between 0 and 1, the closest to 1 the better, the way words are seen can be checked going to workspace then text then words.The issue is I'm getting really bad result outcome with a fail to get the correct words more often than not.Note also that I did check Matlab's documentation and examples in computer vision system toolbox but it wasn't really helpful. What I want is mainly improving the accuracy of my results.
With the code and my explanation above the results can easily be replicated
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!