Home > Software engineering >  The number of c/MFC how to get the screen
The number of c/MFC how to get the screen

Time:09-27




A picture, for example, a string of Numbers above, what kind of function and output can get the number??? Will the bosses to some actual code, thank you,

CodePudding user response:

Baidu search "Microsoft office OCR"

CodePudding user response:

The
refer to the original poster qq41461000 response:



A picture, for example, a string of Numbers above, what kind of function and output can get the number??? Will the bosses to some actual code, thank you,


Using MS Office document Image XXX type libaray
XXX for a version number

CodePudding user response:


Office OCR character recognition,
I used to swim with him to write a page automatically buy shop, open shop regularly, check the needed goods, need to buy,

CodePudding user response:

 VB realize the OCR character recognition 
Principle: use Microsoft OCR controls, takes less than 10 lines of code will be able to realize their own OCR character recognition software.
1. Add controls, you need to install office2003, not installed office2003 can copy from the other machine related files, register regsvr32. Exe mdivwctl. DLL,
Controls in the directory: C: \ Program Files \ Common Files \ Microsoft Shared \ MODI \ 11.0, have to do is related to several Files, this folder all documents about 21 m.
Engineering - & gt; Components - & gt; Add this control: Microsoft Office Document Imaging 11.0 Type Library

2. In button Click event:
Dim strLayoutInfo As String, strLPN As String

'initialization and load document
The Set miDoc=CreateObject (" MODI. Document ") 'create objects
MiDoc. Create "D: \ unnamed. Tif" 'loading image file (must be black and white binary chart)

Screen. MousePointer set cursor=vbHourglass 'busy
'recognition
MiDoc. Images (0). The OCR miLANG_CHINESE_SIMPLIFIED, True, True 'useful in this way, identified as Chinese simplified

Set modiLayout=miDoc. Images (0). The read data Layout '
StrLayoutInfo=_
"Language:" & amp; ModiLayout. Language & amp; VbCrLf & amp; _
"The Number of characters:" & amp; ModiLayout. NumChars & amp; VbCrLf & amp; _
"The Number of fonts:" & amp; ModiLayout. NumFonts & amp; VbCrLf & amp; _
"The Number of words:" & amp; ModiLayout. NumWords & amp; VbCrLf & amp; _
"The Beginning of the text:" & amp; Left (modiLayout. Text, 50) & amp; VbCrLf & amp; _
"The First word of the text:" & amp; ModiLayout. Words (0). The Text
MsgBox strLayoutInfo vbInformation + vbOKOnly, "Layout Information", "
The Set modiLayout=Nothing
The Set miDoc=Nothing
Screen. MousePointer=vbDefault

3. OK, is very simple

CodePudding user response:

OCR tesseract open source software

CodePudding user response:

You this but is not a general function is solved, you can find a recognition of an interface to you, I look at the others are intercepted number that piece do processing,,
  • Related