OCR why not find only character

扶醉桌前 提交于 2019-12-13 04:49:03

问题


I use OCR puma.net 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?

Here is my code:

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";
                }

            }

回答1:


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

puma.Language = PumaLanguage.English;

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.

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.



来源:https://stackoverflow.com/questions/33850483/ocr-why-not-find-only-character

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!