18 #ifndef TESSERACT_TRAINING_MERGENF_H_
19 #define TESSERACT_TRAINING_MERGENF_H_
29 #define WORST_MATCH_ALLOWED (0.9)
30 #define WORST_EVIDENCE (1.0)
31 #define MAX_LENGTH_MISMATCH (2.0 * GetPicoFeatureLength())
33 #define PROTO_SUFFIX ".mf.p"
34 #define CONFIG_SUFFIX ".cl"
48 #define CenterX(M) ((M)[XPOSITION])
49 #define CenterY(M) ((M)[YPOSITION])
50 #define LengthOf(M) ((M)[MFLENGTH])
51 #define OrientationOf(M) ((M)[ORIENTATION])
bool PointInside(FRECT *Rectangle, float X, float Y)
float CompareProtos(tesseract::PROTO_STRUCT *p1, tesseract::PROTO_STRUCT *p2)
bool DummyFastMatch(tesseract::FEATURE Feature, tesseract::PROTO_STRUCT *Proto)
double EvidenceOf(double Similarity)
void ComputePaddedBoundingBox(tesseract::PROTO_STRUCT *Proto, float TangentPad, float OrthogonalPad, FRECT *BoundingBox)
void ComputeMergedProto(tesseract::PROTO_STRUCT *p1, tesseract::PROTO_STRUCT *p2, float w1, float w2, tesseract::PROTO_STRUCT *MergedProto)
int FindClosestExistingProto(tesseract::CLASS_TYPE Class, int NumMerged[], tesseract::PROTOTYPE *Prototype)
void MakeNewFromOld(tesseract::PROTO_STRUCT *New, tesseract::PROTOTYPE *Old)
float SubfeatureEvidence(tesseract::FEATURE Feature, tesseract::PROTO_STRUCT *Proto)