tesseract  3.04.00
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mfx.h File Reference
#include "mfdefs.h"
#include "params.h"

Go to the source code of this file.

Functions

MICROFEATURES BlobMicroFeatures (TBLOB *Blob, const DENORM &cn_denorm)
 

Variables

double classify_min_slope = 0.414213562
 
double classify_max_slope = 2.414213562
 

Function Documentation

MICROFEATURES BlobMicroFeatures ( TBLOB Blob,
const DENORM cn_denorm 
)

Public Function Prototypes


Public Code

Definition at line 62 of file mfx.cpp.

62  {
63 /*
64  ** Parameters:
65  ** Blob blob to extract micro-features from
66  ** denorm control parameter to feature extractor
67  ** Operation:
68  ** This routine extracts micro-features from the specified
69  ** blob and returns a list of the micro-features. All
70  ** micro-features are normalized according to the specified
71  ** line statistics.
72  ** Return: List of micro-features extracted from the blob.
73  ** Exceptions: none
74  ** History: 7/21/89, DSJ, Created.
75  */
76  MICROFEATURES MicroFeatures = NIL_LIST;
77  LIST Outlines;
78  LIST RemainingOutlines;
79  MFOUTLINE Outline;
80 
81  if (Blob != NULL) {
82  Outlines = ConvertBlob(Blob);
83 
84  RemainingOutlines = Outlines;
85  iterate(RemainingOutlines) {
86  Outline = (MFOUTLINE) first_node (RemainingOutlines);
87  CharNormalizeOutline(Outline, cn_denorm);
88  }
89 
90  RemainingOutlines = Outlines;
91  iterate(RemainingOutlines) {
92  Outline = (MFOUTLINE) first_node(RemainingOutlines);
94  MarkDirectionChanges(Outline);
95  MicroFeatures = ConvertToMicroFeatures(Outline, MicroFeatures);
96  }
97  FreeOutlines(Outlines);
98  }
99  return MicroFeatures;
100 } /* BlobMicroFeatures */
#define first_node(l)
Definition: oldlist.h:139
void CharNormalizeOutline(MFOUTLINE Outline, const DENORM &cn_denorm)
Definition: mfoutline.cpp:364
double classify_min_slope
Definition: mfx.cpp:37
#define iterate(l)
Definition: oldlist.h:159
void FindDirectionChanges(MFOUTLINE Outline, FLOAT32 MinSlope, FLOAT32 MaxSlope)
Definition: mfoutline.cpp:105
LIST ConvertBlob(TBLOB *blob)
Definition: mfoutline.cpp:39
void FreeOutlines(LIST Outlines)
Definition: mfoutline.cpp:175
#define NIL_LIST
Definition: oldlist.h:126
void MarkDirectionChanges(MFOUTLINE Outline)
Definition: mfoutline.cpp:191
#define NULL
Definition: host.h:144
MICROFEATURES ConvertToMicroFeatures(MFOUTLINE Outline, MICROFEATURES MicroFeatures)
Definition: mfx.cpp:139
double classify_max_slope
Definition: mfx.cpp:39
LIST MFOUTLINE
Definition: mfoutline.h:33

Variable Documentation

double classify_max_slope = 2.414213562

"Slope above which lines are called vertical"

Definition at line 39 of file mfx.cpp.

double classify_min_slope = 0.414213562

Include Files and Type Defines

Variables

"Slope below which lines are called horizontal"

Definition at line 37 of file mfx.cpp.