编译Tesseract OCR 1.03
来源:互联网 发布:linux ip转发 编辑:程序博客网 时间:2024/05/21 08:48
原先是HP写的,现在Open source了。支持英文字母和数字。据说辨识程度是世界排名第三的。http://sourceforge.net/projects/tesseract-ocr
Linux下编译:
configure
make
make install
发现错误:
分为2中错误
第一种是关于符号转换的bug,const char* 转换 char* 错误,经常发生在str××××相关函数,解决方法--将第一个参数用(char*)强制转换一下。
第二中错误是发生在C++代码引用C代码的问题上,解决方法如下
11111111111111111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111111111111111111
# diff -C 3 ./cutil/globals.h~ ./cutil/globals.h
*** ./cutil/globals.h~ 2007-05-15 20:13:26.000000000 -0500
--- ./cutil/globals.h 2007-06-16 04:27:42.000000000 -0500
***************
*** 45,53 ****
extern int debugs[MAXPROC]; /*debug flags */
extern int plots[MAXPROC]; /*plot flags */
extern int corners[4]; /*corners of scan window */
extern int optind; /*option index */
extern char *optarg; /*option argument */
! /*image file name */
extern char imagefile[FILENAMESIZE];
/* main directory */
extern char directory[FILENAMESIZE];
--- 45,58 ----
extern int debugs[MAXPROC]; /*debug flags */
extern int plots[MAXPROC]; /*plot flags */
extern int corners[4]; /*corners of scan window */
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
extern int optind; /*option index */
extern char *optarg; /*option argument */
! #ifdef __cplusplus
! }
! #endif /*image file name */
extern char imagefile[FILENAMESIZE];
/* main directory */
extern char directory[FILENAMESIZE];
2222222222222222222222222222222222222222222222222222222222222222
2222222222222222222222222222222222222222222222222222222222222222
# diff -C 3 ./cutil/tordvars.h~ ./cutil/tordvars.h
*** ./cutil/tordvars.h~ 2007-05-16 16:33:53.000000000 -0500
--- ./cutil/tordvars.h 2007-06-16 04:25:43.000000000 -0500
***************
*** 39,44 ****
--- 39,46 ----
extern FILE *correct_fp; //correct text
extern FILE *matcher_fp;
+ extern "C"
+ {
extern int blob_skip; /* Skip to next selection */
extern int num_word_choices; /* How many words to keep */
extern int similarity_enable; /* Switch for Similarity */
***************
*** 50,55 ****
--- 52,58 ----
extern int show_bold; /* Use bold text */
extern int display_text; /* Show word text */
extern int display_blocks; /* Show word as boxes */
+ }
extern float overlap_threshold; /* Overlap Threshold */
extern float certainty_threshold; /* When to quit looking */
测试:
执行例子图像文件tesseract.exe phototest.tif abc batch
输出结果在abc.txt,识别率竟然是100%。当然你自己做的图片就不一定有这么高。
- 编译Tesseract OCR 1.03
- 【OCR】CentOS7下编译安装tesseract-ocr
- Ubuntu下手动编译Tesseract-ocr
- VS2010编译使用Tesseract OCR 静态库
- 如何在windows上编译Tesseract OCR
- CentOS下编译安装tesseract-ocr
- Ubuntu16.04 编译OpenCV 和 Tesseract-OCR
- 在vs2013上的编译tesseract-ocr
- Tesseract-OCR编译及ViewerDebugging使用
- tesseract-ocr编译和帮助文档
- CentOS7下编译安装tesseract-ocr
- Tesseract-OCR 从编译到集成
- Visual Studio 2013、TortoiseSVN、TortoiseGit、msysgit编译Tesseract(tesseract-ocr)
- tesseract-ocr
- ocr tesseract
- Tesseract OCR
- Tesseract OCR
- tesseract ocr
- JTable常见用法细则
- javascript学习随笔(使用window和frame)的技巧
- spring中idref元素元素使用
- Tracepro 中LED光源模型建立(英文
- RTP报文格式
- 编译Tesseract OCR 1.03
- google 广告条代码
- Android内核的大致分析
- Ansoft Designer v4.0 -ISO 1CD(电子电磁仿真)
- 网页的导航
- 测试
- 朋友是永远的财富
- SQL2005装后,在装SQL2000
- 基于.net开发平台项目案例集锦 [转]