All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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  **
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  **********************************************************************/
20 #ifndef WORDSEG_H
21 #define WORDSEG_H
23 #include "params.h"
24 #include "blobbox.h"
25 #include "textord.h"
27 namespace tesseract {
28 class Tesseract;
29 }
31 extern BOOL_VAR_H (textord_fp_chopping, TRUE, "Do fixed pitch chopping");
33  "Force proportional word segmentation on all rows");
35  "Chopper is being tested.");
37 void make_single_word(bool one_blob, TO_ROW_LIST *rows, ROW_LIST* real_rows);
38 void make_words(tesseract::Textord *textord,
39  ICOORD page_tr, // top right
40  float gradient, // page skew
41  BLOCK_LIST *blocks, // block list
42  TO_BLOCK_LIST *port_blocks); // output list
43 void set_row_spaces( //find space sizes
44  TO_BLOCK *block, //block to do
45  FCOORD rotation, //for drawing
46  BOOL8 testing_on //correct orientation
47  );
48 inT32 row_words( //compute space size
49  TO_BLOCK *block, //block it came from
50  TO_ROW *row, //row to operate on
51  inT32 maxwidth, //max expected space size
52  FCOORD rotation, //for drawing
53  BOOL8 testing_on //for debug
54  );
55 inT32 row_words2( //compute space size
56  TO_BLOCK *block, //block it came from
57  TO_ROW *row, //row to operate on
58  inT32 maxwidth, //max expected space size
59  FCOORD rotation, //for drawing
60  BOOL8 testing_on //for debug
61  );
62 void make_real_words(
63  tesseract::Textord *textord,
64  TO_BLOCK *block, //block to do
65  FCOORD rotation //for drawing
66  );
67 ROW *make_rep_words( //make a row
68  TO_ROW *row, //row to convert
69  TO_BLOCK *block //block it lives in
70  );
71 WERD *make_real_word( //make a WERD
72  BLOBNBOX_IT *box_it, //iterator
73  inT32 blobcount, //no of blobs to use
74  BOOL8 bol, //start of line
75  uinT8 blanks //no of blanks
76  );
77 #endif
void make_words(tesseract::Textord *textord, ICOORD page_tr, float gradient, BLOCK_LIST *blocks, TO_BLOCK_LIST *port_blocks)
Definition: wordseg.cpp:104
inT32 row_words(TO_BLOCK *block, TO_ROW *row, inT32 maxwidth, FCOORD rotation, BOOL8 testing_on)
Definition: wordseg.cpp:178
WERD * make_real_word(BLOBNBOX_IT *box_it, inT32 blobcount, BOOL8 bol, uinT8 blanks)
Definition: wordseg.cpp:594
inT32 row_words2(TO_BLOCK *block, TO_ROW *row, inT32 maxwidth, FCOORD rotation, BOOL8 testing_on)
Definition: wordseg.cpp:351
void make_real_words(tesseract::Textord *textord, TO_BLOCK *block, FCOORD rotation)
Definition: wordseg.cpp:506
unsigned char BOOL8
Definition: host.h:113
Definition: ocrrow.h:32
void make_single_word(bool one_blob, TO_ROW_LIST *rows, ROW_LIST *real_rows)
Definition: wordseg.cpp:60
bool textord_fp_chopping
Definition: wordseg.cpp:43
bool textord_force_make_prop_words
Definition: wordseg.cpp:45
void set_row_spaces(TO_BLOCK *block, FCOORD rotation, BOOL8 testing_on)
Definition: wordseg.cpp:134
ROW * make_rep_words(TO_ROW *row, TO_BLOCK *block)
Definition: wordseg.cpp:562
Definition: werd.h:60
integer coordinate
Definition: points.h:30
#define FALSE
Definition: capi.h:29
#define TRUE
Definition: capi.h:28
bool textord_chopper_test
Definition: wordseg.cpp:47
#define BOOL_VAR_H(name, val, comment)
Definition: params.h:268
Definition: points.h:189
int inT32
Definition: host.h:102
unsigned char uinT8
Definition: host.h:99