-
Notifications
You must be signed in to change notification settings - Fork 7
/
baseapi.h.patch
76 lines (69 loc) · 3.03 KB
/
baseapi.h.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
--- api/baseapi.h 2014-02-12 14:13:12.953775117 -0500
+++ /tmp/change/baseapi.h 2014-02-12 14:03:47.057750616 -0500
@@ -62,7 +62,7 @@
class CubeRecoContext;
class Dawg;
-class Dict;
+//class Dict;
class EquationDetect;
class PageIterator;
class LTRResultIterator;
@@ -73,6 +73,7 @@
class Trie;
class Wordrec;
+/*
typedef int (Dict::*DictFunc)(void* void_dawg_args,
UNICHAR_ID unichar_id, bool word_end) const;
typedef double (Dict::*ProbabilityInContextFunc)(const char* lang,
@@ -82,6 +83,7 @@
int character_bytes);
typedef float (Dict::*ParamsModelClassifyFunc)(
const char *lang, void *path);
+*/
typedef void (Wordrec::*FillLatticeFunc)(const MATRIX &ratings,
const WERD_CHOICE_LIST &best_choices,
const UNICHARSET &unicharset,
@@ -652,12 +654,12 @@
bool GetTextDirection(int* out_offset, float* out_slope);
/** Sets Dict::letter_is_okay_ function to point to the given function. */
- void SetDictFunc(DictFunc f);
+ //void SetDictFunc(DictFunc f);
/** Sets Dict::probability_in_context_ function to point to the given
* function.
*/
- void SetProbabilityInContextFunc(ProbabilityInContextFunc f);
+ //void SetProbabilityInContextFunc(ProbabilityInContextFunc f);
/** Sets Wordrec::fill_lattice_ function to point to the given function. */
void SetFillLatticeFunc(FillLatticeFunc f);
@@ -802,6 +804,9 @@
//// paragraphs.cpp ////////////////////////////////////////////////////
TESS_LOCAL void DetectParagraphs(bool after_text_recognition);
+ public:
+ PAGE_RES* page_res_; ///< The page-level data.
+
/**
* Extract the OCR results, costs (penalty points for uncertainty),
* and the bounding boxes of the characters.
@@ -813,7 +818,13 @@
int** y0,
int** x1,
int** y1,
- PAGE_RES* page_res);
+ char** char_4_coords,
+ int** char_x0,
+ int** char_y0,
+ int** char_x1,
+ int** char_y1,
+ PAGE_RES* page_res,
+ int chars_length);
TESS_LOCAL const PAGE_RES* GetPageRes() const {
return page_res_;
@@ -828,7 +839,7 @@
ImageThresholder* thresholder_; ///< Image thresholding module.
GenericVector<ParagraphModel *>* paragraph_models_;
BLOCK_LIST* block_list_; ///< The page layout.
- PAGE_RES* page_res_; ///< The page-level data.
+ //PAGE_RES* page_res_; ///< The page-level data.
STRING* input_file_; ///< Name used by training code.
Pix* input_image_; ///< Image used for searchable PDF
STRING* output_file_; ///< Name used by debug code.