/home/rays/src/opensrc/tesseract-ocr/classify/adaptmatch.cpp File Reference

#include <ctype.h>
#include "ambigs.h"
#include "blobclass.h"
#include "featdefs.h"
#include "oldlist.h"
#include "blobs.h"
#include "helpers.h"
#include "ocrfeatures.h"
#include "mfoutline.h"
#include "params.h"
#include "intmatcher.h"
#include "fpoint.h"
#include "emalloc.h"
#include "intfx.h"
#include "baseline.h"
#include "ratngs.h"
#include "efio.h"
#include "matchdefs.h"
#include "permute.h"
#include "ndminx.h"
#include "intproto.h"
#include "const.h"
#include "globals.h"
#include "werd.h"
#include "callcpp.h"
#include "pageres.h"
#include "classify.h"
#include "genericvector.h"
#include "elst.h"
#include "matrix.h"
#include "picofeat.h"
#include "shapetable.h"
#include "unicharset.h"
#include "dict.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>

Classes

struct  ScoredClass
struct  ADAPT_RESULTS
struct  PROTO_KEY

Namespaces

namespace  tesseract

Defines

#define ADAPT_TEMPLATE_SUFFIX   ".a"
#define MAX_MATCHES   10
#define UNLIKELY_NUM_FEAT   200
#define NO_DEBUG   0
#define MAX_ADAPTABLE_WERD_SIZE   40
#define ADAPTABLE_WERD_ADJUSTMENT   (0.05)
#define Y_DIM_OFFSET   (Y_SHIFT - BASELINE_Y_SHIFT)
#define WORST_POSSIBLE_RATING   (1.0)
#define MarginalMatch(Rating)   ((Rating) > matcher_great_threshold)
#define InitIntFX()   (FeaturesHaveBeenExtracted = FALSE)

Functions

int CompareByRating (const void *arg1, const void *arg2)
ScoredClassFindScoredUnichar (ADAPT_RESULTS *results, UNICHAR_ID id)
ScoredClass ScoredUnichar (ADAPT_RESULTS *results, UNICHAR_ID id)
void InitMatcherRatings (register FLOAT32 *Rating)
int MakeTempProtoPerm (void *item1, void *item2)
void SetAdaptiveThreshold (FLOAT32 Threshold)

Define Documentation

#define ADAPT_TEMPLATE_SUFFIX   ".a"
#define ADAPTABLE_WERD_ADJUSTMENT   (0.05)
 
#define InitIntFX (  )     (FeaturesHaveBeenExtracted = FALSE)
#define MarginalMatch ( Rating   )     ((Rating) > matcher_great_threshold)
#define MAX_ADAPTABLE_WERD_SIZE   40
#define MAX_MATCHES   10
#define NO_DEBUG   0
#define UNLIKELY_NUM_FEAT   200
#define WORST_POSSIBLE_RATING   (1.0)
#define Y_DIM_OFFSET   (Y_SHIFT - BASELINE_Y_SHIFT)

Function Documentation

int CompareByRating ( const void *  arg1,
const void *  arg2 
)
ScoredClass * FindScoredUnichar ( ADAPT_RESULTS results,
UNICHAR_ID  id 
)
void InitMatcherRatings ( register FLOAT32 Rating  ) 
int MakeTempProtoPerm ( void *  item1,
void *  item2 
)

This routine converts TempProto to be permanent if its proto id is used by the configuration specified in ProtoKey.

Parameters:
TempProto temporary proto to compare to key
ProtoKey defines which protos to make permanent

Globals: none

Returns:
TRUE if TempProto is converted, FALSE otherwise
Note:
Exceptions: none
History: Thu Mar 14 18:49:54 1991, DSJ, Created.
ScoredClass ScoredUnichar ( ADAPT_RESULTS results,
UNICHAR_ID  id 
)
void SetAdaptiveThreshold ( FLOAT32  Threshold  ) 
Generated on Thu Feb 2 08:19:21 2012 for Tesseract by  doxygen 1.6.3