Skip to content

Commit 1db9482

Browse files
committed
Add info for progress monitor, make it visible in doxygen doc; remove commented code
1 parent c53add7 commit 1db9482

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

ccmain/control.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ bool Tesseract::RecogAllWordsPassN(int pass_n, ETEXT_DESC* monitor,
219219
if (monitor != NULL) {
220220
monitor->ocr_alive = TRUE;
221221
if (pass_n == 1) {
222-
// monitor->progress = 30 + 50 * w / words->size();
223222
monitor->progress = 70 * w / words->size();
224223
if (monitor->progress_callback != NULL) {
225224
TBOX box = pr_it->word()->word->bounding_box();

ccutil/ocrclass.h

+14-11
Original file line numberDiff line numberDiff line change
@@ -115,17 +115,20 @@ typedef bool (*PROGRESS_FUNC)(int progress,
115115

116116
class ETEXT_DESC { // output header
117117
public:
118-
inT16 count; // chars in this buffer(0)
119-
inT16 progress; // percent complete increasing (0-100)
120-
inT8 more_to_come; // true if not last
121-
volatile inT8 ocr_alive; // ocr sets to 1, HP 0
122-
inT8 err_code; // for errcode use
123-
CANCEL_FUNC cancel; // returns true to cancel
124-
PROGRESS_FUNC progress_callback; // called whenever progress increases
125-
void* cancel_this; // this or other data for cancel
126-
struct timeval end_time; // time to stop. expected to be set only by call
127-
// to set_deadline_msecs()
128-
EANYCODE_CHAR text[1]; // character data
118+
inT16 count; /// chars in this buffer(0)
119+
inT16 progress; /// percent complete increasing (0-100)
120+
/** Progress monitor covers word recognition and it does not cover layout
121+
* analysis.
122+
* See Ray comment in https://github.com/tesseract-ocr/tesseract/pull/27 */
123+
inT8 more_to_come; /// true if not last
124+
volatile inT8 ocr_alive; /// ocr sets to 1, HP 0
125+
inT8 err_code; /// for errcode use
126+
CANCEL_FUNC cancel; /// returns true to cancel
127+
PROGRESS_FUNC progress_callback; /// called whenever progress increases
128+
void* cancel_this; /// this or other data for cancel
129+
struct timeval end_time; /** time to stop. expected to be set only by call
130+
* to set_deadline_msecs() */
131+
EANYCODE_CHAR text[1]; /// character data
129132

130133
ETEXT_DESC() : count(0), progress(0), more_to_come(0), ocr_alive(0),
131134
err_code(0), cancel(NULL), cancel_this(NULL) {

0 commit comments

Comments
 (0)