tesseract
v5.3.3.20231005
gap_map.h
Go to the documentation of this file.
1
// Licensed under the Apache License, Version 2.0 (the "License");
2
// you may not use this file except in compliance with the License.
3
// You may obtain a copy of the License at
4
// http://www.apache.org/licenses/LICENSE-2.0
5
// Unless required by applicable law or agreed to in writing, software
6
// distributed under the License is distributed on an "AS IS" BASIS,
7
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
// See the License for the specific language governing permissions and
9
// limitations under the License.
10
11
#ifndef GAP_MAP_H
12
#define GAP_MAP_H
13
14
#include "
blobbox.h
"
15
16
namespace
tesseract
{
17
18
class
GAPMAP
{
19
public
:
20
GAPMAP
(
// constructor
21
TO_BLOCK
*block);
22
23
~GAPMAP
() {
// destructor
24
delete
[] map;
25
}
26
27
bool
table_gap
(
// Is gap a table?
28
int16_t left,
// From here
29
int16_t right);
// To here
30
31
private
:
32
int16_t total_rows;
// in block
33
int16_t min_left;
// Left extreme
34
int16_t max_right;
// Right extreme
35
int16_t bucket_size;
// half an x ht
36
int16_t *map;
// empty counts
37
int16_t map_max;
// map[0..max_map] defined
38
bool
any_tabs;
39
};
40
41
/*-----------------------------*/
42
43
extern
BOOL_VAR_H
(
gapmap_debug
);
44
extern
BOOL_VAR_H
(
gapmap_use_ends
);
45
extern
BOOL_VAR_H
(
gapmap_no_isolated_quanta
);
46
extern
double_VAR_H
(
gapmap_big_gaps
);
47
48
}
// namespace tesseract
49
50
#endif
blobbox.h
tesseract
Definition:
baseapi.h:39
tesseract::gapmap_no_isolated_quanta
bool gapmap_no_isolated_quanta
Definition:
gap_map.cpp:19
tesseract::gapmap_big_gaps
double gapmap_big_gaps
Definition:
gap_map.cpp:20
tesseract::gapmap_use_ends
bool gapmap_use_ends
Definition:
gap_map.cpp:18
tesseract::double_VAR_H
double_VAR_H(classify_min_slope)
tesseract::gapmap_debug
bool gapmap_debug
Definition:
gap_map.cpp:17
tesseract::BOOL_VAR_H
BOOL_VAR_H(wordrec_display_splits)
tesseract::TO_BLOCK
Definition:
blobbox.h:698
tesseract::GAPMAP
Definition:
gap_map.h:18
tesseract::GAPMAP::GAPMAP
GAPMAP(TO_BLOCK *block)
Definition:
gap_map.cpp:36
tesseract::GAPMAP::table_gap
bool table_gap(int16_t left, int16_t right)
Definition:
gap_map.cpp:166
tesseract::GAPMAP::~GAPMAP
~GAPMAP()
Definition:
gap_map.h:23
src
textord
gap_map.h
Generated on Thu Oct 5 2023 22:10:26 for tesseract by
1.9.4