フィルターのクリア

How to find a specific word after running the OCR function

6 ビュー (過去 30 日間)
tiwwexx
tiwwexx 2019 年 5 月 31 日
回答済み: tiwwexx 2019 年 7 月 9 日
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!

採用された回答

tiwwexx
tiwwexx 2019 年 7 月 9 日
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"

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by