Recognize Text from Images in C#/VB.NET Using OCR API

CnetSDK .NET OCR Library API for text recognition and extraction from JPG, JPEG, TIF, TIFF, PNG, BMP & GIF in C# & VB.NET applications.

 

CnetSDK .NET OCR Library Introduction

CnetSDK .NET OCR library incorporates the robust optical character recognition technology to solve your .NET/C#/VB.NET OCR programming problems, which helps you develop high-performance text recognition and document processing applications. This advanced OCR scanner SDK is a standalone .NET library that recognizes and extracts text rapidly without using other third party tools or .NET assemblies. It can deal with image source that is obtained directly from your local disk, or captured from the digital camera, mobile phone, and Twain devices.

Please firstly download free OCR SDK trial here. By simple adding project reference to our .NET OCR scanner library, you can use robust .NET OCR APIs for .NET, C# & VB.NET applications development. This .NET OCR scanner library is compatible with Microsoft Windows System, 32 or 64 bit, Visual Studio 2005 or above, and .NET Framework 4.0 or above.

 

C# OCR Scanning & Recognition Example 

The following C# code example is provided for your test. The target language is English. To fully test this .NET OCR library, you may see the full guide for using CnetSDK .NET OCR Library here.

C#
编辑脚本|Remove
// Create an OCR Engine instance. 
OcrEngine OCRLibrary = new OcrEngine(); 
 
// Set the absolute path of tessdata. 
OCRLibrary.TessDataPath = "F:/tessdata/"; 
 
// Set the target text language. 
OCRLibrary.TextLanguage = "eng"; 
 
// Recognize text from image file. 
string Imagetext = OCRLibrary.PerformOCR("F:\CnetSDK.jpg"); 
​ 
System.Console.WriteLine(Imagetext)

Please notewe provide .NET OCR solution for both x86 and x64 platforms. Please use suitable libraries. If you use x64 platform, please copy "CnetSDKOCR_Lept.dll" and "CnetSDKOCR_Tesseract.dll" from x64 folder to the same path of "CnetSDK.OCR.Trial.dll". For x86 platform, do it in the same way.

 

See More 

CnetSDK .NET OCR SDK also supports text extraction from multi-page TIFF file and zonal OCR scanning & recognition in your C# and VB.NET windows and ASP.NET web projects. Please see more online tutorials below.

Support Email: support@cnetsdk.com.