/home/rays/src/opensrc/tesseract-ocr/ccstruct/seam.cpp File Reference

#include "seam.h"
#include "blobs.h"
#include "callcpp.h"
#include "structures.h"

Defines

#define NUM_STARTING_SEAMS   20

Functions

 makestructure (newseam, free_seam, SEAM)
point_in_split

Check to see if either of these points are present in the current split.

Returns:
TRUE if one of them is split.
bool point_in_split (SPLIT *split, EDGEPT *point1, EDGEPT *point2)
point_in_seam

Check to see if either of these points are present in the current seam.

Returns:
TRUE if one of them is.
bool point_in_seam (SEAM *seam, SPLIT *split)
point_used_by_split

Return whether this particular EDGEPT * is used in a given split.

Returns:
TRUE if the edgept is used by the split.
bool point_used_by_split (SPLIT *split, EDGEPT *point)
point_used_by_seam

Return whether this particular EDGEPT * is used in a given seam.

Returns:
TRUE if the edgept is used by the seam.
bool point_used_by_seam (SEAM *seam, EDGEPT *point)
add_seam

Add another seam to a collection of seams.

SEAMS add_seam (SEAMS seam_list, SEAM *seam)
combine_seam

Combine two seam records into a single seam. Move the split references from the second seam to the first one. The argument convention is patterned after strcpy.

void combine_seams (SEAM *dest_seam, SEAM *source_seam)
delete_seam

Free this seam record and the splits that are attached to it.

void delete_seam (void *arg)
start_seam_list

Initialize a list of seams that match the original number of blobs present in the starting segmentation. Each of the seams created by this routine have location information only.

SEAMS start_seam_list (TBLOB *blobs)
free_seam_list

Free all the seams that have been allocated in this list. Reclaim the memory for each of the splits as well.

void free_seam_list (SEAMS seam_list)
test_insert_seam

Returns:
true if insert_seam will succeed.
bool test_insert_seam (SEAMS seam_list, int index, TBLOB *left_blob, TBLOB *first_blob)
insert_seam

Add another seam to a collection of seams at a particular location in the seam array.

SEAMS insert_seam (SEAMS seam_list, int index, SEAM *seam, TBLOB *left_blob, TBLOB *first_blob)
account_splits_right

Account for all the splits by looking to the right. in the blob list.

int account_splits_right (SEAM *seam, TBLOB *blob)
account_splits_left

Account for all the splits by looking to the left. in the blob list.

int account_splits_left (SEAM *seam, TBLOB *blob, TBLOB *end_blob)
void account_splits_left_helper (SEAM *seam, TBLOB *blob, TBLOB *end_blob, inT32 *depth, inT8 *width, inT8 *found_em)
find_split_in_blob

Returns:
TRUE if the split is somewhere in this blob.
bool find_split_in_blob (SPLIT *split, TBLOB *blob)
join_two_seams

Merge these two seams into a new seam. Duplicate the split records in both of the input seams. Return the resultant seam.

SEAM * join_two_seams (SEAM *seam1, SEAM *seam2)
new_seam

Create a structure for a "seam" between two blobs. This data structure may actually hold up to three different splits. Initailization of this record is done by this routine.

SEAM * new_seam (PRIORITY priority, const TPOINT &location, SPLIT *split1, SPLIT *split2, SPLIT *split3)
new_seam_list

Create a collection of seam records in an array.

SEAMS new_seam_list ()
print_seam

Print a list of splits. Show the coordinates of both points in each split.

void print_seam (const char *label, SEAM *seam)
print_seams

Print a list of splits. Show the coordinates of both points in each split.

void print_seams (const char *label, SEAMS seams)
shared_split_points

Check these two seams to make sure that neither of them have two points in common. Return TRUE if any of the same points are present in any of the splits of both seams.

int shared_split_points (SEAM *seam1, SEAM *seam2)
void break_pieces (TBLOB *blobs, SEAMS seams, inT16 start, inT16 end)
void join_pieces (TBLOB *piece_blobs, SEAMS seams, inT16 start, inT16 end)
void hide_seam (SEAM *seam)
void hide_edge_pair (EDGEPT *pt1, EDGEPT *pt2)
void reveal_seam (SEAM *seam)
void reveal_edge_pair (EDGEPT *pt1, EDGEPT *pt2)

Define Documentation

#define NUM_STARTING_SEAMS   20

Function Documentation

int account_splits_left ( SEAM *  seam,
TBLOB *  blob,
TBLOB *  end_blob 
)
void account_splits_left_helper ( SEAM *  seam,
TBLOB *  blob,
TBLOB *  end_blob,
inT32 *  depth,
inT8 *  width,
inT8 *  found_em 
)
int account_splits_right ( SEAM *  seam,
TBLOB *  blob 
)
SEAMS add_seam ( SEAMS  seam_list,
SEAM *  seam 
)
void break_pieces ( TBLOB *  blobs,
SEAMS  seams,
inT16  start,
inT16  end 
)
void combine_seams ( SEAM *  dest_seam,
SEAM *  source_seam 
)
void delete_seam ( void *  arg  ) 
bool find_split_in_blob ( SPLIT *  split,
TBLOB *  blob 
)
void free_seam_list ( SEAMS  seam_list  ) 
void hide_edge_pair ( EDGEPT *  pt1,
EDGEPT *  pt2 
)
void hide_seam ( SEAM *  seam  ) 
SEAMS insert_seam ( SEAMS  seam_list,
int  index,
SEAM *  seam,
TBLOB *  left_blob,
TBLOB *  first_blob 
)
void join_pieces ( TBLOB *  piece_blobs,
SEAMS  seams,
inT16  start,
inT16  end 
)
SEAM* join_two_seams ( SEAM *  seam1,
SEAM *  seam2 
)
makestructure ( newseam  ,
free_seam  ,
SEAM   
)
SEAM* new_seam ( PRIORITY  priority,
const TPOINT &  location,
SPLIT *  split1,
SPLIT *  split2,
SPLIT *  split3 
)
SEAMS new_seam_list (  ) 
bool point_in_seam ( SEAM *  seam,
SPLIT *  split 
)
bool point_in_split ( SPLIT *  split,
EDGEPT *  point1,
EDGEPT *  point2 
)
bool point_used_by_seam ( SEAM *  seam,
EDGEPT *  point 
)
bool point_used_by_split ( SPLIT *  split,
EDGEPT *  point 
)
void print_seam ( const char *  label,
SEAM *  seam 
)
void print_seams ( const char *  label,
SEAMS  seams 
)
void reveal_edge_pair ( EDGEPT *  pt1,
EDGEPT *  pt2 
)
void reveal_seam ( SEAM *  seam  ) 
int shared_split_points ( SEAM *  seam1,
SEAM *  seam2 
)
SEAMS start_seam_list ( TBLOB *  blobs  ) 
bool test_insert_seam ( SEAMS  seam_list,
int  index,
TBLOB *  left_blob,
TBLOB *  first_blob 
)
Generated on Thu Feb 2 08:19:21 2012 for Tesseract by  doxygen 1.6.3