Borrar filtros
Borrar filtros

How to read the text of an image?

6 visualizaciones (últimos 30 días)
Elias Unk
Elias Unk el 22 de Sept. de 2017
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

Respuestas (0)

Categorías

Más información sobre Convert Image Type en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by