Borrar filtros
Borrar filtros

How to find a specific word after running the OCR function

4 visualizaciones (últimos 30 días)
tiwwexx
tiwwexx el 31 de Mayo de 2019
Respondida: tiwwexx el 9 de Jul. de 2019
I'm working on a project where I use the OCR function to analize a picture. I want to find a specific word in the picture, for instance find only the word "and" in the picture. I tried to do this using
results = ocr(myimage, 'CharacterSet', '"and"');
confidence_mark = results.CharacterConfidences > 0.80;
But this didn't work. Instead the 'CharacterSet' made the program find the individual characters "a", "n", and "d" but i wanted to only find a string of these three characters "and". Thank you guys so much for helping!

Respuesta aceptada

tiwwexx
tiwwexx el 9 de Jul. de 2019
In case anyone sees this string I thought of a way around this. Use the code
results = ocr(myimage, 'CharacterSet', '"and"');
Then just look throught the results.Words sting for the word "and" so you get out a string that only has what the ocr program recognized as the word "and". Then do
results.WordConfidence('newWordList') > significance_value & strcmp(results.Words,'and');
and this should give you all the instances of the word "and"

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by