Tesseract
3.02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
pgedit.h
Go to the documentation of this file.
1
2
// File: pgedit.h
3
// Description: Page structure file editor
4
// Author: Joern Wanke
5
// Created: Wed Jul 18 10:05:01 PDT 2007
6
//
7
// (C) Copyright 2007, Google Inc.
8
// Licensed under the Apache License, Version 2.0 (the "License");
9
// you may not use this file except in compliance with the License.
10
// You may obtain a copy of the License at
11
// http://www.apache.org/licenses/LICENSE-2.0
12
// Unless required by applicable law or agreed to in writing, software
13
// distributed under the License is distributed on an "AS IS" BASIS,
14
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
// See the License for the specific language governing permissions and
16
// limitations under the License.
17
//
19
20
#ifndef PGEDIT_H
21
#define PGEDIT_H
22
23
#include "
ocrblock.h
"
24
#include "
ocrrow.h
"
25
#include "
werd.h
"
26
#include "
rect.h
"
27
#include "
params.h
"
28
#include "
notdll.h
"
29
#include "
tesseractclass.h
"
30
31
class
ScrollView
;
32
class
SVMenuNode
;
33
struct
SVEvent
;
34
35
// A small event handler class to process incoming events to
36
// this window.
37
class
PGEventHandler
:
public
SVEventHandler
{
38
public
:
39
PGEventHandler
(
tesseract::Tesseract
* tess) : tess_(tess) {
40
}
41
void
Notify
(
const
SVEvent
* sve);
42
private
:
43
tesseract::Tesseract
* tess_;
44
};
45
46
extern
BLOCK_LIST *
current_block_list
;
47
extern
STRING_VAR_H
(
editor_image_win_name
,
"EditorImage"
,
48
"Editor image window name"
);
49
extern
INT_VAR_H
(
editor_image_xpos
, 590,
"Editor image X Pos"
);
50
extern
INT_VAR_H
(
editor_image_ypos
, 10,
"Editor image Y Pos"
);
51
extern
INT_VAR_H
(editor_image_height, 680,
"Editor image height"
);
52
extern
INT_VAR_H
(editor_image_width, 655,
"Editor image width"
);
53
extern
INT_VAR_H
(
editor_image_word_bb_color
, BLUE,
54
"Word bounding box colour"
);
55
extern
INT_VAR_H
(
editor_image_blob_bb_color
, YELLOW,
56
"Blob bounding box colour"
);
57
extern
INT_VAR_H
(
editor_image_text_color
, WHITE,
"Correct text colour"
);
58
extern
STRING_VAR_H
(
editor_dbwin_name
,
"EditorDBWin"
,
59
"Editor debug window name"
);
60
extern
INT_VAR_H
(
editor_dbwin_xpos
, 50,
"Editor debug window X Pos"
);
61
extern
INT_VAR_H
(
editor_dbwin_ypos
, 500,
"Editor debug window Y Pos"
);
62
extern
INT_VAR_H
(
editor_dbwin_height
, 24,
"Editor debug window height"
);
63
extern
INT_VAR_H
(
editor_dbwin_width
, 80,
"Editor debug window width"
);
64
extern
STRING_VAR_H
(
editor_word_name
,
"BlnWords"
,
65
"BL normalised word window"
);
66
extern
INT_VAR_H
(
editor_word_xpos
, 60,
"Word window X Pos"
);
67
extern
INT_VAR_H
(
editor_word_ypos
, 510,
"Word window Y Pos"
);
68
extern
INT_VAR_H
(
editor_word_height
, 240,
"Word window height"
);
69
extern
INT_VAR_H
(
editor_word_width
, 655,
"Word window width"
);
70
extern
double_VAR_H
(editor_smd_scale_factor, 1.0,
"Scaling for smd image"
);
71
72
ScrollView
*
bln_word_window_handle
();
//return handle
73
void
build_image_window
(
int
width,
int
height);
74
void
display_bln_lines
(
ScrollView
window,
75
ScrollView::Color
colour,
76
float
scale_factor,
77
float
y_offset,
78
float
minx,
79
float
maxx);
80
//function to call
81
void
pgeditor_msg
(
//message display
82
const
char
*msg);
83
void
pgeditor_show_point
(
//display coords
84
SVEvent
*event);
85
//put bln word in box
86
void
show_point
(
PAGE_RES
* page_res,
float
x,
float
y);
87
88
#endif
mnt
data
src
tesseract-ocr
ccmain
pgedit.h
Generated on Thu Nov 1 2012 20:19:43 for Tesseract by
1.8.1