Tesseract  3.02
tesseract-ocr/ccstruct/werd.h File Reference
#include "params.h"
#include "bits16.h"
#include "elst2.h"
#include "strngs.h"
#include "blckerr.h"
#include "stepblob.h"
#include "ocrrow.h"

Go to the source code of this file.

Classes

class  WERD

Enumerations

enum  WERD_FLAGS {
  W_SEGMENTED, W_ITALIC, W_BOLD, W_BOL,
  W_EOL, W_NORMALIZED, W_SCRIPT_HAS_XHEIGHT, W_SCRIPT_IS_LATIN,
  W_DONT_CHOP, W_REP_CHAR, W_FUZZY_SP, W_FUZZY_NON,
  W_INVERSE
}
enum  DISPLAY_FLAGS {
  DF_BOX, DF_TEXT, DF_POLYGONAL, DF_EDGE_STEP,
  DF_BN_POLYGONAL, DF_BLAMER
}

Functions

int word_comparator (const void *word1p, const void *word2p)

Enumeration Type Documentation

Enumerator:
DF_BOX 
DF_TEXT 
DF_POLYGONAL 
DF_EDGE_STEP 
DF_BN_POLYGONAL 
DF_BLAMER 

Definition at line 52 of file werd.h.

{
  /* Display flags bit number allocations */
  DF_BOX,                        //< Bounding box
  DF_TEXT,                       //< Correct ascii
  DF_POLYGONAL,                  //< Polyg approx
  DF_EDGE_STEP,                  //< Edge steps
  DF_BN_POLYGONAL,               //< BL normalisd polyapx
  DF_BLAMER                      //< Blamer information
};
enum WERD_FLAGS
Enumerator:
W_SEGMENTED 
W_ITALIC 
W_BOLD 
W_BOL 
W_EOL 
W_NORMALIZED 
W_SCRIPT_HAS_XHEIGHT 
W_SCRIPT_IS_LATIN 
W_DONT_CHOP 
W_REP_CHAR 
W_FUZZY_SP 
W_FUZZY_NON 
W_INVERSE 

Definition at line 35 of file werd.h.

{
  W_SEGMENTED,                   //< correctly segmented
  W_ITALIC,                      //< italic text
  W_BOLD,                        //< bold text
  W_BOL,                         //< start of line
  W_EOL,                         //< end of line
  W_NORMALIZED,                  //< flags
  W_SCRIPT_HAS_XHEIGHT,          //< x-height concept makes sense.
  W_SCRIPT_IS_LATIN,             //< Special case latin for y. splitting.
  W_DONT_CHOP,                   //< fixed pitch chopped
  W_REP_CHAR,                    //< repeated character
  W_FUZZY_SP,                    //< fuzzy space
  W_FUZZY_NON,                   //< fuzzy nonspace
  W_INVERSE                      //< white on black
};

Function Documentation

int word_comparator ( const void *  word1p,
const void *  word2p 
)

word_comparator()

word comparator used to sort a word list so that words are in increasing order of left edge.

Definition at line 381 of file werd.cpp.

                                                            {
  WERD *word1 = *(WERD **)word1p;
  WERD *word2 = *(WERD **)word2p;
  return word1->bounding_box().left() - word2->bounding_box().left();
}