Tesseract  3.02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
wordseg.h
Go to the documentation of this file.
1 /**********************************************************************
2  * File: wordseg.h (Formerly wspace.h)
3  * Description: Code to segment the blobs into words.
4  * Author: Ray Smith
5  * Created: Fri Oct 16 11:32:28 BST 1992
6  *
7  * (C) Copyright 1992, Hewlett-Packard Ltd.
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  *
18  **********************************************************************/
19 
20 #ifndef WORDSEG_H
21 #define WORDSEG_H
22 
23 #include "params.h"
24 #include "blobbox.h"
25 #include "notdll.h"
26 #include "textord.h"
27 
28 namespace tesseract {
29 class Tesseract;
30 }
31 
32 extern BOOL_VAR_H (textord_fp_chopping, TRUE, "Do fixed pitch chopping");
34  "Force proportional word segmentation on all rows");
36  "Chopper is being tested.");
37 
38 void make_single_word(bool one_blob, TO_ROW_LIST *rows, ROW_LIST* real_rows);
39 void make_words(tesseract::Textord *textord,
40  ICOORD page_tr, // top right
41  float gradient, // page skew
42  BLOCK_LIST *blocks, // block list
43  TO_BLOCK_LIST *port_blocks); // output list
44 void set_row_spaces( //find space sizes
45  TO_BLOCK *block, //block to do
46  FCOORD rotation, //for drawing
47  BOOL8 testing_on //correct orientation
48  );
49 inT32 row_words( //compute space size
50  TO_BLOCK *block, //block it came from
51  TO_ROW *row, //row to operate on
52  inT32 maxwidth, //max expected space size
53  FCOORD rotation, //for drawing
54  BOOL8 testing_on //for debug
55  );
56 inT32 row_words2( //compute space size
57  TO_BLOCK *block, //block it came from
58  TO_ROW *row, //row to operate on
59  inT32 maxwidth, //max expected space size
60  FCOORD rotation, //for drawing
61  BOOL8 testing_on //for debug
62  );
63 void make_real_words(
64  tesseract::Textord *textord,
65  TO_BLOCK *block, //block to do
66  FCOORD rotation //for drawing
67  );
68 ROW *make_rep_words( //make a row
69  TO_ROW *row, //row to convert
70  TO_BLOCK *block //block it lives in
71  );
72 WERD *make_real_word( //make a WERD
73  BLOBNBOX_IT *box_it, //iterator
74  inT32 blobcount, //no of blobs to use
75  BOOL8 bol, //start of line
76  uinT8 blanks //no of blanks
77  );
78 #endif
void set_row_spaces(TO_BLOCK *block, FCOORD rotation, BOOL8 testing_on)
Definition: wordseg.cpp:135
#define BOOL_VAR_H(name, val, comment)
Definition: params.h:239
unsigned char BOOL8
Definition: host.h:113
void make_single_word(bool one_blob, TO_ROW_LIST *rows, ROW_LIST *real_rows)
Definition: wordseg.cpp:61
int inT32
Definition: host.h:102
void make_words(tesseract::Textord *textord, ICOORD page_tr, float gradient, BLOCK_LIST *blocks, TO_BLOCK_LIST *port_blocks)
Definition: wordseg.cpp:105
#define FALSE
Definition: capi.h:28
bool textord_force_make_prop_words
Definition: wordseg.cpp:46
inT32 row_words(TO_BLOCK *block, TO_ROW *row, inT32 maxwidth, FCOORD rotation, BOOL8 testing_on)
Definition: wordseg.cpp:187
WERD * make_real_word(BLOBNBOX_IT *box_it, inT32 blobcount, BOOL8 bol, uinT8 blanks)
Definition: wordseg.cpp:611
bool textord_chopper_test
Definition: wordseg.cpp:48
ROW * make_rep_words(TO_ROW *row, TO_BLOCK *block)
Definition: wordseg.cpp:572
Definition: ocrrow.h:32
bool textord_fp_chopping
Definition: wordseg.cpp:44
inT32 row_words2(TO_BLOCK *block, TO_ROW *row, inT32 maxwidth, FCOORD rotation, BOOL8 testing_on)
Definition: wordseg.cpp:360
void make_real_words(tesseract::Textord *textord, TO_BLOCK *block, FCOORD rotation)
Definition: wordseg.cpp:516
Definition: points.h:189
Definition: werd.h:60
integer coordinate
Definition: points.h:30
unsigned char uinT8
Definition: host.h:99
#define TRUE
Definition: capi.h:27