|
| Wordrec () |
|
virtual | ~Wordrec ()=default |
|
void | SaveAltChoices (const LIST &best_choices, WERD_RES *word) |
|
void | FillLattice (const MATRIX &ratings, const WERD_CHOICE_LIST &best_choices, const UNICHARSET &unicharset, BlamerBundle *blamer_bundle) |
|
void | CallFillLattice (const MATRIX &ratings, const WERD_CHOICE_LIST &best_choices, const UNICHARSET &unicharset, BlamerBundle *blamer_bundle) |
|
void | SegSearch (WERD_RES *word_res, BestChoiceBundle *best_choice_bundle, BlamerBundle *blamer_bundle) |
|
void | InitialSegSearch (WERD_RES *word_res, LMPainPoints *pain_points, GenericVector< SegSearchPending > *pending, BestChoiceBundle *best_choice_bundle, BlamerBundle *blamer_bundle) |
|
void | DoSegSearch (WERD_RES *word_res) |
|
SEAM * | attempt_blob_chop (TWERD *word, TBLOB *blob, int32_t blob_number, bool italic_blob, const GenericVector< SEAM *> &seams) |
|
SEAM * | chop_numbered_blob (TWERD *word, int32_t blob_number, bool italic_blob, const GenericVector< SEAM *> &seams) |
|
SEAM * | chop_overlapping_blob (const GenericVector< TBOX > &boxes, bool italic_blob, WERD_RES *word_res, int *blob_number) |
|
void | add_seam_to_queue (float new_priority, SEAM *new_seam, SeamQueue *seams) |
|
void | choose_best_seam (SeamQueue *seam_queue, const SPLIT *split, PRIORITY priority, SEAM **seam_result, TBLOB *blob, SeamPile *seam_pile) |
|
void | combine_seam (const SeamPile &seam_pile, const SEAM *seam, SeamQueue *seam_queue) |
|
SEAM * | pick_good_seam (TBLOB *blob) |
|
void | try_point_pairs (EDGEPT *points[MAX_NUM_POINTS], int16_t num_points, SeamQueue *seam_queue, SeamPile *seam_pile, SEAM **seam, TBLOB *blob) |
|
void | try_vertical_splits (EDGEPT *points[MAX_NUM_POINTS], int16_t num_points, EDGEPT_CLIST *new_points, SeamQueue *seam_queue, SeamPile *seam_pile, SEAM **seam, TBLOB *blob) |
|
PRIORITY | grade_split_length (SPLIT *split) |
|
PRIORITY | grade_sharpness (SPLIT *split) |
|
bool | near_point (EDGEPT *point, EDGEPT *line_pt_0, EDGEPT *line_pt_1, EDGEPT **near_pt) |
|
virtual BLOB_CHOICE_LIST * | classify_piece (const GenericVector< SEAM *> &seams, int16_t start, int16_t end, const char *description, TWERD *word, BlamerBundle *blamer_bundle) |
|
void | merge_fragments (MATRIX *ratings, int16_t num_blobs) |
|
void | get_fragment_lists (int16_t current_frag, int16_t current_row, int16_t start, int16_t num_frag_parts, int16_t num_blobs, MATRIX *ratings, BLOB_CHOICE_LIST *choice_lists) |
|
void | merge_and_put_fragment_lists (int16_t row, int16_t column, int16_t num_frag_parts, BLOB_CHOICE_LIST *choice_lists, MATRIX *ratings) |
|
void | fill_filtered_fragment_list (BLOB_CHOICE_LIST *choices, int fragment_pos, int num_frag_parts, BLOB_CHOICE_LIST *filtered_choices) |
|
|
Initialize all the things in the program that need to be initialized. init_permute determines whether to initialize the permute functions and Dawg models.
|
void | program_editup (const char *textbase, TessdataManager *init_classifier, TessdataManager *init_dict) |
|
|
|
void | cc_recog (WERD_RES *word) |
|
|
This function holds any necessary post processing for the Wise Owl program.
|
void | program_editdown (int32_t elasped_time) |
|
|
Get ready to do some pass 1 stuff.
|
void | set_pass1 () |
|
|
Get ready to do some pass 2 stuff.
|
void | set_pass2 () |
|
|
Cleanup and exit the recog program.
|
int | end_recog () |
|
|
Called from Tess with a blob in tess form. The blob may need rotating to the correct orientation for classification.
|
BLOB_CHOICE_LIST * | call_matcher (TBLOB *blob) |
|
|
Test the dictionaries, returning NO_PERM (0) if not found, or one of the PermuterType values if found, according to the dictionary.
|
int | dict_word (const WERD_CHOICE &word) |
|
|
Classify the this blob if it is not already recorded in the match table. Attempt to recognize this blob as a character. The recognition rating for this blob will be stored as a part of the blob. This value will also be returned to the caller. - Parameters
-
blob | Current blob |
string | The string to display in ScrollView |
color | The colour to use when displayed with ScrollView |
|
BLOB_CHOICE_LIST * | classify_blob (TBLOB *blob, const char *string, C_COL color, BlamerBundle *blamer_bundle) |
|
|
Assign a priority to and edge point that might be used as part of a split. The argument should be of type EDGEPT.
|
PRIORITY | point_priority (EDGEPT *point) |
|
|
Add an edge point to a POINT_GROUP containing a list of other points.
|
void | add_point_to_list (PointHeap *point_heap, EDGEPT *point) |
|
bool | is_inside_angle (EDGEPT *pt) |
|
|
Return the change in angle (degrees) of the line segments between points one and two, and two and three.
|
int | angle_change (EDGEPT *point1, EDGEPT *point2, EDGEPT *point3) |
|
|
Choose the edge point that is closest to the critical point. This point may not be exactly vertical from the critical point.
|
EDGEPT * | pick_close_point (EDGEPT *critical_point, EDGEPT *vertical_point, int *best_dist) |
|
|
Find a list of edge points from the outer outline of this blob. For each of these points assign a priority. Sort these points using a heap structure so that they can be visited in order.
|
void | prioritize_points (TESSLINE *outline, PointHeap *points) |
|
|
Found a new minimum point try to decide whether to save it or not. Return the new value for the local minimum. If a point is saved then the local minimum is reset to nullptr.
|
void | new_min_point (EDGEPT *local_min, PointHeap *points) |
|
|
Found a new minimum point try to decide whether to save it or not. Return the new value for the local minimum. If a point is saved then the local minimum is reset to nullptr.
|
void | new_max_point (EDGEPT *local_max, PointHeap *points) |
|
|
For one point on the outline, find the corresponding point on the other side of the outline that is a likely projection for a split point. This is done by iterating through the edge points until the X value of the point being looked at is greater than the X value of the split point. Ensure that the point being returned is not right next to the split point. Return the edge point in *best_point as a result, and any points that were newly created are also saved on the new_points list.
|
void | vertical_projection_point (EDGEPT *split_point, EDGEPT *target_point, EDGEPT **best_point, EDGEPT_CLIST *new_points) |
|
|
Finds the best place to chop, based on the worst blob, fixpt, or next to a fragment, according to the input. Returns the SEAM corresponding to the chop point, if any is found, and the index in the ratings_matrix of the chopped blob. Note that blob_choices is just a copy of the pointers in the leading diagonal of the ratings MATRIX. Although the blob is chopped, the returned SEAM is yet to be inserted into word->seam_array and the resulting blobs are unclassified, so this function can be used by ApplyBox as well as during recognition.
|
SEAM * | improve_one_blob (const GenericVector< BLOB_CHOICE *> &blob_choices, DANGERR *fixpt, bool split_next_to_fragment, bool italic_blob, WERD_RES *word, int *blob_number) |
|
|
Start with the current one-blob word and its classification. Find the worst blobs and try to divide it up to improve the ratings. Used for testing chopper.
|
SEAM * | chop_one_blob (const GenericVector< TBOX > &boxes, const GenericVector< BLOB_CHOICE *> &blob_choices, WERD_RES *word_res, int *blob_number) |
|
|
Classify the blobs in this word and permute the results. Find the worst blob in the word and chop it up. Continue this process until a good answer has been found or all the blobs have been chopped up enough. The results are returned in the WERD_RES.
|
void | chop_word_main (WERD_RES *word) |
|
|
Repeatedly chops the worst blob, classifying the new blobs fixing up all the data, and incrementally runs the segmentation search until a good word is found, or no more chops can be found.
|
void | improve_by_chopping (float rating_cert_scale, WERD_RES *word, BestChoiceBundle *best_choice_bundle, BlamerBundle *blamer_bundle, LMPainPoints *pain_points, GenericVector< SegSearchPending > *pending) |
|
int | select_blob_to_split (const GenericVector< BLOB_CHOICE *> &blob_choices, float rating_ceiling, bool split_next_to_fragment) |
|
int | select_blob_to_split_from_fixpt (DANGERR *fixpt) |
|
| Classify () |
|
virtual | ~Classify () |
|
virtual Dict & | getDict () |
|
const ShapeTable * | shape_table () const |
|
void | SetStaticClassifier (ShapeClassifier *static_classifier) |
|
void | AddLargeSpeckleTo (int blob_length, BLOB_CHOICE_LIST *choices) |
|
bool | LargeSpeckle (const TBLOB &blob) |
|
ADAPT_TEMPLATES | NewAdaptedTemplates (bool InitFromUnicharset) |
|
int | GetFontinfoId (ADAPT_CLASS Class, uint8_t ConfigId) |
|
int | PruneClasses (const INT_TEMPLATES_STRUCT *int_templates, int num_features, int keep_this, const INT_FEATURE_STRUCT *features, const uint8_t *normalization_factors, const uint16_t *expected_num_features, GenericVector< CP_RESULT_STRUCT > *results) |
|
void | ReadNewCutoffs (TFile *fp, CLASS_CUTOFF_ARRAY Cutoffs) |
|
void | PrintAdaptedTemplates (FILE *File, ADAPT_TEMPLATES Templates) |
|
void | WriteAdaptedTemplates (FILE *File, ADAPT_TEMPLATES Templates) |
|
ADAPT_TEMPLATES | ReadAdaptedTemplates (TFile *File) |
|
float | ComputeNormMatch (CLASS_ID ClassId, const FEATURE_STRUCT &feature, bool DebugMatch) |
|
void | FreeNormProtos () |
|
NORM_PROTOS * | ReadNormProtos (TFile *fp) |
|
void | ConvertProto (PROTO Proto, int ProtoId, INT_CLASS Class) |
|
INT_TEMPLATES | CreateIntTemplates (CLASSES FloatProtos, const UNICHARSET &target_unicharset) |
|
void | LearnWord (const char *fontname, WERD_RES *word) |
|
void | LearnPieces (const char *fontname, int start, int length, float threshold, CharSegmentationType segmentation, const char *correct_text, WERD_RES *word) |
|
void | InitAdaptiveClassifier (TessdataManager *mgr) |
|
void | InitAdaptedClass (TBLOB *Blob, CLASS_ID ClassId, int FontinfoId, ADAPT_CLASS Class, ADAPT_TEMPLATES Templates) |
|
void | AmbigClassifier (const GenericVector< INT_FEATURE_STRUCT > &int_features, const INT_FX_RESULT_STRUCT &fx_info, const TBLOB *blob, INT_TEMPLATES templates, ADAPT_CLASS *classes, UNICHAR_ID *ambiguities, ADAPT_RESULTS *results) |
|
void | MasterMatcher (INT_TEMPLATES templates, int16_t num_features, const INT_FEATURE_STRUCT *features, const uint8_t *norm_factors, ADAPT_CLASS *classes, int debug, int matcher_multiplier, const TBOX &blob_box, const GenericVector< CP_RESULT_STRUCT > &results, ADAPT_RESULTS *final_results) |
|
void | ExpandShapesAndApplyCorrections (ADAPT_CLASS *classes, bool debug, int class_id, int bottom, int top, float cp_rating, int blob_length, int matcher_multiplier, const uint8_t *cn_factors, UnicharRating *int_result, ADAPT_RESULTS *final_results) |
|
double | ComputeCorrectedRating (bool debug, int unichar_id, double cp_rating, double im_rating, int feature_misses, int bottom, int top, int blob_length, int matcher_multiplier, const uint8_t *cn_factors) |
|
void | ConvertMatchesToChoices (const DENORM &denorm, const TBOX &box, ADAPT_RESULTS *Results, BLOB_CHOICE_LIST *Choices) |
|
void | AddNewResult (const UnicharRating &new_result, ADAPT_RESULTS *results) |
|
int | GetAdaptiveFeatures (TBLOB *Blob, INT_FEATURE_ARRAY IntFeatures, FEATURE_SET *FloatFeatures) |
|
void | DebugAdaptiveClassifier (TBLOB *Blob, ADAPT_RESULTS *Results) |
|
PROTO_ID | MakeNewTempProtos (FEATURE_SET Features, int NumBadFeat, FEATURE_ID BadFeat[], INT_CLASS IClass, ADAPT_CLASS Class, BIT_VECTOR TempProtoMask) |
|
int | MakeNewTemporaryConfig (ADAPT_TEMPLATES Templates, CLASS_ID ClassId, int FontinfoId, int NumFeatures, INT_FEATURE_ARRAY Features, FEATURE_SET FloatFeatures) |
|
void | MakePermanent (ADAPT_TEMPLATES Templates, CLASS_ID ClassId, int ConfigId, TBLOB *Blob) |
|
void | PrintAdaptiveMatchResults (const ADAPT_RESULTS &results) |
|
void | RemoveExtraPuncs (ADAPT_RESULTS *Results) |
|
void | RemoveBadMatches (ADAPT_RESULTS *Results) |
|
void | SetAdaptiveThreshold (float Threshold) |
|
void | ShowBestMatchFor (int shape_id, const INT_FEATURE_STRUCT *features, int num_features) |
|
STRING | ClassIDToDebugStr (const INT_TEMPLATES_STRUCT *templates, int class_id, int config_id) const |
|
int | ClassAndConfigIDToFontOrShapeID (int class_id, int int_result_config) const |
|
int | ShapeIDToClassID (int shape_id) const |
|
UNICHAR_ID * | BaselineClassifier (TBLOB *Blob, const GenericVector< INT_FEATURE_STRUCT > &int_features, const INT_FX_RESULT_STRUCT &fx_info, ADAPT_TEMPLATES Templates, ADAPT_RESULTS *Results) |
|
int | CharNormClassifier (TBLOB *blob, const TrainingSample &sample, ADAPT_RESULTS *adapt_results) |
|
int | CharNormTrainingSample (bool pruner_only, int keep_this, const TrainingSample &sample, GenericVector< UnicharRating > *results) |
|
UNICHAR_ID * | GetAmbiguities (TBLOB *Blob, CLASS_ID CorrectClass) |
|
void | DoAdaptiveMatch (TBLOB *Blob, ADAPT_RESULTS *Results) |
|
void | AdaptToChar (TBLOB *Blob, CLASS_ID ClassId, int FontinfoId, float Threshold, ADAPT_TEMPLATES adaptive_templates) |
|
void | DisplayAdaptedChar (TBLOB *blob, INT_CLASS_STRUCT *int_class) |
|
bool | AdaptableWord (WERD_RES *word) |
|
void | EndAdaptiveClassifier () |
|
void | SettupPass1 () |
|
void | SettupPass2 () |
|
void | AdaptiveClassifier (TBLOB *Blob, BLOB_CHOICE_LIST *Choices) |
|
void | ClassifyAsNoise (ADAPT_RESULTS *Results) |
|
void | ResetAdaptiveClassifierInternal () |
|
void | SwitchAdaptiveClassifier () |
|
void | StartBackupAdaptiveClassifier () |
|
int | GetCharNormFeature (const INT_FX_RESULT_STRUCT &fx_info, INT_TEMPLATES templates, uint8_t *pruner_norm_array, uint8_t *char_norm_array) |
|
void | ComputeCharNormArrays (FEATURE_STRUCT *norm_feature, INT_TEMPLATES_STRUCT *templates, uint8_t *char_norm_array, uint8_t *pruner_array) |
|
bool | TempConfigReliable (CLASS_ID class_id, const TEMP_CONFIG &config) |
|
void | UpdateAmbigsGroup (CLASS_ID class_id, TBLOB *Blob) |
|
bool | AdaptiveClassifierIsFull () const |
|
bool | AdaptiveClassifierIsEmpty () const |
|
bool | LooksLikeGarbage (TBLOB *blob) |
|
void | RefreshDebugWindow (ScrollView **win, const char *msg, int y_offset, const TBOX &wbox) |
|
void | ClearCharNormArray (uint8_t *char_norm_array) |
|
void | ComputeIntCharNormArray (const FEATURE_STRUCT &norm_feature, uint8_t *char_norm_array) |
|
void | ComputeIntFeatures (FEATURE_SET Features, INT_FEATURE_ARRAY IntFeatures) |
|
INT_TEMPLATES | ReadIntTemplates (TFile *fp) |
|
void | WriteIntTemplates (FILE *File, INT_TEMPLATES Templates, const UNICHARSET &target_unicharset) |
|
CLASS_ID | GetClassToDebug (const char *Prompt, bool *adaptive_on, bool *pretrained_on, int *shape_id) |
|
void | ShowMatchDisplay () |
|
UnicityTable< FontInfo > & | get_fontinfo_table () |
|
const UnicityTable< FontInfo > & | get_fontinfo_table () const |
|
UnicityTable< FontSet > & | get_fontset_table () |
|
void | NormalizeOutlines (LIST Outlines, float *XScale, float *YScale) |
|
FEATURE_SET | ExtractOutlineFeatures (TBLOB *Blob) |
|
FEATURE_SET | ExtractPicoFeatures (TBLOB *Blob) |
|
FEATURE_SET | ExtractIntCNFeatures (const TBLOB &blob, const INT_FX_RESULT_STRUCT &fx_info) |
|
FEATURE_SET | ExtractIntGeoFeatures (const TBLOB &blob, const INT_FX_RESULT_STRUCT &fx_info) |
|
void | LearnBlob (const STRING &fontname, TBLOB *Blob, const DENORM &cn_denorm, const INT_FX_RESULT_STRUCT &fx_info, const char *blob_text) |
|
bool | WriteTRFile (const STRING &filename) |
|
| CCStruct ()=default |
|
virtual | ~CCStruct () |
|
| CUtil ()=default |
|
virtual | ~CUtil () |
|
void | read_variables (const char *filename, bool global_only) |
|
| CCUtil () |
|
virtual | ~CCUtil () |
|
void | main_setup (const char *argv0, const char *basename) |
| CCUtil::main_setup - set location of tessdata and name of image. More...
|
|
ParamsVectors * | params () |
|