Clear Filters
Clear Filters

can I use plus-minus sign in CharacterSet while reading text with ocr function?

2 views (last 30 days)
i'm trying to use the the values from screen-captured image with using ocr function.
in that text, there is almost numerical values, plus, minus, commas, and plus-minus sign. (which is ±)
i've added the sign into the function like
res = ocr(img, 'CharacterSet','Test1234567890+-,±');
but no luck.
am I allowed to use that character? if there's any method for that, please let me know.
thanks in advance!
  2 Comments
Angelo Yeo
Angelo Yeo on 18 Apr 2024
Here is my reproduction:
img = imread("image.png");
imshow(img)
txt = ocr(img, "CharacterSet", "123456±+-");
txt.Text
ans =
'123+456 '
제파 양
제파 양 on 19 Apr 2024
that is what I've done exactly same. captured from PPT, input into image and resulting it.
thanks for the great reproduction.

Sign in to comment.

Answers (1)

Angelo Yeo
Angelo Yeo on 18 Apr 2024
That's a very good observation! It's unfortunate that the shipped ocr function doesn't work as you expected.
In some cases, to get accurate recognition results, you must train a custom OCR model. For example, when the text in your images use a proprietary font that is significantly different from any of the available fonts, or when OCR results are not what you expect even after trying the troubleshooting steps. For more details on how to train a custom OCR model, see Train Custom OCR Model.
  1 Comment
제파 양
제파 양 on 19 Apr 2024
oh. Thanks for the workaround.
it will take a bunch of time for the training, however the result can be fruity. i will try.

Sign in to comment.

Products


Release

R2023b

Community Treasure Hunt

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

Start Hunting!