This article is a mirror article of machine translation, please click here to jump to the original article.

View: 21372|Reply: 0

[Source] c# Use OCR to recognize Chinese images

[Copy link]
Posted on 11/23/2016 2:33:25 PM | | | |
There are still many OCR (Optical Character Recognition) components available on the market now, including the famous Tesseract and the very professional Asprise, although they are very professional and very easy to use, but they are not easy to use (because they are not friendly to Chinese support). If the company specializes in developing OCR suites and is willing to spend a long time on in-depth research and development, then Tesseract is recommended, which can be configured in depth and is open source.
After trying various solutions, it was found that Microsoft's OCR component had a good effect on Chinese recognition and was simple. This component is based on Office 2007 and has the following effect:


Use C# and Office 2007 OCR components to convert graphics and text
  • Install Office 2007. (You need to install this manually in Tools–> Microsoft Office Document Imaging when installing the component options)
  • Office SP2 patch installation (301 MB): http://download.microsoft.com/download/A/3/9/A39E919E-AFA8-4128-9249-51629206C70F/office2007sp2-kb953195-fullfile-zh-cn.exe
  • Reference the COM component in the Visual Studio C# project: Microsoft Office Document Imaging 12.0 Type Library
  • Then write the following code (this article uses the winfrom test project):

Then put a text.jpg file in the C drive to start testing the above code.

Other Notes: If the error "Additional Information: Retrieving a component with CLSID {40942A6C-1520-4132-BDF8-BDC1F71F547B} in the COM class factory failed due to the following error: 80040154 No registered class", try modifying the project build target from Any CPU to x86.


Original link: http://www.wxzzz.com/1602.html





Previous:Usage of SyncRoot in StringDictionary
Next:Writing a web service with C# HttpListener gives a 503 error
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com