vs2013 asprise OCR C # call Experience

Source: Internet
Author: User

In the past few days, the following ORC character recognition has been studied, and about three kinds of recognition methods have been learned:

1. Call Microsoft Office Document Imaging through Microsoft's controls.

2, is called through ASPRISEOCR

3, is tesseract ORC

I just touch programming soon, the basic skills are not good, go a lot of detours, first put some of their own experience to write down, keep the later review with

First of all, the ASPRISEOCR call, this is the free version of the official website, is called when the dialog box will pop up, let you visit the official website

Read the official website of the SDK, bullying me E is not good, probably can read the line

http://asprise.com/ocr/docs/html/asprise-ocr-library-csharp-vb.net-component.html# Option-1-pm-install-package-asprise-ocr-api

Download

instance files and API class libraries

Http://asprise.com/royalty-free-library/c%23-sharp.net-ocr-for-windows-mac-linux-download.html

Create a new C # project:

Import ASPRISE-OCR-API This project

Copy the demo folder inside the Aocr.dll, Aocr_x64.dll to the project directory

Add the following code to your new code:

UsingAsprise_ocr_api;Aspriseocr.SetUp();AspriseocrOcr=NewAspriseocr();Ocr.StartEngine("Eng",Aspriseocr.Speed_fastest);StringS=Ocr.Recognize("C:\path\img.jpg",-1, -1, -1, -1, -1, aspriseocr.  Recognize_type_all, aspriseocr.  Output_format_plaintext); Console.  WriteLine("OCR Result:" + s);  Process more images here ... OCR.  Stopengine();                 

Project completion

--------------------------------------------------------------------------------------------------------------- -----------------------------

Gorgeous separators

The following is a cracked version of the use of asprise

First download the cracked file from the Internet, containing three files: AspriseOCR.dll, DevIL.dll, ILU.dll.

Copy these 3 files to the directory where the executable files are generated, and the x86 platform settings are generated-----target platform on the project properties----.!!. Net 2.0 Platform

The 3 DLLs that need to be used are AspriseOCR.dll, DevIL.dll, ILU.dll.

It is important to note that these several. dll is the VC write reference to be used in the program with DllImport reference, the key code:

Introduce the following code at the beginning of the class:

[DllImport ("AspriseOCR.dll", EntryPoint = "OCR", CallingConvention = callingconvention.cdecl)]

public static extern IntPtr OCR (string file, int type);

[DllImport ("AspriseOCR.dll", EntryPoint = "Ocrpart", CallingConvention = callingconvention.cdecl)]

static extern IntPtr Ocrpart (string file, int type, int startX, int starty, int width, int height);

[DllImport ("AspriseOCR.dll", EntryPoint = "Ocrbarcodes", CallingConvention = callingconvention.cdecl)]

static extern IntPtr ocrbarcodes (string file, int type);

[DllImport ("AspriseOCR.dll", EntryPoint = "Ocrpartbarcodes", CallingConvention = callingconvention.cdecl)]

static extern IntPtr ocrpartbarcodes (string file, int type, int startX, int starty, int width, int height);

The calling code is simply one sentence:

MessageBox.Show (Marshal.ptrtostringansi (Ocrpart (Img_path,-1, StartX, starty, width, height)));

Where Img_path: For the picture path, StartX, starty coordinates are 0, width, height picture width and height.

How to hack tutorial reference: http://m.blog.csdn.net/blog/scys1217/19809855

vs2013 asprise OCR C # call Experience

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.