#include "ocrfeatures.h"
#include "tessclas.h"
#include "fxdefs.h"
Go to the source code of this file.
#define GetPicoFeatureLength | ( | ) | (PicoFeatureLength) |
Definition at line 45 of file picofeat.h.
Referenced by AddProtoToProtoPruner(), AmbigClassifier(), BaselineClassifier(), CharNormClassifier(), CompareProtos(), ConvertProto(), DummyFastMatch(), GetBaselineFeatures(), GetBestRatingFor(), GetCPPadsForLevel(), MakeNewTempProtos(), RenderIntFeature(), RenderIntProto(), and ShowBestMatchFor().
#define MAX_PICO_FEATURES (1000) |
enum PICO_FEAT_PARAM_NAME |
FIX:.
Definition at line 33 of file picofeat.h.
00034 { 00035 PicoFeatY, 00036 PicoFeatDir, 00037 PicoFeatX 00038 } PICO_FEAT_PARAM_NAME;
FEATURE_SET ExtractPicoFeatures | ( | TBLOB * | Blob, | |
LINE_STATS * | LineStats | |||
) |
Dummy for now.
Blob | Blob to extract pico-features from | |
LineStats | Statistics on text row blob is in |
Definition at line 89 of file picofeat.cpp.
References baseline, ConvertBlob(), ConvertToPicoFeatures2(), first, FreeOutlines(), iterate, MAX_PICO_FEATURES, NewFeatureSet(), NormalizeOutlines(), NormalizePicoX(), NormMethod, and Outline.
Referenced by GetAdaptiveFeatures(), and GetBaselineFeatures().
00089 { 00090 LIST Outlines; 00091 LIST RemainingOutlines; 00092 MFOUTLINE Outline; 00093 FEATURE_SET FeatureSet; 00094 FLOAT32 XScale, YScale; 00095 00096 FeatureSet = NewFeatureSet (MAX_PICO_FEATURES); 00097 00098 Outlines = ConvertBlob (Blob); 00099 00100 NormalizeOutlines(Outlines, LineStats, &XScale, &YScale); 00101 RemainingOutlines = Outlines; 00102 iterate(RemainingOutlines) { 00103 Outline = (MFOUTLINE) first (RemainingOutlines); 00104 /*---------Debug--------------------------------------------------* 00105 OFile = fopen ("f:/ims/debug/pfOutline.logCPP", "r"); 00106 if (OFile == NULL) 00107 { 00108 OFile = Efopen ("f:/ims/debug/pfOutline.logCPP", "w"); 00109 WriteOutline(OFile, Outline); 00110 } 00111 else 00112 { 00113 fclose (OFile); 00114 OFile = Efopen ("f:/ims/debug/pfOutline.logCPP", "a"); 00115 } 00116 WriteOutline(OFile, Outline); 00117 fclose (OFile); 00118 *--------------------------------------------------------------------*/ 00119 ConvertToPicoFeatures2(Outline, FeatureSet); 00120 } 00121 if (NormMethod == baseline) 00122 NormalizePicoX(FeatureSet); 00123 /*---------Debug--------------------------------------------------* 00124 File = fopen ("f:/ims/debug/pfFeatSet.logCPP", "r"); 00125 if (File == NULL) 00126 { 00127 File = Efopen ("f:/ims/debug/pfFeatSet.logCPP", "w"); 00128 WriteFeatureSet(File, FeatureSet); 00129 } 00130 else 00131 { 00132 fclose (File); 00133 File = Efopen ("f:/ims/debug/pfFeatSet.logCPP", "a"); 00134 } 00135 WriteFeatureSet(File, FeatureSet); 00136 fclose (File); 00137 *--------------------------------------------------------------------*/ 00138 FreeOutlines(Outlines); 00139 return (FeatureSet); 00140 00141 } /* ExtractPicoFeatures */
void InitPicoFXVars | ( | ) |
Initialize the pico-feature extractor variables that can be tuned without recompiling.
none |
Definition at line 155 of file picofeat.cpp.
References dummy, float_variable, PICO_FEATURE_LENGTH, and PicoFeatureLength.
Referenced by InitAdaptiveClassifierVars().
00155 { 00156 00157 VALUE dummy; 00158 00159 float_variable (PicoFeatureLength, "PicoFeatureLength", 00160 PICO_FEATURE_LENGTH); 00161 00162 } /* InitPicoFXVars */
Referenced by CompareProtos(), and ConvertSegmentToPicoFeat().
Definition at line 57 of file featdefs.cpp.
Referenced by ConvertSegmentToPicoFeat(), and InitPicoFXVars().