classify/fxdefs.h File Reference

#include "tessclas.h"
#include "general.h"

Go to the source code of this file.

Classes

Defines

Typedefs

Functions

Variables


Define Documentation

#define CLASSIFY_MODE   1

CLASSIFYING mode for feature extractor

Definition at line 31 of file fxdefs.h.

#define EnterClassifyMode   (SetExtractMode (CLASSIFY_MODE))

Definition at line 81 of file fxdefs.h.

Referenced by AdaptiveClassifier(), compare_tess_blobs(), and GetAmbiguities().

#define EnterLearnMode   (SetExtractMode (LEARN_MODE))

Definition at line 80 of file fxdefs.h.

Referenced by LearnBlob().

#define LEARN_MODE   0

LEARNING mode for feature extractor

Definition at line 29 of file fxdefs.h.

#define SetExtractMode (  )     (ExtractMode = (M))

macro to change and monitor the mode of the feature extractor.

In general, learn mode smears features which would otherwise be discrete in nature; classify mode does not.

Definition at line 79 of file fxdefs.h.


Typedef Documentation

CHAR_FEATURES

Generic character description as a char pointer.

In reality, it will be a pointer to some data structure. Paired feature extractors/matchers need to agree on the data structure to be used, however, the high level classifier does not need to know the details of this data structure.

Usually used to hold a list of micr-structures extracted from a blob

Definition at line 67 of file fxdefs.h.


Function Documentation

void GetLineStatsFromRow ( TEXTROW Row,
LINE_STATS LineStats 
)

Copies the relavent fields from the Row struct to the LineStats struct.

Parameters:
Row Text row to get line statistics from
LineStats Place to put line statistics
Returns:
none (results are returned in LineStats)
Note:
Exceptions: none
Date:
Mon Mar 11 10:38:43 1991, DSJ, Created.

Definition at line 67 of file fxdefs.cpp.

References textrowstruct::ascrise, LINE_STATS::AscRise, textrowstruct::baseline, LINE_STATS::Baseline, textrowstruct::descdrop, LINE_STATS::DescDrop, textrowstruct::lineheight, LINE_STATS::TextRow, LINE_STATS::xheight, textrowstruct::xheight, and LINE_STATS::XHeightLine.

Referenced by AdaptiveClassifier(), AdaptToWord(), compare_tess_blobs(), and LearnBlob().

00067                                                               { 
00068   LineStats->Baseline = &(Row->baseline);
00069   LineStats->XHeightLine = &(Row->xheight);
00070   LineStats->xheight = Row->lineheight;
00071   LineStats->AscRise = Row->ascrise;
00072   LineStats->DescDrop = Row->descdrop;
00073   LineStats->TextRow = Row;      /* kludge - only needed by fx for */
00074   /* fast matcher - remove later */
00075 
00076 }                                /* GetLineStatsFromRow */

void SetupExtractors (  ) 

New for v1.03.

Definition at line 53 of file fxdefs.cpp.

References ExtractorDefs, ExtractorOf, and NUM_FEATURE_TYPES.

Referenced by InitFlexFXVars().

00053                        {
00054   for (int i = 0; i < NUM_FEATURE_TYPES; ++i)
00055     ExtractorOf(i) = ExtractorDefs[i];
00056 }


Variable Documentation

int ExtractMode

flag to control learn mode vs classify mode

Definition at line 30 of file fxdefs.cpp.


Generated on Wed Feb 28 19:49:19 2007 for Tesseract by  doxygen 1.5.1