tesseract v5.3.3.20231005
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 *
6 * (C) Copyright 1992, Hewlett-Packard Ltd.
7 ** Licensed under the Apache License, Version 2.0 (the "License");
8 ** you may not use this file except in compliance with the License.
9 ** You may obtain a copy of the License at
10 ** http://www.apache.org/licenses/LICENSE-2.0
11 ** Unless required by applicable law or agreed to in writing, software
12 ** distributed under the License is distributed on an "AS IS" BASIS,
13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ** See the License for the specific language governing permissions and
15 ** limitations under the License.
16 *
17 **********************************************************************/
18
19#ifndef WORDSEG_H
20#define WORDSEG_H
21
22#include "blobbox.h"
23#include "params.h"
24#include "textord.h"
25
26namespace tesseract {
27class Tesseract;
28
31
32void make_single_word(bool one_blob, TO_ROW_LIST *rows, ROW_LIST *real_rows);
33void make_words(tesseract::Textord *textord,
34 ICOORD page_tr, // top right
35 float gradient, // page skew
36 BLOCK_LIST *blocks, // block list
37 TO_BLOCK_LIST *port_blocks); // output list
38void set_row_spaces( // find space sizes
39 TO_BLOCK *block, // block to do
40 FCOORD rotation, // for drawing
41 bool testing_on // correct orientation
42);
43int32_t row_words( // compute space size
44 TO_BLOCK *block, // block it came from
45 TO_ROW *row, // row to operate on
46 int32_t maxwidth, // max expected space size
47 FCOORD rotation, // for drawing
48 bool testing_on // for debug
49);
50int32_t row_words2( // compute space size
51 TO_BLOCK *block, // block it came from
52 TO_ROW *row, // row to operate on
53 int32_t maxwidth, // max expected space size
54 FCOORD rotation, // for drawing
55 bool testing_on // for debug
56);
58 TO_BLOCK *block, // block to do
59 FCOORD rotation // for drawing
60);
61ROW *make_rep_words( // make a row
62 TO_ROW *row, // row to convert
63 TO_BLOCK *block // block it lives in
64);
65WERD *make_real_word( // make a WERD
66 BLOBNBOX_IT *box_it, // iterator
67 int32_t blobcount, // no of blobs to use
68 bool bol, // start of line
69 uint8_t blanks // no of blanks
70);
71
72} // namespace tesseract
73
74#endif
bool textord_force_make_prop_words
Definition: wordseg.cpp:41
WERD * make_real_word(BLOBNBOX_IT *box_it, int32_t blobcount, bool bol, uint8_t blanks)
Definition: wordseg.cpp:559
void set_row_spaces(TO_BLOCK *block, FCOORD rotation, bool testing_on)
Definition: wordseg.cpp:128
BOOL_VAR_H(wordrec_display_splits)
void make_real_words(tesseract::Textord *textord, TO_BLOCK *block, FCOORD rotation)
Definition: wordseg.cpp:473
void make_words(tesseract::Textord *textord, ICOORD page_tr, float gradient, BLOCK_LIST *blocks, TO_BLOCK_LIST *port_blocks)
Definition: wordseg.cpp:99
bool textord_chopper_test
Definition: wordseg.cpp:42
void make_single_word(bool one_blob, TO_ROW_LIST *rows, ROW_LIST *real_rows)
Definition: wordseg.cpp:53
int32_t row_words2(TO_BLOCK *block, TO_ROW *row, int32_t maxwidth, FCOORD rotation, bool testing_on)
Definition: wordseg.cpp:321
ROW * make_rep_words(TO_ROW *row, TO_BLOCK *block)
Definition: wordseg.cpp:526
int32_t row_words(TO_BLOCK *block, TO_ROW *row, int32_t maxwidth, FCOORD rotation, bool testing_on)
Definition: wordseg.cpp:168
integer coordinate
Definition: points.h:36