MCPcopy Create free account
hub / github.com/creatale/node-dv / ConvertToMicroFeatures

Function ConvertToMicroFeatures

deps/tesseract/classify/mfx.cpp:140–164  ·  view source on GitHub ↗

* Convert Outline to MicroFeatures * @param Outline outline to extract micro-features from * @param MicroFeatures list of micro-features to add to * @return List of micro-features with new features added to front. * @note Globals: none * @note Exceptions: none * @note History: 7/26/89, DSJ, Created. */

Source from the content-addressed store, hash-verified

138 * @note History: 7/26/89, DSJ, Created.
139 */
140MICROFEATURES ConvertToMicroFeatures(MFOUTLINE Outline,
141 MICROFEATURES MicroFeatures) {
142 MFOUTLINE Current;
143 MFOUTLINE Last;
144 MFOUTLINE First;
145 MICROFEATURE NewFeature;
146
147 if (DegenerateOutline (Outline))
148 return (MicroFeatures);
149
150 First = NextExtremity (Outline);
151 Last = First;
152 do {
153 Current = NextExtremity (Last);
154 if (!PointAt(Current)->Hidden) {
155 NewFeature = ExtractMicroFeature (Last, Current);
156 if (NewFeature != NULL)
157 MicroFeatures = push (MicroFeatures, NewFeature);
158 }
159 Last = Current;
160 }
161 while (Last != First);
162
163 return (MicroFeatures);
164} /* ConvertToMicroFeatures */
165
166/**
167 * This routine computes the feature parameters which describe

Callers 1

iterateFunction · 0.85

Calls 3

NextExtremityFunction · 0.85
ExtractMicroFeatureFunction · 0.85
pushFunction · 0.85

Tested by

no test coverage detected