tesseract
5.0.0-alpha-619-ge9db
ccutil.h
Go to the documentation of this file.
1
// File: ccutil.h
3
// Description: ccutil class.
4
// Author: Samuel Charron
5
//
6
// (C) Copyright 2006, Google Inc.
7
// Licensed under the Apache License, Version 2.0 (the "License");
8
// you may not use this file except in compliance with the License.
9
// You may obtain a copy of the License at
10
// http://www.apache.org/licenses/LICENSE-2.0
11
// Unless required by applicable law or agreed to in writing, software
12
// distributed under the License is distributed on an "AS IS" BASIS,
13
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
// See the License for the specific language governing permissions and
15
// limitations under the License.
16
//
18
19
#ifndef TESSERACT_CCUTIL_CCUTIL_H_
20
#define TESSERACT_CCUTIL_CCUTIL_H_
21
22
#ifndef _WIN32
23
#include <pthread.h>
24
#include <semaphore.h>
25
#endif
26
27
#ifndef DISABLED_LEGACY_ENGINE
28
#include "
ambigs.h
"
29
#endif
30
#include "
errcode.h
"
31
#ifdef _WIN32
32
#include "
host.h
"
// windows.h for HANDLE, ...
33
#endif
34
#include <
tesseract/strngs.h
>
35
#include "
params.h
"
36
#include "
unicharset.h
"
37
38
namespace
tesseract
{
39
40
class
CCUtil
{
41
public
:
42
CCUtil
();
43
virtual
~CCUtil
();
44
45
public
:
46
// Read the arguments and set up the data path.
47
void
main_setup
(
48
const
char
*argv0,
// program name
49
const
char
*basename
// name of image
50
);
51
ParamsVectors
*
params
() {
return
¶ms_; }
52
53
STRING
datadir
;
// dir for data files
54
STRING
imagebasename
;
// name of image
55
STRING
lang
;
56
STRING
language_data_path_prefix
;
57
UNICHARSET
unicharset
;
58
#ifndef DISABLED_LEGACY_ENGINE
59
UnicharAmbigs
unichar_ambigs
;
60
#endif
61
STRING
imagefile
;
// image file name
62
STRING
directory
;
// main directory
63
64
private
:
65
ParamsVectors
params_;
66
67
public
:
68
// Member parameters.
69
// These have to be declared and initialized after params_ member, since
70
// params_ should be initialized before parameters are added to it.
71
INT_VAR_H
(
ambigs_debug_level
, 0,
"Debug level for unichar ambiguities"
);
72
BOOL_VAR_H
(
use_ambigs_for_adaption
,
false
,
73
"Use ambigs for deciding whether to adapt to a character"
);
74
};
75
76
}
// namespace tesseract
77
78
#endif // TESSERACT_CCUTIL_CCUTIL_H_
strngs.h
tesseract::CCUtil::datadir
STRING datadir
Definition:
ccutil.h:53
tesseract::CCUtil::use_ambigs_for_adaption
bool use_ambigs_for_adaption
Definition:
ccutil.h:73
host.h
params.h
STRING
Definition:
strngs.h:45
tesseract::CCUtil::imagefile
STRING imagefile
Definition:
ccutil.h:61
tesseract::CCUtil::language_data_path_prefix
STRING language_data_path_prefix
Definition:
ccutil.h:56
tesseract::CCUtil::unicharset
UNICHARSET unicharset
Definition:
ccutil.h:57
unicharset.h
tesseract::CCUtil::ambigs_debug_level
int ambigs_debug_level
Definition:
ccutil.h:71
tesseract::CCUtil::CCUtil
CCUtil()
Definition:
ccutil.cpp:16
tesseract::UnicharAmbigs
Definition:
ambigs.h:136
UNICHARSET
Definition:
unicharset.h:145
tesseract::ParamsVectors
Definition:
params.h:56
tesseract::CCUtil::main_setup
void main_setup(const char *argv0, const char *basename)
CCUtil::main_setup - set location of tessdata and name of image.
Definition:
mainblk.cpp:58
tesseract::CCUtil::lang
STRING lang
Definition:
ccutil.h:55
tesseract
Definition:
baseapi.h:65
tesseract::CCUtil::directory
STRING directory
Definition:
ccutil.h:62
INT_VAR_H
#define INT_VAR_H(name, val, comment)
Definition:
params.h:292
tesseract::CCUtil::params
ParamsVectors * params()
Definition:
ccutil.h:51
tesseract::CCUtil::unichar_ambigs
UnicharAmbigs unichar_ambigs
Definition:
ccutil.h:59
tesseract::CCUtil::~CCUtil
virtual ~CCUtil()
BOOL_VAR_H
#define BOOL_VAR_H(name, val, comment)
Definition:
params.h:294
errcode.h
ambigs.h
tesseract::CCUtil::imagebasename
STRING imagebasename
Definition:
ccutil.h:54
tesseract::CCUtil
Definition:
ccutil.h:40
src
ccutil
ccutil.h
Generated on Thu Jan 30 2020 14:22:20 for tesseract by
1.8.16