tesseract  4.00.00dev
werd.cpp
Go to the documentation of this file.
1 /**********************************************************************
2  * File: werd.cpp (Formerly word.c)
3  * Description: Code for the WERD class.
4  * Author: Ray Smith
5  * Created: Tue Oct 08 14:32:12 BST 1991
6  *
7  * (C) Copyright 1991, 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 #include "blckerr.h"
21 #include "helpers.h"
22 #include "linlsq.h"
23 #include "werd.h"
24 
25 // Include automatically generated configuration file if running autoconf.
26 #ifdef HAVE_CONFIG_H
27 #include "config_auto.h"
28 #endif
29 
30 #define FIRST_COLOUR ScrollView::RED //< first rainbow colour
31 #define LAST_COLOUR ScrollView::AQUAMARINE //< last rainbow colour
32 #define CHILD_COLOUR ScrollView::BROWN //< colour of children
33 
35  "Attempted to scale an edgestep format word";
36 
38 
39 
48 WERD::WERD(C_BLOB_LIST *blob_list, uinT8 blank_count, const char *text)
49  : blanks(blank_count),
50  flags(0),
51  script_id_(0),
52  correct(text) {
53  C_BLOB_IT start_it = &cblobs;
54  C_BLOB_IT rej_cblob_it = &rej_cblobs;
55  C_OUTLINE_IT c_outline_it;
56  inT16 inverted_vote = 0;
57  inT16 non_inverted_vote = 0;
58 
59  // Move blob_list's elements into cblobs.
60  start_it.add_list_after(blob_list);
61 
62  /*
63  Set white on black flag for the WERD, moving any duff blobs onto the
64  rej_cblobs list.
65  First, walk the cblobs checking the inverse flag for each outline of each
66  cblob. If a cblob has inconsistent flag settings for its different
67  outlines, move the blob to the reject list. Otherwise, increment the
68  appropriate w-on-b or b-on-w vote for the word.
69 
70  Now set the inversion flag for the WERD by maximum vote.
71 
72  Walk the blobs again, moving any blob whose inversion flag does not agree
73  with the concencus onto the reject list.
74  */
75  start_it.set_to_list(&cblobs);
76  if (start_it.empty())
77  return;
78  for (start_it.mark_cycle_pt(); !start_it.cycled_list(); start_it.forward()) {
79  BOOL8 reject_blob = FALSE;
80  BOOL8 blob_inverted;
81 
82  c_outline_it.set_to_list(start_it.data()->out_list());
83  blob_inverted = c_outline_it.data()->flag(COUT_INVERSE);
84  for (c_outline_it.mark_cycle_pt();
85  !c_outline_it.cycled_list() && !reject_blob;
86  c_outline_it.forward()) {
87  reject_blob = c_outline_it.data()->flag(COUT_INVERSE) != blob_inverted;
88  }
89  if (reject_blob) {
90  rej_cblob_it.add_after_then_move(start_it.extract());
91  } else {
92  if (blob_inverted)
93  inverted_vote++;
94  else
95  non_inverted_vote++;
96  }
97  }
98 
99  flags.set_bit(W_INVERSE, (inverted_vote > non_inverted_vote));
100 
101  start_it.set_to_list(&cblobs);
102  if (start_it.empty())
103  return;
104  for (start_it.mark_cycle_pt(); !start_it.cycled_list(); start_it.forward()) {
105  c_outline_it.set_to_list(start_it.data()->out_list());
106  if (c_outline_it.data()->flag(COUT_INVERSE) != flags.bit(W_INVERSE))
107  rej_cblob_it.add_after_then_move(start_it.extract());
108  }
109 }
110 
111 
119 WERD::WERD(C_BLOB_LIST * blob_list, //< In word order
120  WERD * clone) //< Source of flags
121  : flags(clone->flags),
122  script_id_(clone->script_id_),
123  correct(clone->correct) {
124  C_BLOB_IT start_it = blob_list; // iterator
125  C_BLOB_IT end_it = blob_list; // another
126 
127  while (!end_it.at_last ())
128  end_it.forward (); //move to last
129  ((C_BLOB_LIST *) (&cblobs))->assign_to_sublist (&start_it, &end_it);
130  //move to our list
131  blanks = clone->blanks;
132  // fprintf(stderr,"Wrong constructor!!!!\n");
133 }
134 
135 // Construct a WERD from a single_blob and clone the flags from this.
136 // W_BOL and W_EOL flags are set according to the given values.
137 WERD* WERD::ConstructFromSingleBlob(bool bol, bool eol, C_BLOB* blob) {
138  C_BLOB_LIST temp_blobs;
139  C_BLOB_IT temp_it(&temp_blobs);
140  temp_it.add_after_then_move(blob);
141  WERD* blob_word = new WERD(&temp_blobs, this);
142  blob_word->set_flag(W_BOL, bol);
143  blob_word->set_flag(W_EOL, eol);
144  return blob_word;
145 }
146 
160 TBOX WERD::bounding_box() const { return restricted_bounding_box(true, true); }
161 
162 // Returns the bounding box including the desired combination of upper and
163 // lower noise/diacritic elements.
164 TBOX WERD::restricted_bounding_box(bool upper_dots, bool lower_dots) const {
165  TBOX box = true_bounding_box();
166  int bottom = box.bottom();
167  int top = box.top();
168  // This is a read-only iteration of the rejected blobs.
169  C_BLOB_IT it(const_cast<C_BLOB_LIST*>(&rej_cblobs));
170  for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
171  TBOX dot_box = it.data()->bounding_box();
172  if ((upper_dots || dot_box.bottom() <= top) &&
173  (lower_dots || dot_box.top() >= bottom)) {
174  box += dot_box;
175  }
176  }
177  return box;
178 }
179 
180 // Returns the bounding box of only the good blobs.
182  TBOX box; // box being built
183  // This is a read-only iteration of the good blobs.
184  C_BLOB_IT it(const_cast<C_BLOB_LIST*>(&cblobs));
185  for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
186  box += it.data()->bounding_box();
187  }
188  return box;
189 }
190 
198 void WERD::move(const ICOORD vec) {
199  C_BLOB_IT cblob_it(&cblobs); // cblob iterator
200 
201  for (cblob_it.mark_cycle_pt(); !cblob_it.cycled_list(); cblob_it.forward())
202  cblob_it.data()->move(vec);
203 }
204 
211 void WERD::join_on(WERD* other) {
212  C_BLOB_IT blob_it(&cblobs);
213  C_BLOB_IT src_it(&other->cblobs);
214  C_BLOB_IT rej_cblob_it(&rej_cblobs);
215  C_BLOB_IT src_rej_it(&other->rej_cblobs);
216 
217  while (!src_it.empty()) {
218  blob_it.add_to_end(src_it.extract());
219  src_it.forward();
220  }
221  while (!src_rej_it.empty()) {
222  rej_cblob_it.add_to_end(src_rej_it.extract());
223  src_rej_it.forward();
224  }
225 }
226 
227 
234 void WERD::copy_on(WERD* other) {
235  bool reversed = other->bounding_box().left() < bounding_box().left();
236  C_BLOB_IT c_blob_it(&cblobs);
237  C_BLOB_LIST c_blobs;
238 
239  c_blobs.deep_copy(&other->cblobs, &C_BLOB::deep_copy);
240  if (reversed) {
241  c_blob_it.add_list_before(&c_blobs);
242  } else {
243  c_blob_it.move_to_last();
244  c_blob_it.add_list_after(&c_blobs);
245  }
246  if (!other->rej_cblobs.empty()) {
247  C_BLOB_IT rej_c_blob_it(&rej_cblobs);
248  C_BLOB_LIST new_rej_c_blobs;
249 
250  new_rej_c_blobs.deep_copy(&other->rej_cblobs, &C_BLOB::deep_copy);
251  if (reversed) {
252  rej_c_blob_it.add_list_before(&new_rej_c_blobs);
253  } else {
254  rej_c_blob_it.move_to_last();
255  rej_c_blob_it.add_list_after(&new_rej_c_blobs);
256  }
257  }
258 }
259 
266 void WERD::print() {
267  tprintf("Blanks= %d\n", blanks);
268  bounding_box().print();
269  tprintf("Flags = %d = 0%o\n", flags.val, flags.val);
270  tprintf(" W_SEGMENTED = %s\n", flags.bit(W_SEGMENTED) ? "TRUE" : "FALSE ");
271  tprintf(" W_ITALIC = %s\n", flags.bit(W_ITALIC) ? "TRUE" : "FALSE ");
272  tprintf(" W_BOL = %s\n", flags.bit(W_BOL) ? "TRUE" : "FALSE ");
273  tprintf(" W_EOL = %s\n", flags.bit(W_EOL) ? "TRUE" : "FALSE ");
274  tprintf(" W_NORMALIZED = %s\n",
275  flags.bit(W_NORMALIZED) ? "TRUE" : "FALSE ");
276  tprintf(" W_SCRIPT_HAS_XHEIGHT = %s\n",
277  flags.bit(W_SCRIPT_HAS_XHEIGHT) ? "TRUE" : "FALSE ");
278  tprintf(" W_SCRIPT_IS_LATIN = %s\n",
279  flags.bit(W_SCRIPT_IS_LATIN) ? "TRUE" : "FALSE ");
280  tprintf(" W_DONT_CHOP = %s\n", flags.bit(W_DONT_CHOP) ? "TRUE" : "FALSE ");
281  tprintf(" W_REP_CHAR = %s\n", flags.bit(W_REP_CHAR) ? "TRUE" : "FALSE ");
282  tprintf(" W_FUZZY_SP = %s\n", flags.bit(W_FUZZY_SP) ? "TRUE" : "FALSE ");
283  tprintf(" W_FUZZY_NON = %s\n", flags.bit(W_FUZZY_NON) ? "TRUE" : "FALSE ");
284  tprintf("Correct= %s\n", correct.string());
285  tprintf("Rejected cblob count = %d\n", rej_cblobs.length());
286  tprintf("Script = %d\n", script_id_);
287 }
288 
289 
296 #ifndef GRAPHICS_DISABLED
297 void WERD::plot(ScrollView *window, ScrollView::Color colour) {
298  C_BLOB_IT it = &cblobs;
299  for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
300  it.data()->plot(window, colour, colour);
301  }
302  plot_rej_blobs(window);
303 }
304 
305 // Get the next color in the (looping) rainbow.
307  ScrollView::Color next = static_cast<ScrollView::Color>(colour + 1);
308  if (next >= LAST_COLOUR || next < FIRST_COLOUR)
309  next = FIRST_COLOUR;
310  return next;
311 }
312 
319 void WERD::plot(ScrollView* window) {
321  C_BLOB_IT it = &cblobs;
322  for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
323  it.data()->plot(window, colour, CHILD_COLOUR);
324  colour = NextColor(colour);
325  }
326  plot_rej_blobs(window);
327 }
328 
329 
338  C_BLOB_IT it = &rej_cblobs;
339  for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
340  it.data()->plot(window, ScrollView::GREY, ScrollView::GREY);
341  }
342 }
343 #endif // GRAPHICS_DISABLED
344 
345 
353  WERD *new_word = new WERD;
354 
355  new_word->blanks = blanks;
356  new_word->flags = flags;
357  new_word->dummy = dummy;
358  new_word->correct = correct;
359  return new_word;
360 }
361 
362 
369 WERD & WERD::operator= (const WERD & source) {
370  this->ELIST2_LINK::operator= (source);
371  blanks = source.blanks;
372  flags = source.flags;
373  script_id_ = source.script_id_;
374  dummy = source.dummy;
375  correct = source.correct;
376  if (!cblobs.empty())
377  cblobs.clear();
378  cblobs.deep_copy(&source.cblobs, &C_BLOB::deep_copy);
379 
380  if (!rej_cblobs.empty())
381  rej_cblobs.clear();
382  rej_cblobs.deep_copy(&source.rej_cblobs, &C_BLOB::deep_copy);
383  return *this;
384 }
385 
386 
394 int word_comparator(const void *word1p, const void *word2p) {
395  WERD *word1 = *(WERD **)word1p;
396  WERD *word2 = *(WERD **)word2p;
397  return word1->bounding_box().left() - word2->bounding_box().left();
398 }
399 
412 WERD* WERD::ConstructWerdWithNewBlobs(C_BLOB_LIST* all_blobs,
413  C_BLOB_LIST* orphan_blobs) {
414  C_BLOB_LIST current_blob_list;
415  C_BLOB_IT werd_blobs_it(&current_blob_list);
416  // Add the word's c_blobs.
417  werd_blobs_it.add_list_after(cblob_list());
418 
419  // New blob list. These contain the blobs which will form the new word.
420  C_BLOB_LIST new_werd_blobs;
421  C_BLOB_IT new_blobs_it(&new_werd_blobs);
422 
423  // not_found_blobs contains the list of current word's blobs for which a
424  // corresponding blob wasn't found in the input all_blobs list.
425  C_BLOB_LIST not_found_blobs;
426  C_BLOB_IT not_found_it(&not_found_blobs);
427  not_found_it.move_to_last();
428 
429  werd_blobs_it.move_to_first();
430  for (werd_blobs_it.mark_cycle_pt(); !werd_blobs_it.cycled_list();
431  werd_blobs_it.forward()) {
432  C_BLOB* werd_blob = werd_blobs_it.extract();
433  TBOX werd_blob_box = werd_blob->bounding_box();
434  bool found = false;
435  // Now find the corresponding blob for this blob in the all_blobs
436  // list. For now, follow the inefficient method of pairwise
437  // comparisons. Ideally, one can pre-bucket the blobs by row.
438  C_BLOB_IT all_blobs_it(all_blobs);
439  for (all_blobs_it.mark_cycle_pt(); !all_blobs_it.cycled_list();
440  all_blobs_it.forward()) {
441  C_BLOB* a_blob = all_blobs_it.data();
442  // Compute the overlap of the two blobs. If major, a_blob should
443  // be added to the new blobs list.
444  TBOX a_blob_box = a_blob->bounding_box();
445  if (a_blob_box.null_box()) {
446  tprintf("Bounding box couldn't be ascertained\n");
447  }
448  if (werd_blob_box.contains(a_blob_box) ||
449  werd_blob_box.major_overlap(a_blob_box)) {
450  // Old blobs are from minimal splits, therefore are expected to be
451  // bigger. The new small blobs should cover a significant portion.
452  // This is it.
453  all_blobs_it.extract();
454  new_blobs_it.add_after_then_move(a_blob);
455  found = true;
456  }
457  }
458  if (!found) {
459  not_found_it.add_after_then_move(werd_blob);
460  } else {
461  delete werd_blob;
462  }
463  }
464  // Iterate over all not found blobs. Some of them may be due to
465  // under-segmentation (which is OK, since the corresponding blob is already
466  // in the list in that case.
467  not_found_it.move_to_first();
468  for (not_found_it.mark_cycle_pt(); !not_found_it.cycled_list();
469  not_found_it.forward()) {
470  C_BLOB* not_found = not_found_it.data();
471  TBOX not_found_box = not_found->bounding_box();
472  C_BLOB_IT existing_blobs_it(new_blobs_it);
473  for (existing_blobs_it.mark_cycle_pt(); !existing_blobs_it.cycled_list();
474  existing_blobs_it.forward()) {
475  C_BLOB* a_blob = existing_blobs_it.data();
476  TBOX a_blob_box = a_blob->bounding_box();
477  if ((not_found_box.major_overlap(a_blob_box) ||
478  a_blob_box.major_overlap(not_found_box)) &&
479  not_found_box.y_overlap_fraction(a_blob_box) > 0.8) {
480  // Already taken care of.
481  delete not_found_it.extract();
482  break;
483  }
484  }
485  }
486  if (orphan_blobs) {
487  C_BLOB_IT orphan_blobs_it(orphan_blobs);
488  orphan_blobs_it.move_to_last();
489  orphan_blobs_it.add_list_after(&not_found_blobs);
490  }
491 
492  // New blobs are ready. Create a new werd object with these.
493  WERD* new_werd = NULL;
494  if (!new_werd_blobs.empty()) {
495  new_werd = new WERD(&new_werd_blobs, this);
496  } else {
497  // Add the blobs back to this word so that it can be reused.
498  C_BLOB_IT this_list_it(cblob_list());
499  this_list_it.add_list_after(&not_found_blobs);
500  }
501  return new_werd;
502 }
503 
504 // Removes noise from the word by moving small outlines to the rej_cblobs
505 // list, based on the size_threshold.
506 void WERD::CleanNoise(float size_threshold) {
507  C_BLOB_IT blob_it(&cblobs);
508  C_BLOB_IT rej_it(&rej_cblobs);
509  for (blob_it.mark_cycle_pt(); !blob_it.cycled_list(); blob_it.forward()) {
510  C_BLOB* blob = blob_it.data();
511  C_OUTLINE_IT ol_it(blob->out_list());
512  for (ol_it.mark_cycle_pt(); !ol_it.cycled_list(); ol_it.forward()) {
513  C_OUTLINE* outline = ol_it.data();
514  TBOX ol_box = outline->bounding_box();
515  int ol_size =
516  ol_box.width() > ol_box.height() ? ol_box.width() : ol_box.height();
517  if (ol_size < size_threshold) {
518  // This outline is too small. Move it to a separate blob in the
519  // reject blobs list.
520  C_BLOB* rej_blob = new C_BLOB(ol_it.extract());
521  rej_it.add_after_then_move(rej_blob);
522  }
523  }
524  if (blob->out_list()->empty()) delete blob_it.extract();
525  }
526 }
527 
528 // Extracts all the noise outlines and stuffs the pointers into the given
529 // vector of outlines. Afterwards, the outlines vector owns the pointers.
531  C_BLOB_IT rej_it(&rej_cblobs);
532  for (rej_it.mark_cycle_pt(); !rej_it.empty(); rej_it.forward()) {
533  C_BLOB* blob = rej_it.extract();
534  C_OUTLINE_IT ol_it(blob->out_list());
535  outlines->push_back(ol_it.extract());
536  delete blob;
537  }
538 }
539 
540 // Adds the selected outlines to the indcated real blobs, and puts the rest
541 // back in rej_cblobs where they came from. Where the target_blobs entry is
542 // NULL, a run of wanted outlines is put into a single new blob.
543 // Ownership of the outlines is transferred back to the word. (Hence
544 // GenericVector and not PointerVector.)
545 // Returns true if any new blob was added to the start of the word, which
546 // suggests that it might need joining to the word before it, and likewise
547 // sets make_next_word_fuzzy true if any new blob was added to the end.
549  const GenericVector<C_BLOB*>& target_blobs,
550  const GenericVector<C_OUTLINE*>& outlines,
551  bool* make_next_word_fuzzy) {
552  bool outline_added_to_start = false;
553  if (make_next_word_fuzzy != NULL) *make_next_word_fuzzy = false;
554  C_BLOB_IT rej_it(&rej_cblobs);
555  for (int i = 0; i < outlines.size(); ++i) {
556  C_OUTLINE* outline = outlines[i];
557  if (outline == NULL) continue; // Already used it.
558  if (wanted[i]) {
559  C_BLOB* target_blob = target_blobs[i];
560  TBOX noise_box = outline->bounding_box();
561  if (target_blob == NULL) {
562  target_blob = new C_BLOB(outline);
563  // Need to find the insertion point.
564  C_BLOB_IT blob_it(&cblobs);
565  for (blob_it.mark_cycle_pt(); !blob_it.cycled_list();
566  blob_it.forward()) {
567  C_BLOB* blob = blob_it.data();
568  TBOX blob_box = blob->bounding_box();
569  if (blob_box.left() > noise_box.left()) {
570  if (blob_it.at_first() && !flag(W_FUZZY_SP) && !flag(W_FUZZY_NON)) {
571  // We might want to join this word to its predecessor.
572  outline_added_to_start = true;
573  }
574  blob_it.add_before_stay_put(target_blob);
575  break;
576  }
577  }
578  if (blob_it.cycled_list()) {
579  blob_it.add_to_end(target_blob);
580  if (make_next_word_fuzzy != NULL) *make_next_word_fuzzy = true;
581  }
582  // Add all consecutive wanted, but null-blob outlines to same blob.
583  C_OUTLINE_IT ol_it(target_blob->out_list());
584  while (i + 1 < outlines.size() && wanted[i + 1] &&
585  target_blobs[i + 1] == NULL) {
586  ++i;
587  ol_it.add_to_end(outlines[i]);
588  }
589  } else {
590  // Insert outline into this blob.
591  C_OUTLINE_IT ol_it(target_blob->out_list());
592  ol_it.add_to_end(outline);
593  }
594  } else {
595  // Put back on noise list.
596  rej_it.add_to_end(new C_BLOB(outline));
597  }
598  }
599  return outline_added_to_start;
600 }
static ScrollView::Color NextColor(ScrollView::Color colour)
Definition: werd.cpp:306
Definition: werd.h:44
char flags[EDGEPTFLAGS]
Definition: blobs.h:168
C_OUTLINE_LIST * out_list()
Definition: stepblob.h:64
void move(const ICOORD vec)
Definition: werd.cpp:198
#define LAST_COLOUR
Definition: werd.cpp:31
WERD * ConstructWerdWithNewBlobs(C_BLOB_LIST *all_blobs, C_BLOB_LIST *orphan_blobs)
Definition: werd.cpp:412
TBOX true_bounding_box() const
Definition: werd.cpp:181
int word_comparator(const void *word1p, const void *word2p)
Definition: werd.cpp:394
Definition: werd.h:36
void print()
Definition: werd.cpp:266
int push_back(T object)
void set_flag(WERD_FLAGS mask, BOOL8 value)
Definition: werd.h:129
#define tprintf(...)
Definition: tprintf.h:31
const char * string() const
Definition: strngs.cpp:198
#define CHILD_COLOUR
Definition: werd.cpp:32
Definition: werd.h:33
int size() const
Definition: genericvector.h:72
TBOX bounding_box() const
Definition: werd.cpp:160
int16_t inT16
Definition: host.h:36
BOOL8 flag(WERD_FLAGS mask) const
Definition: werd.h:128
inT16 left() const
Definition: rect.h:68
#define FIRST_COLOUR
Definition: werd.cpp:30
#define ELIST2IZE(CLASSNAME)
Definition: elst2.h:962
static C_BLOB * deep_copy(const C_BLOB *src)
Definition: stepblob.h:113
void plot_rej_blobs(ScrollView *window)
Definition: werd.cpp:337
VECTOR vec
Definition: blobs.h:164
WERD & operator=(const WERD &source)
Definition: werd.cpp:369
unsigned char BOOL8
Definition: host.h:44
#define FALSE
Definition: capi.h:46
const TBOX & bounding_box() const
Definition: coutln.h:111
EDGEPT * next
Definition: blobs.h:169
bool null_box() const
Definition: rect.h:46
bool contains(const FCOORD pt) const
Definition: rect.h:323
bool major_overlap(const TBOX &box) const
Definition: rect.h:358
Definition: werd.h:35
inT16 top() const
Definition: rect.h:54
void GetNoiseOutlines(GenericVector< C_OUTLINE *> *outlines)
Definition: werd.cpp:530
TBOX restricted_bounding_box(bool upper_dots, bool lower_dots) const
Definition: werd.cpp:164
WERD * shallow_copy()
Definition: werd.cpp:352
Definition: rect.h:30
void join_on(WERD *other)
Definition: werd.cpp:211
bool AddSelectedOutlines(const GenericVector< bool > &wanted, const GenericVector< C_BLOB *> &target_blobs, const GenericVector< C_OUTLINE *> &outlines, bool *make_next_word_fuzzy)
Definition: werd.cpp:548
void operator=(const ELIST2_LINK &)
Definition: elst2.h:76
TBOX bounding_box() const
Definition: stepblob.cpp:250
C_BLOB_LIST * cblob_list()
Definition: werd.h:100
inT16 height() const
Definition: rect.h:104
uint8_t uinT8
Definition: host.h:35
void copy_on(WERD *other)
Definition: werd.cpp:234
inT16 width() const
Definition: rect.h:111
const ERRCODE CANT_SCALE_EDGESTEPS
Definition: werd.cpp:34
void print() const
Definition: rect.h:270
inT16 bottom() const
Definition: rect.h:61
double y_overlap_fraction(const TBOX &box) const
Definition: rect.h:469
Definition: werd.h:60
WERD * ConstructFromSingleBlob(bool bol, bool eol, C_BLOB *blob)
Definition: werd.cpp:137
void CleanNoise(float size_threshold)
Definition: werd.cpp:506
void plot(ScrollView *window, ScrollView::Color colour)
Definition: werd.cpp:297
integer coordinate
Definition: points.h:30
WERD()
Definition: werd.h:62