资源简介
tesseract最新最全资料.rar
代码片段和文件信息
// baseapitester.cpp : Defines the entry point for the console application.
//
#include “stdafx.h“
#define _(x) (x)
int _tmain(int argc _TCHAR* argv[])
{
if ((argc == 2 && strcmp(argv[1] “-v“) == 0) ||
(argc == 2 && strcmp(argv[1] “--version“) == 0)) {
fprintf(stderr “tesseract %s\n“ tesseract::TessbaseAPI::Version());
exit(0);
}
// Make the order of args a bit more forgiving than it used to be.
const char* lang = “eng“;
const char* image = NULL;
const char* output = NULL;
tesseract::PageSegMode pagesegmode = tesseract::PSM_AUTO;
int arg = 1;
while (arg < argc && (output == NULL || argv[arg][0] == ‘-‘)) {
if (strcmp(argv[arg] “-l“) == 0 && arg + 1 < argc) {
lang = argv[arg + 1];
++arg;
} else if (strcmp(argv[arg] “-psm“) == 0 && arg + 1 < argc) {
pagesegmode = static_cast(atoi(argv[arg + 1]));
++arg;
} else if (image == NULL) {
image = argv[arg];
} else if (output == NULL) {
output = argv[arg];
}
++arg;
}
if (output == NULL) {
fprintf(stderr _(“Usage:%s imagename outputbase [-l lang] “
“[-psm pagesegmode] [configfile...]\n“) argv[0]);
fprintf(stderr
_(“pagesegmode values are:\n“
“0 = Orientation and script detection (OSD) only.\n“
“1 = Automatic page segmentation with OSD.\n“
“2 = Automatic page segmentation but no OSD or OCR\n“
“3 = Fully automatic page segmentation but no OSD. (Default)\n“
“4 = Assume a single column of text of variable sizes.\n“
“5 = Assume a single uniform block of vertically aligned text.\n“
“6 = Assume a single uniform block of text.\n“
“7 = Treat the image as a single text line.\n“
“8 = Treat the image as a single word.\n“
“9 = Treat the image as a single word in a circle.\n“
“10 = Treat the image as a single character.\n“));
fprintf(stderr _(“-l lang and/or -psm pagesegmode must occur before any“
“configfile.\n“));
exit(1);
}
tesseract::TessbaseAPI api;
api.SetOutputName(output);
api.Init(argv[0] lang tesseract::OEM_DEFAULT
&(argv[arg]) argc - arg NULL NULL false);
// We have 2 possible sources of pagesegmode: a config file and
// the command line. For backwards compatability reasons the
// default in tesseract is tesseract::PSM_SINGLE_BLOCK but the
// default for this program is tesseract::PSM_AUTO. We will let
// the config file take priority so the command-line default
// can take priority over the tesseract default so we use the
// value from the command line only if the retrieved mode
// is still tesseract::PSM_SINGLE_BLOCK indicating no change
// in any config file. Therefore the only way to force
// tesseract::PSM_SINGLE_BLOCK is from the command line.
// It would be simpler if we could set the value before Init
// but that doesn‘t work.
if (api.GetPageSegMode() == tesseract::PSM_SINGLE_BLOCK)
api.SetPageSegMode(pagesegmode);
printf(“Tesseract Open Source OCR Engine v%s
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 12282880 2015-04-15 14:47 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\APIExample\APIExample.ncb
文件 1384 2015-04-15 11:23 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\APIExample\APIExample.sln
..A..H. 11264 2015-04-15 14:47 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\APIExample\APIExample.suo
文件 4001 2015-04-15 11:23 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\APIExample\ba
文件 2375 2015-04-15 11:23 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\APIExample\ba
文件 11351 2015-04-15 11:23 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\APIExample\ba
文件 2645 2015-04-15 14:47 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\APIExample\ba
文件 7690 2015-04-15 14:35 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\APIExample\ba
文件 407 2015-04-15 11:23 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\APIExample\ba
文件 300 2015-04-15 11:23 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\APIExample\ba
文件 386 2015-04-15 11:23 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\APIExample\ba
文件 765 2015-04-15 11:23 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\APIExample\ba
文件 14474 2015-04-15 09:52 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\include\gif_lib.h
文件 1378 2015-04-15 09:52 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\include\jconfig.h
文件 14885 2015-04-15 09:52 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\include\jerror.h
文件 13085 2015-04-15 09:52 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\include\jmorecfg.h
文件 49724 2015-04-15 09:52 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\include\jpeglib.h
文件 1191 2015-04-15 09:52 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\include\leptonica\allheaders.h
文件 1539 2015-04-15 09:52 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\include\leptonica\alltypes.h
文件 4443 2015-04-15 09:52 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\include\leptonica\array.h
文件 7689 2015-04-15 09:52 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\include\leptonica\arrayaccess.h
文件 2038 2015-04-15 09:52 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\include\leptonica\bbuffer.h
文件 2475 2015-04-15 09:52 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\include\leptonica\bmf.h
文件 3638 2015-04-15 09:52 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\include\leptonica\bmp.h
文件 4766 2015-04-15 09:52 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\include\leptonica\ccbord.h
文件 2944 2015-04-15 09:52 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\include\leptonica\dewarp.h
文件 10588 2015-04-15 09:52 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\include\leptonica\environ.h
文件 1100 2015-04-15 09:52 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\include\leptonica\freetype.h
文件 2913 2015-04-15 09:52 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\include\leptonica\gplot.h
文件 3642 2015-04-15 09:52 BuildFolder(tesseract_leptonica_lib_APIExamples全部内容)\include\leptonica\heap.h
............此处省略1736个文件信息
- 上一篇:通信原理第五版-樊昌信
- 下一篇:UNIX网络编程卷2:进程间通信第2版.pdf
相关资源
- 大话数据结构.epub
- iBATIS实战.pdf
- zw_new_smile-7110337-ImageAnimationTest.zip
- zw_jhn199388-9911706-基于51单片机都_自动
- zw_fan7983377-9600053-RecyclerViewDemo.zip
- zw_CHINA__.zip
- 我的第一本算法书+算法图解.zip
- 数学物理方法_德顾樵编著_2012.01_545页
- zw_WKTConvert.zip
- tdxw.exe
- zw_LabVIEW_8.20程序设计从入门到精通.
- zw_20170105220330215.zip
- unlocker-master最新版.rar
- Nginx核心知识100讲全套课件.zip
- navicat.11.2.16.premium_cs_x64破解版.zip
- 凸优化_Boyd_王书宁译.rar
- 云盘.rar
- Xshell5.exe
- 20170121135652618.rar
- DiskGenius4.7.0专业版.rar
- AlphaControlsv11.16StableFullSource(D5和D10
- 雅奇880官方开源赠品30多个雅奇4.rar
- 2009_LabVIEW编程样式_清晰版.pdf
- tiger_newhu5.99.24.zip
- 大数据架构详解:从数据获取到深度
- 程序是怎样跑起来的_PDF电子书带书签
- MongodbSample.rar
- EtherCATSlaveStackCodeTool5.12.rar
- 重构_改善既有代码的设计.rar
- 矩阵分析与应用第二版高清带书签.
评论
共有 条评论