21 #define _USE_MATH_DEFINES // for M_PI 42 #include "config_auto.h" 48 #define PROTO_PRUNER_SCALE (4.0) 50 #define INT_DESCENDER (0.0 * INT_CHAR_NORM_RANGE) 51 #define INT_BASELINE (0.25 * INT_CHAR_NORM_RANGE) 52 #define INT_XHEIGHT (0.75 * INT_CHAR_NORM_RANGE) 53 #define INT_CAPHEIGHT (1.0 * INT_CHAR_NORM_RANGE) 55 #define INT_XCENTER (0.5 * INT_CHAR_NORM_RANGE) 56 #define INT_YCENTER (0.5 * INT_CHAR_NORM_RANGE) 57 #define INT_XRADIUS (0.2 * INT_CHAR_NORM_RANGE) 58 #define INT_YRADIUS (0.2 * INT_CHAR_NORM_RANGE) 61 #define INT_MAX_X INT_CHAR_NORM_RANGE 62 #define INT_MAX_Y INT_CHAR_NORM_RANGE 65 #define HV_TOLERANCE (0.0025) 70 #define MAX_NUM_SWITCHES 3 108 #define OLD_MAX_NUM_CONFIGS 32 109 #define OLD_WERDS_PER_CONFIG_VEC ((OLD_MAX_NUM_CONFIGS + BITS_PER_WERD - 1) /\ 116 #define CircularIncrement(i,r) (((i) < (r) - 1)?((i)++):((i) = 0)) 119 #define MapParam(P,O,N) (std::floor(((P) + (O)) * (N))) 124 float BucketStart(
int Bucket,
float Offset,
int NumBuckets);
126 float BucketEnd(
int Bucket,
float Offset,
int NumBuckets);
138 int Bit,
float Center,
float Spread,
bool debug);
141 int Bit,
float Center,
float Spread,
bool debug);
158 #ifndef GRAPHICS_DISABLED 166 #endif // GRAPHICS_DISABLED 176 static ScrollView* FeatureDisplayWindow =
nullptr;
177 static ScrollView* ProtoDisplayWindow =
nullptr;
184 static INT_VAR(classify_num_cp_levels, 3,
"Number of Class Pruner Levels");
185 static double_VAR(classify_cp_angle_pad_loose, 45.0,
186 "Class Pruner Angle Pad Loose");
187 static double_VAR(classify_cp_angle_pad_medium, 20.0,
188 "Class Pruner Angle Pad Medium");
189 static double_VAR(classify_cp_angle_pad_tight, 10.0,
190 "CLass Pruner Angle Pad Tight");
191 static double_VAR(classify_cp_end_pad_loose, 0.5,
"Class Pruner End Pad Loose");
192 static double_VAR(classify_cp_end_pad_medium, 0.5,
"Class Pruner End Pad Medium");
193 static double_VAR(classify_cp_end_pad_tight, 0.5,
"Class Pruner End Pad Tight");
194 static double_VAR(classify_cp_side_pad_loose, 2.5,
"Class Pruner Side Pad Loose");
195 static double_VAR(classify_cp_side_pad_medium, 1.2,
"Class Pruner Side Pad Medium");
196 static double_VAR(classify_cp_side_pad_tight, 0.6,
"Class Pruner Side Pad Tight");
197 static double_VAR(classify_pp_angle_pad, 45.0,
"Proto Pruner Angle Pad");
198 static double_VAR(classify_pp_end_pad, 0.5,
"Proto Prune End Pad");
199 static double_VAR(classify_pp_side_pad, 2.5,
"Proto Pruner Side Pad");
207 : X(
ClipToRange<int16_t>(static_cast<int16_t>(pos.x() + 0.5), 0, 255)),
208 Y(
ClipToRange<int16_t>(static_cast<int16_t>(pos.y() + 0.5), 0, 255)),
216 Theta(static_cast<uint8_t>(
ClipToRange<
int>(theta, 0, UINT8_MAX))),
236 fprintf(stderr,
"Please make sure that classes are added to templates");
237 fprintf(stderr,
" in increasing order of ClassIds\n");
299 memset(ProtoSet, 0,
sizeof(*ProtoSet));
337 float EndPad, SidePad, AnglePad;
345 for (Level = classify_num_cp_levels - 1; Level >= 0; Level--) {
352 DoFill(&FillSpec, Pruner, ClassMask, ClassCount, WordIndex);
369 float Angle, X, Y, Length;
375 cprintf(
"AddProtoToProtoPruner:assert failed: %d < %d",
377 assert(ProtoId < Class->NumProtos);
382 Angle = Proto->
Angle;
384 assert(!std::isnan(Angle));
388 Angle +
ANGLE_SHIFT, classify_pp_angle_pad / 360.0,
395 Pad = std::max(fabs (cos (Angle)) * (Length / 2.0 +
396 classify_pp_end_pad *
398 fabs (sin (Angle)) * (classify_pp_side_pad *
404 Pad = std::max(fabs (sin (Angle)) * (Length / 2.0 +
405 classify_pp_end_pad *
407 fabs (cos (Angle)) * (classify_pp_side_pad *
418 uint8_t
Bucket8For(
float param,
float offset,
int num_buckets) {
420 return static_cast<uint8_t
>(ClipToRange<int>(bucket, 0, num_buckets - 1));
422 uint16_t
Bucket16For(
float param,
float offset,
int num_buckets) {
424 return static_cast<uint16_t
>(ClipToRange<int>(bucket, 0, num_buckets - 1));
434 return static_cast<uint8_t
>(
Modulo(bucket, num_buckets));
438 #ifndef GRAPHICS_DISABLED 448 if (IntMatchWindow !=
nullptr)
468 for (ProtoId = 0, TotalLength = 0;
492 assert(ProtoId < Class->NumProtos);
515 cprintf(
"Converted ffeat to (A=%d,B=%d,C=%d,L=%d)",
539 for (ClassId = 0; ClassId < target_unicharset.
size(); ClassId++) {
540 FClass = &(FloatProtos[ClassId]);
542 strcmp(target_unicharset.
id_to_unichar(ClassId),
" ") != 0) {
543 cprintf(
"Warning: no protos/configs for %s in CreateIntTemplates()\n",
551 for (
int i = 0; i < fs.
size; ++i) {
562 for (ProtoId = 0; ProtoId < FClass->
NumProtos; ProtoId++) {
570 for (ConfigId = 0; ConfigId < FClass->
NumConfigs; ConfigId++) {
575 return (IntTemplates);
580 #ifndef GRAPHICS_DISABLED 593 if (FeatureDisplayWindow) {
611 if (ProtoDisplayWindow) {
645 memset(ProtoSet, 0,
sizeof(*ProtoSet));
664 static void free_int_class(
INT_CLASS int_class) {
702 free_int_class(templates->
Class[i]);
719 int i, j, w, x, y, z;
729 int b, bit_number, last_cp_bit_number, new_b, new_i, new_w;
733 auto **TempClassPruner =
735 uint32_t SetBitsForMask =
737 uint32_t Mask, NewMask, ClassBits;
744 if (fp->
FReadEndian(&unicharset_size,
sizeof(unicharset_size), 1) != 1)
745 tprintf(
"Bad read of inttemp!\n");
750 tprintf(
"Bad read of inttemp!\n");
756 tprintf(
"Bad read of inttemp!\n");
759 if (version_id < 3) {
764 if (version_id < 2) {
765 if (fp->
FReadEndian(IndexFor,
sizeof(IndexFor[0]), unicharset_size) !=
767 tprintf(
"Bad read of inttemp!\n");
769 if (fp->
FReadEndian(ClassIdFor,
sizeof(ClassIdFor[0]),
771 tprintf(
"Bad read of inttemp!\n");
776 const int kNumBuckets =
780 if (fp->
FReadEndian(Pruner,
sizeof(Pruner->
p[0][0][0][0]), kNumBuckets) !=
782 tprintf(
"Bad read of inttemp!\n");
784 if (version_id < 2) {
785 TempClassPruner[i] = Pruner;
792 if (version_id < 2) {
796 if (ClassIdFor[i] > max_class_id)
797 max_class_id = ClassIdFor[i];
810 if (TempClassPruner[i]->p[x][y][z][w] == 0)
814 if (bit_number > last_cp_bit_number)
818 Mask = SetBitsForMask << b;
819 ClassBits = TempClassPruner[i]->p[x][y][z][w] & Mask;
826 ClassBits <<= (new_b - b);
828 ClassBits >>= (b - new_b);
832 NewMask = SetBitsForMask << new_b;
833 Templates->
ClassPruners[new_i]->
p[x][y][z][new_w] &= ~NewMask;
834 Templates->
ClassPruners[new_i]->
p[x][y][z][new_w] |= ClassBits;
839 delete TempClassPruner[i];
850 tprintf(
"Bad read of inttemp!\n");
851 if (version_id == 0) {
853 for (j = 0; j < 5; ++j) {
855 if (fp->
FRead(&junk,
sizeof(junk), 1) != 1)
856 tprintf(
"Bad read of inttemp!\n");
859 int num_configs = version_id < 4 ? MaxNumConfigs : Class->
NumConfigs;
863 tprintf(
"Bad read of inttemp!\n");
865 if (version_id < 2) {
877 tprintf(
"Bad read of inttemp!\n");
887 num_buckets) != num_buckets)
888 tprintf(
"Bad read of inttemp!\n");
898 tprintf(
"Bad read of inttemp!\n");
901 WerdsPerConfigVec) != WerdsPerConfigVec)
902 cprintf(
"Bad read of inttemp!\n");
906 if (version_id < 4) {
913 if (version_id < 2) {
921 if (i < Templates->NumClasses) {
923 fprintf(stderr,
"Non-contiguous class ids in inttemp\n");
928 fprintf(stderr,
"Class id %d exceeds NumClassesIn (Templates) %d\n",
935 if (version_id >= 4) {
937 if (version_id >= 5) {
947 delete[] TempClassPruner;
953 #ifndef GRAPHICS_DISABLED 964 if (ProtoDisplayWindow) {
965 ProtoDisplayWindow->
Clear();
967 if (FeatureDisplayWindow) {
968 FeatureDisplayWindow->
Clear();
975 if (ProtoDisplayWindow) {
979 if (FeatureDisplayWindow) {
1021 int unicharset_size = target_unicharset.
size();
1022 int version_id = -5;
1024 if (Templates->
NumClasses != unicharset_size) {
1025 cprintf(
"Warning: executing WriteIntTemplates() with %d classes in" 1026 " Templates, while target_unicharset size is %d\n",
1031 fwrite(&unicharset_size,
sizeof(unicharset_size), 1,
File);
1032 fwrite(&version_id,
sizeof(version_id), 1,
File);
1043 for (i = 0; i < Templates->
NumClasses; i++) {
1044 Class = Templates->
Class[i];
1093 return ((static_cast<float>(Bucket) / NumBuckets) - Offset);
1109 return ((static_cast<float>(Bucket + 1) / NumBuckets) - Offset);
1125 uint32_t ClassCount,
1126 uint32_t WordIndex) {
1136 if (FillSpec->
YStart < 0)
1141 for (Y = FillSpec->
YStart; Y <= FillSpec->YEnd; Y++)
1144 OldWord = Pruner->
p[X][Y][Angle][WordIndex];
1145 if (ClassCount > (OldWord & ClassMask)) {
1146 OldWord &= ~ClassMask;
1147 OldWord |= ClassCount;
1148 Pruner->
p[X][Y][Angle][WordIndex] = OldWord;
1185 int Bit,
float Center,
float Spread,
bool debug) {
1186 int i, FirstBucket, LastBucket;
1191 FirstBucket =
static_cast<int>(std::floor((Center - Spread) *
NUM_PP_BUCKETS));
1192 if (FirstBucket < 0)
1195 LastBucket =
static_cast<int>(std::floor((Center + Spread) *
NUM_PP_BUCKETS));
1198 if (debug)
tprintf(
"Circular fill from %d to %d", FirstBucket, LastBucket);
1203 if (i == LastBucket)
1224 int Bit,
float Center,
float Spread,
bool debug) {
1225 int i, FirstBucket, LastBucket;
1227 FirstBucket =
static_cast<int>(std::floor((Center - Spread) *
NUM_PP_BUCKETS));
1228 if (FirstBucket < 0)
1231 LastBucket =
static_cast<int>(std::floor((Center + Spread) *
NUM_PP_BUCKETS));
1235 if (debug)
tprintf(
"Linear fill from %d to %d", FirstBucket, LastBucket);
1236 for (i = FirstBucket; i <= LastBucket; i++)
1243 #ifndef GRAPHICS_DISABLED 1256 bool* pretrained_on,
int* shape_id) {
1260 int unichar_id = INVALID_UNICHAR_ID;
1269 *adaptive_on =
false;
1270 *pretrained_on =
true;
1271 if (*shape_id >= 0 && *shape_id < shape_table_->NumShapes()) {
1275 tprintf(
"Shape %d, first unichar=%d, font=%d\n",
1276 *shape_id, unichar_id, font_id);
1281 tprintf(
"No shape table loaded!\n");
1287 *adaptive_on =
true;
1288 *pretrained_on =
false;
1291 *adaptive_on =
false;
1292 *pretrained_on =
true;
1294 *adaptive_on =
true;
1295 *pretrained_on =
true;
1307 tprintf(
"Char class '%s' not found in unicharset",
1339 *AnglePad = classify_cp_angle_pad_loose / 360.0;
1345 *AnglePad = classify_cp_angle_pad_medium / 360.0;
1351 *AnglePad = classify_cp_angle_pad_tight / 360.0;
1357 *AnglePad = classify_cp_angle_pad_tight / 360.0;
1360 if (*AnglePad > 0.5)
1371 assert (Evidence >= 0.0);
1372 assert (Evidence <= 1.0);
1374 if (Evidence >= 0.90)
1376 else if (Evidence >= 0.75)
1378 else if (Evidence >= 0.50)
1398 Fill->
X = Filler->
X;
1404 while (Filler->
X >= Next->
X) {
1405 Fill->
X = Filler->
X = Next->
X;
1412 Fill->
YEnd = Next->
Y;
1443 #define AS ANGLE_SHIFT 1444 #define NB NUM_CP_BUCKETS 1447 float X, Y, HalfLength;
1449 float XAdjust, YAdjust;
1450 FPOINT Start, Switch1, Switch2, End;
1454 Angle = Proto->
Angle;
1457 HalfLength = Proto->
Length / 2.0;
1485 if ((Angle > 0.0 && Angle < 0.25) || (Angle > 0.5 && Angle < 0.75)) {
1487 Angle *= 2.0 * M_PI;
1488 Cos = fabs(cos(Angle));
1489 Sin = fabs(sin(Angle));
1492 Start.
x = X - (HalfLength + EndPad) * Cos - SidePad * Sin;
1493 Start.
y = Y - (HalfLength + EndPad) * Sin + SidePad * Cos;
1494 End.
x = 2.0 * X - Start.
x;
1495 End.
y = 2.0 * Y - Start.
y;
1496 Switch1.
x = X - (HalfLength + EndPad) * Cos + SidePad * Sin;
1497 Switch1.
y = Y - (HalfLength + EndPad) * Sin - SidePad * Cos;
1498 Switch2.
x = 2.0 * X - Switch1.
x;
1499 Switch2.
y = 2.0 * Y - Switch1.
y;
1501 if (Switch1.
x > Switch2.
x) {
1508 Filler->
StartDelta = -
static_cast<int16_t
>((Cos / Sin) * 256);
1509 Filler->
EndDelta =
static_cast<int16_t
>((Sin / Cos) * 256);
1512 YAdjust = XAdjust * Cos / Sin;
1514 YAdjust = XAdjust * Sin / Cos;
1521 YAdjust = XAdjust * Sin / Cos;
1529 YAdjust = XAdjust * Cos / Sin;
1537 Angle *= 2.0 * M_PI;
1538 Cos = fabs(cos(Angle));
1539 Sin = fabs(sin(Angle));
1542 Start.
x = X - (HalfLength + EndPad) * Cos - SidePad * Sin;
1543 Start.
y = Y + (HalfLength + EndPad) * Sin - SidePad * Cos;
1544 End.
x = 2.0 * X - Start.
x;
1545 End.
y = 2.0 * Y - Start.
y;
1546 Switch1.
x = X - (HalfLength + EndPad) * Cos + SidePad * Sin;
1547 Switch1.
y = Y + (HalfLength + EndPad) * Sin + SidePad * Cos;
1548 Switch2.
x = 2.0 * X - Switch1.
x;
1549 Switch2.
y = 2.0 * Y - Switch1.
y;
1551 if (Switch1.
x > Switch2.
x) {
1558 Filler->
StartDelta =
static_cast<int16_t
>(ClipToRange<int>(
1560 Filler->
EndDelta =
static_cast<int16_t
>(ClipToRange<int>(
1564 YAdjust = XAdjust * Sin / Cos;
1566 YAdjust = XAdjust * Cos / Sin;
1573 YAdjust = XAdjust * Sin / Cos;
1581 YAdjust = XAdjust * Cos / Sin;
1593 #ifndef GRAPHICS_DISABLED 1604 float X, Y, Dx, Dy, Length;
1607 assert(Feature !=
nullptr);
1615 Dx = (Length / 2.0) * cos((Feature->
Theta / 256.0) * 2.0 * M_PI - M_PI);
1616 Dy = (Length / 2.0) * sin((Feature->
Theta / 256.0) * 2.0 * M_PI - M_PI);
1619 window->
DrawTo(X + Dx, Y + Dy);
1645 int Xmin, Xmax, Ymin, Ymax;
1650 assert(ProtoId >= 0);
1651 assert(Class !=
nullptr);
1652 assert(ProtoId < Class->NumProtos);
1658 Proto = &(ProtoSet->
Protos[ProtoSetIndex]);
1680 Dx = (Length / 2.0) * cos((Proto->
Angle / 256.0) * 2.0 * M_PI - M_PI);
1681 Dy = (Length / 2.0) * sin((Proto->
Angle / 256.0) * 2.0 * M_PI - M_PI);
1684 window->
DrawTo(X + Dx, Y + Dy);
1704 cprintf(
"Warning: Param %s truncated from %f to %d!\n",
1707 }
else if (Param > Max) {
1709 cprintf(
"Warning: Param %s truncated from %f to %d!\n",
1713 return static_cast<int>(std::floor(Param));
1717 #ifndef GRAPHICS_DISABLED 1723 if (IntMatchWindow ==
nullptr) {
1727 popup_menu->AddChild(
"Debug Adapted classes",
IDA_ADAPTIVE,
1728 "x",
"Class to debug");
1729 popup_menu->AddChild(
"Debug Static classes",
IDA_STATIC,
1730 "x",
"Class to debug");
1731 popup_menu->AddChild(
"Debug Both",
IDA_BOTH,
1732 "x",
"Class to debug");
1734 "0",
"Index to debug");
1735 popup_menu->BuildMenu(IntMatchWindow,
false);
1744 if (ProtoDisplayWindow ==
nullptr) {
1755 if (FeatureDisplayWindow ==
nullptr) {
1764 return new ScrollView(name, xpos, ypos, 520, 520, 260, 260,
true);
1766 #endif // GRAPHICS_DISABLED
void Rectangle(int x1, int y1, int x2, int y2)
#define ClassForClassId(T, c)
int size() const
Return the size used.
INT_CLASS Class[MAX_NUM_CLASSES]
DLLSYM void tprintf(const char *format,...)
void ClearFeatureSpaceWindow(NORM_METHOD norm_method, ScrollView *window)
void RenderIntFeature(ScrollView *window, const INT_FEATURE_STRUCT *Feature, ScrollView::Color color)
uint8_t Bucket8For(float param, float offset, int num_buckets)
ShapeTable * shape_table_
int AddIntProto(INT_CLASS Class)
int AddIntConfig(INT_CLASS Class)
int FReadEndian(void *buffer, size_t size, int count)
void AddIntClass(INT_TEMPLATES Templates, CLASS_ID ClassId, INT_CLASS Class)
void WriteIntTemplates(FILE *File, INT_TEMPLATES Templates, const UNICHARSET &target_unicharset)
void AddProtoToProtoPruner(PROTO Proto, int ProtoId, INT_CLASS Class, bool debug)
UnicityTable< FontSet > fontset_table_
#define INT_CHAR_NORM_RANGE
void ConvertConfig(BIT_VECTOR Config, int ConfigId, INT_CLASS Class)
#define PROTO_PRUNER_SCALE
void ZoomToRectangle(int x1, int y1, int x2, int y2)
UnicityTableEqEq< int > font_set
INT_TEMPLATES NewIntTemplates()
CLASS_PRUNER_STRUCT * ClassPruners[MAX_NUM_CLASS_PRUNERS]
#define PROTOS_PER_PROTO_SET
bool read_spacing_info(TFile *f, FontInfo *fi)
UnicityTable< FontInfo > fontinfo_table_
bool write_spacing_info(FILE *f, const FontInfo &fi)
int TruncateParam(float Param, int Min, int Max, char *Id)
#define MAX_NUM_PROTO_SETS
void InitIntMatchWindowIfReqd()
void InitProtoDisplayWindowIfReqd()
SVEvent * AwaitEvent(SVEventType type)
void ConvertProto(PROTO Proto, int ProtoId, INT_CLASS Class)
INT_TEMPLATES ReadIntTemplates(TFile *fp)
const T & get(int id) const
Return the object from an id.
const Shape & GetShape(int shape_id) const
#define test_bit(array, bit)
float BucketEnd(int Bucket, float Offset, int NumBuckets)
void * Erealloc(void *ptr, int size)
INT_PROTO_STRUCT Protos[PROTOS_PER_PROTO_SET]
bool ContainsUnichar(int unichar_id) const
void free_int_templates(INT_TEMPLATES templates)
#define WERDS_PER_PP_VECTOR
const char * string() const
#define ProtoIn(Class, Pid)
void DoFill(FILL_SPEC *FillSpec, CLASS_PRUNER_STRUCT *Pruner, uint32_t ClassMask, uint32_t ClassCount, uint32_t WordIndex)
#define CPrunerMaskFor(L, c)
T ClipToRange(const T &x, const T &lower_bound, const T &upper_bound)
#define double_VAR(name, val, comment)
void GetFirstUnicharAndFont(int shape_id, int *unichar_id, int *font_id) const
void GetNextFill(TABLE_FILLER *Filler, FILL_SPEC *Fill)
#define MaxNumIntProtosIn(C)
ScrollView::Color GetMatchColorFor(float Evidence)
void cprintf(const char *format,...)
uint32_t Configs[WERDS_PER_CONFIG_VEC]
#define GetPicoFeatureLength()
bool FillerDone(TABLE_FILLER *Filler)
INT_CLASS NewIntClass(int MaxNumProtos, int MaxNumConfigs)
void FillPPCircularBits(uint32_t ParamTable[NUM_PP_BUCKETS][WERDS_PER_PP_VECTOR], int Bit, float Center, float Spread, bool debug)
#define OLD_WERDS_PER_CONFIG_VEC
#define SET_BIT(array, bit)
void InitFeatureDisplayWindowIfReqd()
STRING DebugStr(int shape_id) const
#define CircularIncrement(i, r)
void UpdateMatchDisplay()
ScrollView * CreateFeatureSpaceWindow(const char *name, int xpos, int ypos)
void DrawTo(int x, int y)
#define WERDS_PER_CONFIG_VEC
bool read_set(TFile *f, FontSet *fs)
#define BITS_PER_CP_VECTOR
bool write_info(FILE *f, const FontInfo &fi)
#define MaxNumClassesIn(T)
#define PPrunerMaskFor(I)
#define PPrunerWordIndexFor(I)
PROTO_SET ProtoSets[MAX_NUM_PROTO_SETS]
#define NUM_BITS_PER_CLASS
UNICHAR_ID unichar_to_id(const char *const unichar_repr) const
void AddProtoToClassPruner(PROTO Proto, CLASS_ID ClassId, INT_TEMPLATES Templates)
void UpdateRange(const T1 &x, T2 *lower_bound, T2 *upper_bound)
bool contains_unichar(const char *const unichar_repr) const
#define CPrunerBitIndexFor(c)
void FillPPLinearBits(uint32_t ParamTable[NUM_PP_BUCKETS][WERDS_PER_PP_VECTOR], int Bit, float Center, float Spread, bool debug)
FILL_SWITCH Switch[MAX_NUM_SWITCHES]
#define MAX_NUM_CLASS_PRUNERS
#define UnusedClassIdIn(T, c)
uint16_t ConfigLengths[MAX_NUM_CONFIGS]
#define WERDS_PER_CP_VECTOR
int classify_learning_debug_level
float BucketStart(int Bucket, float Offset, int NumBuckets)
bool read_info(TFile *f, FontInfo *fi)
const char * id_to_unichar(UNICHAR_ID id) const
CLASS_ID GetClassToDebug(const char *Prompt, bool *adaptive_on, bool *pretrained_on, int *shape_id)
_ConstTessMemberResultCallback_5_0< false, R, T1, P1, P2, P3, P4, P5 >::base * NewPermanentTessCallback(const T1 *obj, R(T2::*member)(P1, P2, P3, P4, P5) const, typename Identity< P1 >::type p1, typename Identity< P2 >::type p2, typename Identity< P3 >::type p3, typename Identity< P4 >::type p4, typename Identity< P5 >::type p5)
INT_TEMPLATES CreateIntTemplates(CLASSES FloatProtos, const UNICHARSET &target_unicharset)
#define MapParam(P, O, N)
uint16_t Bucket16For(float param, float offset, int num_buckets)
uint32_t p[NUM_CP_BUCKETS][NUM_CP_BUCKETS][NUM_CP_BUCKETS][WERDS_PER_CP_VECTOR]
void DisplayIntProto(INT_CLASS Class, PROTO_ID ProtoId, float Evidence)
bool write_set(FILE *f, const FontSet &fs)
#define INT_VAR(name, val, comment)
#define CPrunerWordIndexFor(c)
int FRead(void *buffer, size_t size, int count)
int IntCastRounded(double x)
void RenderIntProto(ScrollView *window, INT_CLASS Class, PROTO_ID ProtoId, ScrollView::Color color)
void SetCursor(int x, int y)
#define OLD_MAX_NUM_CONFIGS
#define ProtoForProtoId(C, P)
void GetCPPadsForLevel(int Level, float *EndPad, float *SidePad, float *AnglePad)
void DisplayIntFeature(const INT_FEATURE_STRUCT *Feature, float Evidence)
void InitTableFiller(float EndPad, float SidePad, float AnglePad, PROTO Proto, TABLE_FILLER *Filler)
uint8_t CircBucketFor(float param, float offset, int num_buckets)