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

4 次查看(过去 30 天)
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 个评论
Angelo Yeo
Angelo Yeo 2024-4-18
Here is my reproduction:
img = imread("image.png");
imshow(img)
txt = ocr(img, "CharacterSet", "123456±+-");
txt.Text
ans =
'123+456 '
제파 양
제파 양 2024-4-19
that is what I've done exactly same. captured from PPT, input into image and resulting it.
thanks for the great reproduction.

请先登录,再进行评论。

回答(1 个)

Angelo Yeo
Angelo Yeo 2024-4-18
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.

类别

Help CenterFile Exchange 中查找有关 Point Cloud Processing 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by