Starting and Shutting Down the OCR Engine

Show in webframe

To begin using the LEADTOOLS for .NET OCR class library, the user must create an instance of the IOcrEngine" interface, this is done with the OcrEngineManager.CreateEngine method and is explained in Creating an OCR Engine Instance. After the instance is obtained, it must be initialized by calling the IOcrEngine.Startup method. This method must be called before calling any other LEADTOOLS OCR methods.

Once the IOcrEngine.Startup method has been called, you may opt to load engine settings saved in a file into the engine. To load saved settings from a file or a .NET stream, call IOcrSettingManager.Load. The instance of the setting manager associated with the engine is accessed through the IOcrEngine.SettingManager">IOcrEngine.SettingManager property. To save engine settings into a file or a .NET stream for later use, call IOcrSettingManager.Save.

When the OCR engine instance is no longer needed, the user must close the instance calling the IOcrEngine.Shutdown method. This will free all internal resources allocated by this engine instance. At this point the IOcrEngine" instance becomes invalid. Before recognizing any more pages, the user must establish a new IOcrEngine" instance by calling IOcrEngine.Startup again.

Notice that the IOcrEngine interface also implements .NET IDisposable, hence it is recommended to call the IOcrEngine.Dispose method after the instance is longer in use (or through the use of the C# using or Visual Basic Using keywords). IOcrEngine.Dispose will automatically call IOcrEngine.Shutdown if it has not been called on this instance.


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.