Tesseract 3.01
|
#include <wordrec.h>
Public Member Functions | |||||||
Wordrec () | |||||||
virtual | ~Wordrec () | ||||||
void | CopyCharChoices (const BLOB_CHOICE_LIST_VECTOR &from, BLOB_CHOICE_LIST_VECTOR *to) | ||||||
void | update_ratings (const BLOB_CHOICE_LIST_VECTOR &new_choices, const CHUNKS_RECORD *chunks_record, const SEARCH_STATE search_state) | ||||||
void | SegSearch (CHUNKS_RECORD *chunks_record, WERD_CHOICE *best_choice, BLOB_CHOICE_LIST_VECTOR *best_char_choices, WERD_CHOICE *raw_choice, STATE *output_best_state) | ||||||
SEAM * | attempt_blob_chop (TWERD *word, inT32 blob_number, bool italic_blob, SEAMS seam_list) | ||||||
MATRIX * | word_associator (WERD_RES *word, STATE *state, BLOB_CHOICE_LIST_VECTOR *best_char_choices, DANGERR *fixpt, STATE *best_state) | ||||||
void | junk_worst_seam (SEAM_QUEUE seams, SEAM *new_seam, float new_priority) | ||||||
void | choose_best_seam (SEAM_QUEUE seam_queue, SEAM_PILE *seam_pile, SPLIT *split, PRIORITY priority, SEAM **seam_result, TBLOB *blob) | ||||||
void | combine_seam (SEAM_QUEUE seam_queue, SEAM_PILE seam_pile, SEAM *seam) | ||||||
inT16 | constrained_split (SPLIT *split, TBLOB *blob) | ||||||
void | delete_seam_pile (SEAM_PILE seam_pile) | ||||||
SEAM * | pick_good_seam (TBLOB *blob) | ||||||
PRIORITY | seam_priority (SEAM *seam, inT16 xmin, inT16 xmax) | ||||||
void | try_point_pairs (EDGEPT *points[MAX_NUM_POINTS], inT16 num_points, SEAM_QUEUE seam_queue, SEAM_PILE *seam_pile, SEAM **seam, TBLOB *blob) | ||||||
void | try_vertical_splits (EDGEPT *points[MAX_NUM_POINTS], inT16 num_points, SEAM_QUEUE seam_queue, SEAM_PILE *seam_pile, SEAM **seam, TBLOB *blob) | ||||||
PRIORITY | full_split_priority (SPLIT *split, inT16 xmin, inT16 xmax) | ||||||
PRIORITY | grade_center_of_blob (register BOUNDS_RECT rect) | ||||||
PRIORITY | grade_overlap (register BOUNDS_RECT rect) | ||||||
PRIORITY | grade_split_length (register SPLIT *split) | ||||||
PRIORITY | grade_sharpness (register SPLIT *split) | ||||||
PRIORITY | grade_width_change (register BOUNDS_RECT rect) | ||||||
void | set_outline_bounds (register EDGEPT *point1, register EDGEPT *point2, BOUNDS_RECT rect) | ||||||
int | crosses_outline (EDGEPT *p0, EDGEPT *p1, EDGEPT *outline) | ||||||
int | is_crossed (TPOINT a0, TPOINT a1, TPOINT b0, TPOINT b1) | ||||||
int | is_same_edgept (EDGEPT *p1, EDGEPT *p2) | ||||||
EDGEPT * | near_point (EDGEPT *point, EDGEPT *line_pt_0, EDGEPT *line_pt_1) | ||||||
void | reverse_outline (EDGEPT *outline) | ||||||
virtual BLOB_CHOICE_LIST * | classify_piece (TBLOB *pieces, SEAMS seams, inT16 start, inT16 end) | ||||||
BLOB_CHOICE_LIST * | get_piece_rating (MATRIX *ratings, TBLOB *blobs, SEAMS seams, inT16 start, inT16 end) | ||||||
BOUNDS_LIST | record_blob_bounds (TBLOB *blobs) | ||||||
MATRIX * | record_piece_ratings (TBLOB *blobs) | ||||||
WIDTH_RECORD * | state_char_widths (WIDTH_RECORD *chunk_widths, STATE *state, int num_joints) | ||||||
FLOAT32 | get_width_variance (WIDTH_RECORD *wrec, float norm_height) | ||||||
FLOAT32 | get_gap_variance (WIDTH_RECORD *wrec, float norm_height) | ||||||
FLOAT32 | prioritize_state (CHUNKS_RECORD *chunks_record, SEARCH_RECORD *the_search) | ||||||
FLOAT32 | width_priority (CHUNKS_RECORD *chunks_record, STATE *state, int num_joints) | ||||||
FLOAT32 | seamcut_priority (SEAMS seams, STATE *state, int num_joints) | ||||||
FLOAT32 | rating_priority (CHUNKS_RECORD *chunks_record, STATE *state, int num_joints) | ||||||
program_editup | |||||||
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, bool init_classifier, bool init_permute) | ||||||
cc_recog | |||||||
Recognize a word. | |||||||
BLOB_CHOICE_LIST_VECTOR * | cc_recog (WERD_RES *word) | ||||||
program_editdown | |||||||
This function holds any nessessary post processing for the Wise Owl program. | |||||||
void | program_editdown (inT32 elasped_time) | ||||||
set_pass1 | |||||||
Get ready to do some pass 1 stuff. | |||||||
void | set_pass1 () | ||||||
set_pass2 | |||||||
Get ready to do some pass 2 stuff. | |||||||
void | set_pass2 () | ||||||
end_recog | |||||||
Cleanup and exit the recog program. | |||||||
int | end_recog () | ||||||
call_matcher | |||||||
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) | ||||||
dict_word() | |||||||
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_blob | |||||||
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.
| |||||||
BLOB_CHOICE_LIST * | classify_blob (TBLOB *blob, const char *string, C_COL color) | ||||||
BLOB_CHOICE_LIST * | fake_classify_blob (UNICHAR_ID class_id, float rating, float certainty) | ||||||
update_blob_classifications | |||||||
For each blob in the given word update match_table with the corresponding BLOB_CHOICES_LIST from choices. | |||||||
void | update_blob_classifications (TWERD *word, const BLOB_CHOICE_LIST_VECTOR &choices) | ||||||
best_first_search | |||||||
Find the best segmentation by doing a best first search of the solution space. | |||||||
BLOB_CHOICE_LIST_VECTOR * | evaluate_chunks (CHUNKS_RECORD *chunks_record, SEARCH_STATE search_state) | ||||||
void | best_first_search (CHUNKS_RECORD *chunks_record, BLOB_CHOICE_LIST_VECTOR *best_char_choices, WERD_RES *word, STATE *state, DANGERR *fixpt, STATE *best_state) | ||||||
void | delete_search (SEARCH_RECORD *the_search) | ||||||
evaluate_state | |||||||
Evaluate the segmentation that is represented by this state in the best first search. Add this state to the "states_seen" list. | |||||||
inT16 | evaluate_state (CHUNKS_RECORD *chunks_record, SEARCH_RECORD *the_search, DANGERR *fixpt) | ||||||
BLOB_CHOICE_LIST_VECTOR * | rebuild_current_state (WERD_RES *word, STATE *state, BLOB_CHOICE_LIST_VECTOR *char_choices, MATRIX *ratings) | ||||||
new_search | |||||||
Create and initialize a new search record. | |||||||
SEARCH_RECORD * | new_search (CHUNKS_RECORD *chunks_record, int num_joints, BLOB_CHOICE_LIST_VECTOR *best_char_choices, WERD_CHOICE *best_choice, WERD_CHOICE *raw_choice, STATE *state) | ||||||
expand_node | |||||||
Create the states that are attached to this one. Check to see that each one has not already been visited. If not add it to the priority queue. | |||||||
void | expand_node (FLOAT32 worst_priority, CHUNKS_RECORD *chunks_record, SEARCH_RECORD *the_search) | ||||||
replace_char_widths | |||||||
Replace the value of the char_width field in the chunks_record with the updated width measurements from the last_segmentation. | |||||||
void | replace_char_widths (CHUNKS_RECORD *chunks_record, SEARCH_STATE state) | ||||||
BLOB_CHOICE * | rebuild_fragments (const char *unichar, const char *expanded_fragment_lengths, int choice_index, BLOB_CHOICE_LIST_VECTOR *old_choices) | ||||||
BLOB_CHOICE_LIST * | join_blobs_and_classify (WERD_RES *word, int x, int y, int choice_index, MATRIX *ratings, BLOB_CHOICE_LIST_VECTOR *old_choices) | ||||||
pop_queue | |||||||
Get this state from the priority queue. It should be the state that has the greatest urgency to be evaluated. | |||||||
STATE * | pop_queue (HEAP *queue) | ||||||
push_queue | |||||||
Add this state into the priority queue. | |||||||
void | push_queue (HEAP *queue, STATE *state, FLOAT32 worst_priority, FLOAT32 priority, bool debug) | ||||||
point_priority | |||||||
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_point_to_list | |||||||
Add an edge point to a POINT_GROUP containg a list of other points. | |||||||
void | add_point_to_list (POINT_GROUP point_list, EDGEPT *point) | ||||||
angle_change | |||||||
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) | ||||||
is_little_chunk | |||||||
Return TRUE if one of the pieces resulting from this split would less than some number of edge points. | |||||||
int | is_little_chunk (EDGEPT *point1, EDGEPT *point2) | ||||||
is_small_area | |||||||
Test the area defined by a split accross this outline. | |||||||
int | is_small_area (EDGEPT *point1, EDGEPT *point2) | ||||||
pick_close_point | |||||||
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) | ||||||
prioritize_points | |||||||
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, POINT_GROUP points) | ||||||
new_min_point | |||||||
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 NULL. | |||||||
void | new_min_point (EDGEPT *local_min, POINT_GROUP points) | ||||||
new_max_point | |||||||
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 NULL. | |||||||
void | new_max_point (EDGEPT *local_max, POINT_GROUP points) | ||||||
vertical_projection_point | |||||||
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 as a result. | |||||||
void | vertical_projection_point (EDGEPT *split_point, EDGEPT *target_point, EDGEPT **best_point) | ||||||
improve_one_blob | |||||||
Start with the current word of blobs and its classification. Find the worst blobs and try to divide it up to improve the ratings. | |||||||
bool | improve_one_blob (TWERD *word, BLOB_CHOICE_LIST_VECTOR *char_choices, inT32 *blob_number, SEAMS *seam_list, DANGERR *fixpt, bool split_next_to_fragment) | ||||||
modify_blob_choice | |||||||
Takes a blob and its chop index, converts that chop index to a unichar_id, and stores the chop index in place of the blob's original unichar_id. | |||||||
void | modify_blob_choice (BLOB_CHOICE_LIST *answer, int chop_index) | ||||||
chop_one_blob | |||||||
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. | |||||||
bool | chop_one_blob (TWERD *word, BLOB_CHOICE_LIST_VECTOR *char_choices, inT32 *blob_number, SEAMS *seam_list, int *right_chop_index) | ||||||
chop_word_main | |||||||
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. Return the word level ratings. | |||||||
BLOB_CHOICE_LIST_VECTOR * | chop_word_main (WERD_RES *word) | ||||||
improve_by_chopping | |||||||
Start with the current word of blobs and its classification. Find the worst blobs and try to divide them up to improve the ratings. As long as ratings are produced by the new blob splitting. When all the splitting has been accomplished all the ratings memory is reclaimed. | |||||||
void | improve_by_chopping (WERD_RES *word, BLOB_CHOICE_LIST_VECTOR *char_choices, STATE *best_state, BLOB_CHOICE_LIST_VECTOR *best_char_choices, DANGERR *fixpt, bool *updated_best_choice) | ||||||
inT16 | select_blob_to_split (const BLOB_CHOICE_LIST_VECTOR &char_choices, float rating_ceiling, bool split_next_to_fragment) | ||||||
Public Attributes | |||||||
bool | wordrec_no_block = 0 | ||||||
bool | wordrec_enable_assoc = 1 | ||||||
bool | force_word_assoc = 0 | ||||||
int | wordrec_num_seg_states = 30 | ||||||
double | wordrec_worst_state = 1 | ||||||
bool | fragments_guide_chopper = 0 | ||||||
int | repair_unchopped_blobs = 1 | ||||||
double | tessedit_certainty_threshold = -2.25 | ||||||
int | chop_debug = 0 | ||||||
bool | chop_enable = 1 | ||||||
bool | chop_vertical_creep = 0 | ||||||
int | chop_split_length = 10000 | ||||||
int | chop_same_distance = 2 | ||||||
int | chop_min_outline_points = 6 | ||||||
int | chop_inside_angle = -50 | ||||||
int | chop_min_outline_area = 2000 | ||||||
double | chop_split_dist_knob = 0.5 | ||||||
double | chop_overlap_knob = 0.9 | ||||||
double | chop_center_knob = 0.15 | ||||||
double | chop_sharpness_knob = 0.06 | ||||||
double | chop_width_change_knob = 5.0 | ||||||
double | chop_ok_split = 100.0 | ||||||
double | chop_good_split = 50.0 | ||||||
int | chop_x_y_weight = 3 | ||||||
int | segment_adjust_debug = 0 | ||||||
bool | assume_fixed_pitch_char_segment = 0 | ||||||
bool | use_new_state_cost = 0 | ||||||
double | heuristic_segcost_rating_base = 1.25 | ||||||
double | heuristic_weight_rating = 1 | ||||||
double | heuristic_weight_width = 0 | ||||||
double | heuristic_weight_seamcut = 0 | ||||||
double | heuristic_max_char_wh_ratio = 2.0 | ||||||
int | wordrec_debug_level = 0 | ||||||
bool | enable_new_segsearch = false | ||||||
int | segsearch_debug_level = 0 | ||||||
int | segsearch_max_pain_points = 2000 | ||||||
int | segsearch_max_futile_classifications = 10 | ||||||
double | segsearch_max_char_wh_ratio = 2.0 | ||||||
double | segsearch_max_fixed_pitch_char_wh_ratio = 2.0 | ||||||
LanguageModel * | language_model_ | ||||||
PRIORITY | pass2_ok_split | ||||||
int | pass2_seg_states | ||||||
int | num_joints | ||||||
int | num_pushed | ||||||
int | num_popped | ||||||
TALLY | states_before_best | ||||||
TALLY | best_certainties [2] | ||||||
TALLY | character_widths | ||||||
BlobMatchTable | blob_match_table | ||||||
EVALUATION_ARRAY | last_segmentation | ||||||
WERD_CHOICE * | prev_word_best_choice_ | ||||||
Protected Member Functions | |||||||
void | UpdateSegSearchNodes (int starting_col, SEG_SEARCH_PENDING_LIST *pending[], BestPathByColumn *best_path_by_column[], CHUNKS_RECORD *chunks_record, HEAP *pain_points, BestChoiceBundle *best_choice_bundle) |
tesseract::Wordrec::Wordrec | ( | ) |
tesseract::Wordrec::~Wordrec | ( | ) | [virtual] |
void tesseract::Wordrec::add_point_to_list | ( | POINT_GROUP | point_list, |
EDGEPT * | point | ||
) |
SEAM * tesseract::Wordrec::attempt_blob_chop | ( | TWERD * | word, |
inT32 | blob_number, | ||
bool | italic_blob, | ||
SEAMS | seam_list | ||
) |
void tesseract::Wordrec::best_first_search | ( | CHUNKS_RECORD * | chunks_record, |
BLOB_CHOICE_LIST_VECTOR * | best_char_choices, | ||
WERD_RES * | word, | ||
STATE * | state, | ||
DANGERR * | fixpt, | ||
STATE * | best_state | ||
) |
BLOB_CHOICE_LIST * tesseract::Wordrec::call_matcher | ( | TBLOB * | blob | ) |
BLOB_CHOICE_LIST_VECTOR * tesseract::Wordrec::cc_recog | ( | WERD_RES * | word | ) |
void tesseract::Wordrec::choose_best_seam | ( | SEAM_QUEUE | seam_queue, |
SEAM_PILE * | seam_pile, | ||
SPLIT * | split, | ||
PRIORITY | priority, | ||
SEAM ** | seam_result, | ||
TBLOB * | blob | ||
) |
bool tesseract::Wordrec::chop_one_blob | ( | TWERD * | word, |
BLOB_CHOICE_LIST_VECTOR * | char_choices, | ||
inT32 * | blob_number, | ||
SEAMS * | seam_list, | ||
int * | right_chop_index | ||
) |
BLOB_CHOICE_LIST_VECTOR * tesseract::Wordrec::chop_word_main | ( | WERD_RES * | word | ) |
BLOB_CHOICE_LIST * tesseract::Wordrec::classify_blob | ( | TBLOB * | blob, |
const char * | string, | ||
C_COL | color | ||
) |
BLOB_CHOICE_LIST * tesseract::Wordrec::classify_piece | ( | TBLOB * | pieces, |
SEAMS | seams, | ||
inT16 | start, | ||
inT16 | end | ||
) | [virtual] |
void tesseract::Wordrec::combine_seam | ( | SEAM_QUEUE | seam_queue, |
SEAM_PILE | seam_pile, | ||
SEAM * | seam | ||
) |
tessedit_fix_sideways_chops ||
void tesseract::Wordrec::CopyCharChoices | ( | const BLOB_CHOICE_LIST_VECTOR & | from, |
BLOB_CHOICE_LIST_VECTOR * | to | ||
) |
void tesseract::Wordrec::delete_seam_pile | ( | SEAM_PILE | seam_pile | ) |
void tesseract::Wordrec::delete_search | ( | SEARCH_RECORD * | the_search | ) |
delete_search
Terminate the current search and free all the memory involved.
int tesseract::Wordrec::dict_word | ( | const WERD_CHOICE & | word | ) |
int tesseract::Wordrec::end_recog | ( | ) |
BLOB_CHOICE_LIST_VECTOR * tesseract::Wordrec::evaluate_chunks | ( | CHUNKS_RECORD * | chunks_record, |
SEARCH_STATE | search_state | ||
) |
evaluate_chunks
A particular word level segmentation has been chosen. Evaluation this to find the word list that corresponds to it.
inT16 tesseract::Wordrec::evaluate_state | ( | CHUNKS_RECORD * | chunks_record, |
SEARCH_RECORD * | the_search, | ||
DANGERR * | fixpt | ||
) |
void tesseract::Wordrec::expand_node | ( | FLOAT32 | worst_priority, |
CHUNKS_RECORD * | chunks_record, | ||
SEARCH_RECORD * | the_search | ||
) |
BLOB_CHOICE_LIST * tesseract::Wordrec::fake_classify_blob | ( | UNICHAR_ID | class_id, |
float | rating, | ||
float | certainty | ||
) |
FLOAT32 tesseract::Wordrec::get_gap_variance | ( | WIDTH_RECORD * | wrec, |
float | norm_height | ||
) |
BLOB_CHOICE_LIST * tesseract::Wordrec::get_piece_rating | ( | MATRIX * | ratings, |
TBLOB * | blobs, | ||
SEAMS | seams, | ||
inT16 | start, | ||
inT16 | end | ||
) |
FLOAT32 tesseract::Wordrec::get_width_variance | ( | WIDTH_RECORD * | wrec, |
float | norm_height | ||
) |
PRIORITY tesseract::Wordrec::grade_center_of_blob | ( | register BOUNDS_RECT | rect | ) |
PRIORITY tesseract::Wordrec::grade_overlap | ( | register BOUNDS_RECT | rect | ) |
PRIORITY tesseract::Wordrec::grade_width_change | ( | register BOUNDS_RECT | rect | ) |
void tesseract::Wordrec::improve_by_chopping | ( | WERD_RES * | word, |
BLOB_CHOICE_LIST_VECTOR * | char_choices, | ||
STATE * | best_state, | ||
BLOB_CHOICE_LIST_VECTOR * | best_char_choices, | ||
DANGERR * | fixpt, | ||
bool * | updated_best_choice | ||
) |
bool tesseract::Wordrec::improve_one_blob | ( | TWERD * | word, |
BLOB_CHOICE_LIST_VECTOR * | char_choices, | ||
inT32 * | blob_number, | ||
SEAMS * | seam_list, | ||
DANGERR * | fixpt, | ||
bool | split_next_to_fragment | ||
) |
BLOB_CHOICE_LIST * tesseract::Wordrec::join_blobs_and_classify | ( | WERD_RES * | word, |
int | x, | ||
int | y, | ||
int | choice_index, | ||
MATRIX * | ratings, | ||
BLOB_CHOICE_LIST_VECTOR * | old_choices | ||
) |
void tesseract::Wordrec::junk_worst_seam | ( | SEAM_QUEUE | seams, |
SEAM * | new_seam, | ||
float | new_priority | ||
) |
void tesseract::Wordrec::modify_blob_choice | ( | BLOB_CHOICE_LIST * | answer, |
int | chop_index | ||
) |
void tesseract::Wordrec::new_max_point | ( | EDGEPT * | local_max, |
POINT_GROUP | points | ||
) |
void tesseract::Wordrec::new_min_point | ( | EDGEPT * | local_min, |
POINT_GROUP | points | ||
) |
SEARCH_RECORD * tesseract::Wordrec::new_search | ( | CHUNKS_RECORD * | chunks_record, |
int | num_joints, | ||
BLOB_CHOICE_LIST_VECTOR * | best_char_choices, | ||
WERD_CHOICE * | best_choice, | ||
WERD_CHOICE * | raw_choice, | ||
STATE * | state | ||
) |
EDGEPT * tesseract::Wordrec::pick_close_point | ( | EDGEPT * | critical_point, |
EDGEPT * | vertical_point, | ||
int * | best_dist | ||
) |
void tesseract::Wordrec::prioritize_points | ( | TESSLINE * | outline, |
POINT_GROUP | points | ||
) |
FLOAT32 tesseract::Wordrec::prioritize_state | ( | CHUNKS_RECORD * | chunks_record, |
SEARCH_RECORD * | the_search | ||
) |
void tesseract::Wordrec::program_editdown | ( | inT32 | elasped_time | ) |
void tesseract::Wordrec::program_editup | ( | const char * | textbase, |
bool | init_classifier, | ||
bool | init_permute | ||
) |
void tesseract::Wordrec::push_queue | ( | HEAP * | queue, |
STATE * | state, | ||
FLOAT32 | worst_priority, | ||
FLOAT32 | priority, | ||
bool | debug | ||
) |
FLOAT32 tesseract::Wordrec::rating_priority | ( | CHUNKS_RECORD * | chunks_record, |
STATE * | state, | ||
int | num_joints | ||
) |
BLOB_CHOICE_LIST_VECTOR * tesseract::Wordrec::rebuild_current_state | ( | WERD_RES * | word, |
STATE * | state, | ||
BLOB_CHOICE_LIST_VECTOR * | old_choices, | ||
MATRIX * | ratings | ||
) |
rebuild_current_state
Transfers the given state to the word's output fields: rebuild_word, best_state, box_word, and returns the corresponding blob choices.
BLOB_CHOICE * tesseract::Wordrec::rebuild_fragments | ( | const char * | unichar, |
const char * | expanded_fragment_lengths, | ||
int | choice_index, | ||
BLOB_CHOICE_LIST_VECTOR * | old_choices | ||
) |
BOUNDS_LIST tesseract::Wordrec::record_blob_bounds | ( | TBLOB * | blobs | ) |
void tesseract::Wordrec::replace_char_widths | ( | CHUNKS_RECORD * | chunks_record, |
SEARCH_STATE | state | ||
) |
void tesseract::Wordrec::reverse_outline | ( | EDGEPT * | outline | ) |
void tesseract::Wordrec::SegSearch | ( | CHUNKS_RECORD * | chunks_record, |
WERD_CHOICE * | best_choice, | ||
BLOB_CHOICE_LIST_VECTOR * | best_char_choices, | ||
WERD_CHOICE * | raw_choice, | ||
STATE * | output_best_state | ||
) |
inT16 tesseract::Wordrec::select_blob_to_split | ( | const BLOB_CHOICE_LIST_VECTOR & | char_choices, |
float | rating_ceiling, | ||
bool | split_next_to_fragment | ||
) |
void tesseract::Wordrec::set_outline_bounds | ( | register EDGEPT * | point1, |
register EDGEPT * | point2, | ||
BOUNDS_RECT | rect | ||
) |
void tesseract::Wordrec::set_pass1 | ( | ) |
void tesseract::Wordrec::set_pass2 | ( | ) |
WIDTH_RECORD * tesseract::Wordrec::state_char_widths | ( | WIDTH_RECORD * | chunk_widths, |
STATE * | state, | ||
int | num_joints | ||
) |
void tesseract::Wordrec::try_point_pairs | ( | EDGEPT * | points[MAX_NUM_POINTS], |
inT16 | num_points, | ||
SEAM_QUEUE | seam_queue, | ||
SEAM_PILE * | seam_pile, | ||
SEAM ** | seam, | ||
TBLOB * | blob | ||
) |
void tesseract::Wordrec::try_vertical_splits | ( | EDGEPT * | points[MAX_NUM_POINTS], |
inT16 | num_points, | ||
SEAM_QUEUE | seam_queue, | ||
SEAM_PILE * | seam_pile, | ||
SEAM ** | seam, | ||
TBLOB * | blob | ||
) |
void tesseract::Wordrec::update_blob_classifications | ( | TWERD * | word, |
const BLOB_CHOICE_LIST_VECTOR & | choices | ||
) |
void tesseract::Wordrec::update_ratings | ( | const BLOB_CHOICE_LIST_VECTOR & | new_choices, |
const CHUNKS_RECORD * | chunks_record, | ||
const SEARCH_STATE | search_state | ||
) |
void tesseract::Wordrec::UpdateSegSearchNodes | ( | int | starting_col, |
SEG_SEARCH_PENDING_LIST * | pending[], | ||
BestPathByColumn * | best_path_by_column[], | ||
CHUNKS_RECORD * | chunks_record, | ||
HEAP * | pain_points, | ||
BestChoiceBundle * | best_choice_bundle | ||
) | [protected] |
void tesseract::Wordrec::vertical_projection_point | ( | EDGEPT * | split_point, |
EDGEPT * | target_point, | ||
EDGEPT ** | best_point | ||
) |
FLOAT32 tesseract::Wordrec::width_priority | ( | CHUNKS_RECORD * | chunks_record, |
STATE * | state, | ||
int | num_joints | ||
) |
MATRIX * tesseract::Wordrec::word_associator | ( | WERD_RES * | word, |
STATE * | state, | ||
BLOB_CHOICE_LIST_VECTOR * | best_char_choices, | ||
DANGERR * | fixpt, | ||
STATE * | best_state | ||
) |
"include fixed-pitch heuristics in char segmentation"
double tesseract::Wordrec::chop_center_knob = 0.15 |
"Split center adjustment"
int tesseract::Wordrec::chop_debug = 0 |
"Chop debug"
bool tesseract::Wordrec::chop_enable = 1 |
"Chop enable"
double tesseract::Wordrec::chop_good_split = 50.0 |
"Good split limit"
int tesseract::Wordrec::chop_inside_angle = -50 |
"Min Inside Angle Bend"
int tesseract::Wordrec::chop_min_outline_area = 2000 |
"Min Outline Area"
"Min Number of Points on Outline"
double tesseract::Wordrec::chop_ok_split = 100.0 |
"OK split limit"
double tesseract::Wordrec::chop_overlap_knob = 0.9 |
"Split overlap adjustment"
"Same distance"
double tesseract::Wordrec::chop_sharpness_knob = 0.06 |
"Split sharpness adjustment"
double tesseract::Wordrec::chop_split_dist_knob = 0.5 |
"Split length adjustment"
int tesseract::Wordrec::chop_split_length = 10000 |
"Split Length"
"Vertical creep"
double tesseract::Wordrec::chop_width_change_knob = 5.0 |
"Width change adjustment"
"X / Y length weight"
bool tesseract::Wordrec::enable_new_segsearch = false |
"Enable new segmentation search path."
bool tesseract::Wordrec::force_word_assoc = 0 |
"force associator to run regardless of what enable_assoc is." "This is used for CJK where component grouping is necessary."
"Use information from fragments to guide chopping process"
double tesseract::Wordrec::heuristic_max_char_wh_ratio = 2.0 |
"max char width-to-height ratio allowed in segmentation"
double tesseract::Wordrec::heuristic_segcost_rating_base = 1.25 |
"base factor for adding segmentation cost into word rating." "It's a multiplying factor, the larger the value above 1, " "the bigger the effect of segmentation cost."
double tesseract::Wordrec::heuristic_weight_rating = 1 |
"weight associated with char rating in combined cost of state"
double tesseract::Wordrec::heuristic_weight_seamcut = 0 |
"weight associated with seam cut in combined cost of state"
double tesseract::Wordrec::heuristic_weight_width = 0 |
"weight associated with width evidence in combined cost of state"
"Fix blobs that aren't chopped"
"Segmentation adjustment debug"
"SegSearch debug level"
double tesseract::Wordrec::segsearch_max_char_wh_ratio = 2.0 |
"Maximum character width-to-height ratio"
"Maximum character width-to-height ratio for" "fixed pitch fonts"
"Maximum number of pain point classifications per word."
"Maximum number of pain points stored in the queue"
double tesseract::Wordrec::tessedit_certainty_threshold = -2.25 |
"Good blob limit"
"use new state cost heuristics for segmentation state evaluation"
"Debug level for wordrec"
"Associator Enable"
bool tesseract::Wordrec::wordrec_no_block = 0 |
"Don't output block information"
"Segmentation states"
double tesseract::Wordrec::wordrec_worst_state = 1 |
"Worst segmentation state"