All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules 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 
)

This routine extracts micro-features from the specified blob and returns a list of the micro-features. All micro-features are normalized according to the specified line statistics.

Parameters
Blobblob to extract micro-features from
cn_denormcontrol parameter to feature extractor
Returns
List of micro-features extracted from the blob.
Note
Exceptions: none
History: 7/21/89, DSJ, Created.

Definition at line 72 of file mfx.cpp.

72  {
73  MICROFEATURES MicroFeatures = NIL_LIST;
74  LIST Outlines;
75  LIST RemainingOutlines;
76  MFOUTLINE Outline;
77 
78  if (Blob != NULL) {
79  Outlines = ConvertBlob(Blob);
80 
81  RemainingOutlines = Outlines;
82  iterate(RemainingOutlines) {
83  Outline = (MFOUTLINE) first_node (RemainingOutlines);
84  CharNormalizeOutline(Outline, cn_denorm);
85  }
86 
87  RemainingOutlines = Outlines;
88  iterate(RemainingOutlines) {
89  Outline = (MFOUTLINE) first_node(RemainingOutlines);
91  MarkDirectionChanges(Outline);
92  MicroFeatures = ConvertToMicroFeatures(Outline, MicroFeatures);
93  }
94  FreeOutlines(Outlines);
95  }
96  return MicroFeatures;
97 } /* BlobMicroFeatures */
void CharNormalizeOutline(MFOUTLINE Outline, const DENORM &cn_denorm)
Definition: mfoutline.cpp:359
#define NIL_LIST
Definition: oldlist.h:126
double classify_min_slope
Definition: mfx.cpp:37
void FindDirectionChanges(MFOUTLINE Outline, FLOAT32 MinSlope, FLOAT32 MaxSlope)
Definition: mfoutline.cpp:120
LIST ConvertBlob(TBLOB *blob)
Definition: mfoutline.cpp:39
void FreeOutlines(LIST Outlines)
Definition: mfoutline.cpp:178
#define first_node(l)
Definition: oldlist.h:139
#define iterate(l)
Definition: oldlist.h:159
void MarkDirectionChanges(MFOUTLINE Outline)
Definition: mfoutline.cpp:198
#define NULL
Definition: host.h:144
MICROFEATURES ConvertToMicroFeatures(MFOUTLINE Outline, MICROFEATURES MicroFeatures)
Definition: mfx.cpp:141
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

"Slope below which lines are called horizontal"

Definition at line 37 of file mfx.cpp.