In my project I have to read the numbers from the image(.jpg or .tiff). After googling a lot, I came to know about the open OCR i.e., Tesseract OCR. Am begginer for Tesseract OCR, I read all the documentation of tesseract & how to use it in Visual studio. Bascically am facing some problem in using tesseract... I followed the steps like this:
1) Downloaded & Installed tesseract-ocr-setup-3.02.02.exe from http://code.google.com/p/tesseract-ocr/downloads/detail?name=tesseract-ocr-setup-3.02.02.exe
2)Open up Microsoft Visual Studio 2008 and go to Tools -> Options
Project solutions -> VC++ Directories -> Show directories for include files
Добавьте:
C:\Program Files\Tesseract-OCR\include
C:\Program Files\Tesseract-OCR\include\tesseract
C:\Program Files\Tesseract-OCR\include\leptonica
3) Next click show directories for -> Library Files
Add:
C:\Program Files\Tesseract-OCR\lib
4) Configure linker options for Tesseract
Right click your project in solution explorer and click properties
Configuration Properties -> Linker->Input ->Additional Dependencies
Add this in there:
libtesseract302.lib
libtesseract302d.lib
liblept168.lib
liblept168d.lib
5) Скопируйте liblept168.dll, liblept168d.dll, libtesseract302.dll и libtesseract302.dll от C:\Program Files\Tesseract-OCR\ в вашу папку проекта
6) исходный файл main.cpp похож на это:
#include
#include
#include
using namespace std;
int main(void){
tesseract::TessBaseAPI api;
api.Init("", "eng", tesseract::OEM_DEFAULT);
api.SetPageSegMode(static_cast(7));
api.SetOutputName("out");
cout<<"File name:";
char image[256];
cin>>image;
PIX *pixs = pixRead(image);
STRING text_out;
api.ProcessPages(image, NULL, 0, &text_out);
cout<
The problem is am unable to compile this code.. Am getting linker error i.e., LINK : fatal error LNK1181: cannot open input file 'libtesseract302.lib'.
As I downloaded Tesseract OCR. In Tesseract-OCR\lib am not finding libtesseract302.dll and libtesseract302.dll files.. Am able to see only liblept168.dll, liblept168d.dll files.
I tried to searching for libtesseract302.lib & libtesseract302.dll but am not getting anything.
Am totally struck up at this point.
If anyone has used Tesseract OCR, please suggest me on this.
Спасибо всем..