#include "mergenf.h"
#include "protos.h"
#include "cluster.h"
#include "ocrfeatures.h"
#include "callcpp.h"
#include "picofeat.h"
#include "host.h"
#include "efio.h"
#include "clusttool.h"
#include "oldlist.h"
#include "ndminx.h"
#include "const.h"
#include "featdefs.h"
#include "intproto.h"
#include "params.h"
#include <stdio.h>
#include <string.h>
#include <math.h>
Functions | |
FLOAT32 | CompareProtos (PROTO p1, PROTO p2) |
void | ComputeMergedProto (PROTO p1, PROTO p2, FLOAT32 w1, FLOAT32 w2, PROTO MergedProto) |
int | FindClosestExistingProto (CLASS_TYPE Class, int NumMerged[], PROTOTYPE *Prototype) |
void | MakeNewFromOld (PROTO New, PROTOTYPE *Old) |
SubfeatureEvidence | |
FLOAT32 | SubfeatureEvidence (FEATURE Feature, PROTO Proto) |
EvidenceOf | |
double | EvidenceOf (double Similarity) |
BOOL8 | DummyFastMatch (FEATURE Feature, PROTO Proto) |
void | ComputePaddedBoundingBox (PROTO Proto, FLOAT32 TangentPad, FLOAT32 OrthogonalPad, FRECT *BoundingBox) |
BOOL8 | PointInside (FRECT *Rectangle, FLOAT32 X, FLOAT32 Y) |
Variables | |
double | training_angle_match_scale = 1.0 |
double | training_similarity_midpoint = 0.0075 |
double | training_similarity_curl = 2.0 |
double | training_tangent_bbox_pad = 0.5 |
double | training_orthogonal_bbox_pad = 2.5 |
double | training_angle_pad = 45.0 |
Compare protos p1 and p2 and return an estimate of the worst evidence rating that will result for any part of p1 that is compared to p2. In other words, if p1 were broken into pico-features and each pico-feature was matched to p2, what is the worst evidence rating that will be achieved for any pico-feature.
p1,p2 | protos to be compared |
Globals: none
This routine computes a proto which is the weighted average of protos p1 and p2. The new proto is returned in MergedProto.
p1,p2 | protos to be merged | |
w1,w2 | weight of each proto | |
MergedProto | place to put resulting merged proto |
Globals: none
void ComputePaddedBoundingBox | ( | PROTO | Proto, | |
FLOAT32 | TangentPad, | |||
FLOAT32 | OrthogonalPad, | |||
FRECT * | BoundingBox | |||
) |
This routine computes a bounding box that encloses the specified proto along with some padding. The amount of padding is specified as separate distances in the tangential and orthogonal directions.
Proto | proto to compute bounding box for | |
TangentPad | amount of pad to add in direction of segment | |
OrthogonalPad | amount of pad to add orthogonal to segment | |
[out] | BoundingBox | place to put results |
Globals: none
This routine returns TRUE if Feature would be matched by a fast match table built from Proto.
Feature | feature to be "fast matched" to proto | |
Proto | proto being "fast matched" against |
Globals:
double EvidenceOf | ( | double | Similarity | ) |
int FindClosestExistingProto | ( | CLASS_TYPE | Class, | |
int | NumMerged[], | |||
PROTOTYPE * | Prototype | |||
) |
This routine searches thru all of the prototypes in Class and returns the id of the proto which would provide the best approximation of Prototype. If no close approximation can be found, NO_PROTO is returned.
Class | class to search for matching old proto in | |
NumMerged | # of protos merged into each proto of Class | |
Prototype | new proto to find match for |
Globals: none
This fills in the fields of the New proto based on the fields of the Old proto.
New | new proto to be filled in | |
Old | old proto to be converted |
Globals: none
Exceptions: none History: Mon Nov 26 09:45:39 1990, DSJ, Created.
Return TRUE if point (X,Y) is inside of Rectangle.
Globals: none
double training_angle_match_scale = 1.0 |
"Angle Match Scale ..."
double training_angle_pad = 45.0 |
"Angle pad ..."
double training_orthogonal_bbox_pad = 2.5 |
"Orthogonal bounding box pad ..."
double training_similarity_curl = 2.0 |
"Similarity Curl ..."
double training_similarity_midpoint = 0.0075 |
"Similarity Midpoint ..."
double training_tangent_bbox_pad = 0.5 |
"Tangent bounding box pad ..."