Image Viewer CP ActiveX Control

OCRStartScan

 

Start a recognition process on the image or on zone of the image defined by OCRSetRect method.


Public Function OCRStartScan( _
   ByVal iDictionaryType As Integer, _
   ByVal strDictionaryPath As String
) as Integer

 

Parameter

iDictionaryType
0 - English
Need include eng.DangAmbigs, eng.freq-dawg, eng.inttemp, eng.normproto, eng.pffmtable, eng.unicharset, eng.user-words and eng.word-dawg dictionary files in strDictionaryPath Folder.
 
1 - German
Need include deu.DangAmbigs, deu.freq-dawg, deu.inttemp, deu.normproto, deu.pffmtable, deu.unicharset, deu.user-words and deu.word-dawg dictionary files in strDictionaryPath Folder.

2 - Fraktur
Need include deu-f.DangAmbigs, deu-f.freq-dawg, deu-f.inttemp, deu-f.normproto, deu-f.pffmtable, deu-f.unicharset, deu-f.user-words and deu-f.word-dawg dictionary files in strDictionaryPath Folder.

3 - Italian
Need include ita.DangAmbigs, ita.freq-dawg, ita.inttemp, ita.normproto, ita.pffmtable, ita.unicharset, ita.user-words and ita.word-dawg dictionary files in strDictionaryPath Folder.

4 - Dutch
Need include nld.DangAmbigs, nld.freq-dawg, nld.inttemp, nld.normproto, nld.pffmtable, nld.unicharset, nld.user-words and nld.word-dawg dictionary files in strDictionaryPath Folder.

5 - Portuguese
Need include por.DangAmbigs, por.freq-dawg, por.inttemp, por.normproto, por.pffmtable, por.unicharset, por.user-words and por.word-dawg dictionary files in strDictionaryPath Folder.

6 - Spanish
Need include spa.DangAmbigs, spa.freq-dawg, spa.inttemp, spa.normproto, spa.pffmtable, spa.unicharset, spa.user-words and spa.word-dawg dictionary files in strDictionaryPath Folder.

strDictionaryPath
The path of dictionary files. It need same as the ocx folder. e.g. If the ocx file locate on c:\test folder
if the dictionary files locate on c:\test\dictfiles , you need set "dictfiles" in strDictionaryPath parameter.

Return Value
Return 1 - Successful.
Return -1 - Cannot start, because it is recognizing. 
Return -2 - Error occur.
Return -3 - File Name is empty.

   
Example

   

Visual Basic Syntax
ImageViewer1.OCRRecognizeMode=0
ImageViewer1.OCRSetRect 0,0,100, 100
ImageViewer1.OCRStartScan(0, "dictfiles")

'after OCRRecognized event fired
ImageViewer1.OCRSaveRecognizedText "c:\testoutput.txt"