-click the photo Project –> Properties (R) –> Configuration Properties –> Connector –> input –> Additional Dependencies –> Press the active solution configuration type add to the list in the following listing. "Additional Library" content:
Ws2_32.libUser32.libJpeg.libLiblept168.libLibpng.libLibtesseract302.libLibtiff.libZlib128-static-mtdll.libZlibstat.lib
Such as:At this point, the Tesseract API
In python, tesseract is called as an api to identify image verification codes,I. background
Previously, I introduced how to call the tesseract ocr engine in python. At that time, I mainly introduced the shell mode. In shell mode, the tesseract program needs to be installed, and the efficiency is relatively low.
Today w
Configuration and invocation time of the "Tesseract" Tesseract API in VS 2013:2016-05-31 20:35:19 Read:127 comments:0 Favorites:0 [Point I collection +] Label:To use the Tesseract library in VS, you must use a DLL that has been compiled with the corresponding VS version and Lib. For example, in VS 2013, you must use
Reprint Address: Http://www.jianshu.com/p/a53c732d8da3Tesseract-OCR Learning Series (c) Simple example tesseract API Basic Example using CMake ConfigurationReference Document: Https://github.com/tesseract-ocr/tesseract/wiki/APIExampleThe API provided by
Optical character recognition (ocr,optical Character recognition) refers to the process of scanning text data, and then analyzing and processing the image files to obtain the text and layout information. OCR technology is very professional, generally many printing, printing industry practitioners use, can quickly convert paper data into electronic data. About Chinese OCR, the current domestic level of Tsinghua Wen Tong, Han Wang, Shang Shu, its products are not the same, the price is not cheap.
Tesseract installation, tesseract
[1] direct Installation1) In Ubuntu 14.04, you can directly install the release package tesseract-ocrSudo apt-get install tesseract-ocrIn this way, the data files of the system are in/usr/share/tesseract-ocr/tessdata under/usr/bin (The eng p
1. Slave;
2. store all the files in the E: \ OCR \ tesseract_ocr3.02 folder and decompress them;
3. Open the Tesseract. sln project under the tesseract-ocr-3.02-vs2008 folder;
4. Copy the corresponding files under the tesseract-ocr-3.02.02 folder such as API, ccmain to E: \ OCR \ tesseract_ocr3.02 \
You can configure Tesseract to use tesseract for OCR. The C # version of opencv and opencv emgu both integrate the Tesseract tool.
However, misjudgment often occurs during use, such as recognizing "S" as "5" and "1" as "L" or "I ". You can set parameters to recognize characters in a specified range.
The following is the API
and then output. Here, the own trim () method and the length () method are invoked to do some corresponding processing.
About the Init () method, the official API introduction:
Instances are now mostly thread-safe and totally independent, but some global parameters >remain. Basically it is safe to use multiple Tessbaseapis in different threads in parallel, unless:you use setvariable on some of The Params in classify and Textord. If you do, then the e
Werd_choice to make mult-language handling easier.
Fixed problems with internally scaled images.
Added page and Bbox to string on TR files to identify source of training data better.
Fixes to Hindi Shiroreka Splitter.
Added word bigram correction.
Reduced stack memory consumption and eliminated some ugly typedefs.
Added new uniform classifier API.
Added New Training error counter.
Fixed endian bug in Dawg Reader.
C
Step 4 are completed, several files should be generated under the directory. The four files unicharset, inttemp, normproto, and pfftable should be prefixed with the training name "haijia .".
14. Run "combine_tessdata haijia." On the command line to merge the generated haijia. traineddata training file. After this step is completed, a haijia should be generated under the folder. traineddata file. This file is the training data file used for identification. You only need this haijia file. you can
:Java code
for (int y = miny; y
For (int x = MinX; x
int RGB = BUFFIMG.GETRGB (x, y);
Color color = new color (RGB);//R,g,b color is obtained according to the int value of RGB.
int value = 255-color.getblue ();
if (value > average) {
Color Newcolor = new Color (0, 0, 0);
Buffimg.setrgb (x, Y, Newcolor.getrgb ());
} Else {
Color Newcolor = new Color (255, 255, 255);
Buffimg.setrgb (x, Y, Newcolor.getrgb ());
}
}
}
ResultsSee how it works, eliminating the ste
());
}
}
Results3. Again is two value, take the average grayscale of the picture as the threshold value, below which all is 0, above this value all is 255:Java code
for (int y = miny; y
For (int x = MinX; x
int RGB = BUFFIMG.GETRGB (x, y);
Color color = new color (RGB);//R,g,b color is obtained according to the int value of RGB.
int value = 255-color.getblue ();
if (value > average) {
Color Newcolor = new Color (0, 0, 0);
Buffimg.setrgb (x, Y, Newcolor.getrgb ());
Installing TESSERACT-OCRPreparatory work:Compilation environment: GCC gcc-c++ make (this environment is common machine, can be ignored) ?
1
yum install gcc gcc-c++ make
Dependent packages: autoconf automake libtool libjpeg-devel libpng-devel libtiff-devel zlib-devel Leptonica (1.67 or more)1. autoconf automake libtool libjpeg-devel libpng-devel libtiff-devel Zlib-devel can be installed via Yum:?
12
yum install
Training Methods for tesseract 3 language data (to) classification: open-source 92 people read comments (0) report collection
Note: I have downloaded the source code from Google code. I have converted it into lib_debug and then generated dll_debug. So I copied it directly from E: \ buildfolder \ Tesseract-OCR \ vs2008 \ lib_debug.
Upload to E: \ buildfolder \ Tesseract
Introduction to the Ocr engine and installation of Tesseract in Python, tesseractocr1. Introduction to Tesseract
Tesseract is an open source ocr project supported by google. Its Project address is https://github.com/tesseract-ocr/tesseract. the latest source code can be down
The first one must be to download all the relevant code, GitHub is the most convenient https://github.com/tesseract-ocr/tesseractPoint 1, Cppan C + + Chinese Management Pack, very convenient, need to turn-wall, installation package also need. This should be popular, it will definitely fire, because it is too convenient, on Windows like Linux installed C + + dependencies, but also a cross-platform solution! (Https://raw.githubusercontent.com/cppan/bina
find more language packs here
Gzip-d eng.traineddata.gz
Move to the package installation directory. The default value is/usr/local/share/tessdata.
Mv eng. traineddata/usr/local/share/tessdata
Export TESSDATA_PREFIX =/usr/local/share/
Install the image format conversion tool because tesseract only recognizes images in tif format.
Apt-get install imagemagick
You can use the following command to convert the image
Convert a.jpg a. ti
DLL tesseract-3.02.02-win32-lib-include-dirs for Tesseract-OCR:Google-Tesseract-OCRDecompress the package, including the include folder and Lib folder, configure the header file and library file, and create a project for testing.# Include "baseapi. H"# Include "strngs. H"
# Pragma comment (Lib, "libtesseract302.lib ")
Char * STR = "test.jpg";
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.