OCR为什么找不到唯一字符

编程入门 行业动态 更新时间:2024-10-27 10:23:24
本文介绍了OCR为什么找不到唯一字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我使用OCR puma并得到结果.但是结果不仅包含(a b c d),而且还包含(; / , ").

I use OCR puma and I have a result. But the result not only contains (a b c d), the result also contains (; / , ").

我只想输出这些字符.我该怎么用?

I want to output only these characters. How can I use it?

这是我的代码:

var puma = new PumaPage(img.ToBitmap()); using (puma) { puma.FileFormat = PumaFileFormat.RtfAnsi; puma.EnableSpeller = false; puma.Language = PumaLanguage.English; try{ string t=pumaPage.RecognizeToString(); return t; } catch(Exception e) { // return e.ToString(); return "i think ! this isnt Plate"; } }

推荐答案

我对puma并不十分熟悉,但是我相信您的问题的答案对任何OCR都是通用的.

I am not intimately familiar with puma, but I believe the answer to your question is generic to any OCR.

puma.Language = PumaLanguage.English;

通过将识别语言设置为英语,OCR将使用英语字母表中常见的所有字符,包括标点符号.想象一下一段英语文本,其中将包含A-Z,0-9和所有标点符号.

By setting the recognition language to English, OCR will use all characters commonly found in an English alphabet, including punctuation marks. Imagine a paragraph of English text, which will contain A-Z, 0-9 and all punctuation marks.

如果您打算限制和限制yoru字符集,则需要使用一种特殊的语言(如果该特定的OCR技术可用),或者使用一种具有您期望的规格和有限的字符集需求的自定义语言首先创建,然后为OCR设置.

If your intention is to constrain and limit yoru character set, then either a specialized language needs to be used (if such is available in that particular OCR technology), or perhaps a custom language with your desired specifications and limited character set needs to be created first, and then set for OCR.

更多推荐

OCR为什么找不到唯一字符

本文发布于:2023-11-30 18:00:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1650995.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:找不到   字符   OCR

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!