Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#1 Posted : Friday, August 25, 2017 11:33:34 AM(UTC)


Groups: Registered, Tech Support, Administrators
Posts: 153

Was thanked: 9 time(s) in 9 post(s)

This tutorial shows how to implement the BankCheckReader in Visual Studio.

1. Start Visual Studio.

2. Choose File -> New -> Project from the menu

3. Choose "Console Application" in the templates list.

4. Type "CheckReaderDemo" in the project name field. Change the Location if desired by clicking the Browse button. Then choose OK.

5. In the "Solution Explorer" window, right-click on the "References" folder, and select "Add Reference..." from the context menu. In the Add Reference dialog box, select the ".NET" tab and browse to the "C:\LEADTOOLS 19\Bin\DotNet\Win32" folder (or "C:\LEADTOOLS 19\Bin\DotNet4\Win32" if you are going to use .NET 4) and select the following DLLs:

  • Leadtools.dll
  • Leadtools.Codecs.dll
  • Leadtools.Codecs.Cmp.dll
  • Leadtools.Forms.Commands.dll
  • Leadtools.Forms.DocumentWriters.dll
  • Leadtools.Forms.Ocr.dll
  • Leadtools.Forms.Ocr.Advantage.dll

Click the Select button and then press the OK button to add the above DLLs to the application.

6. Add the following lines of code at the beginning of the Program.cs file:


using Leadtools;
using Leadtools.Codecs;
using Leadtools.Forms.Commands;
using Leadtools.Forms.Ocr;

7. In the Main() method, add the following initialization code, changing the placeholder values to the actual location and value of the license and developer key.


	string MY_LICENSE_FILE = "d:\\temp\\TestLic.lic"; 
	string MY_DEVELOPER_KEY = "xyz123abc"; 
	string chequePath =  @"C:\Users\Public\Documents\LEADTOOLS Images\BankCheck.jpg";
	RasterCodecs codecs = new RasterCodecs();
	RasterImage image;
	BankCheckReader chequeReader = new BankCheckReader();

8. Add the following lines of code to load and read the check image.


         using (IOcrEngine engine = OcrEngineManager.CreateEngine(OcrEngineType.Advantage, false))
            engine.Startup(codecs, null, null, null);
            chequeReader.OcrEngine = engine;



9. Add the following lines of code to display the results to the console.


         foreach (KeyValuePair<string, BankCheckField> kvp in chequeReader.Results)
            Console.WriteLine(kvp.Key + "\t\t" + kvp.Value.Text);

10. Finally, add the following lines of code for clean-up.



11. Build, run, and test the program. The detected information will be printed in the console window. Press Enter to close and exit the program.
Nick Crook
Developer Support Engineer
LEAD Technologies, Inc.

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2023, Yet Another Forum.NET
This page was generated in 0.033 seconds.