wordrec/pieces.h

Go to the documentation of this file.
00001 
00020 #ifndef PIECES_H
00021 #define PIECES_H
00022 
00023 /*----------------------------------------------------------------------
00024               I n c l u d e s
00025 ----------------------------------------------------------------------*/
00026 #include "matrix.h"
00027 #include "seam.h"
00028 #include "states.h"
00029 
00030 /*----------------------------------------------------------------------
00031               T y p e s
00032 ----------------------------------------------------------------------*/
00037 typedef struct
00038 {
00039   TPOINT topleft;
00040   TPOINT botright;
00041 } BOUNDS;
00042 
00053 typedef BOUNDS *BOUNDS_LIST;
00054 
00055 /*----------------------------------------------------------------------
00056               F u n c t i o n s
00057 ----------------------------------------------------------------------*/
00058 void break_pieces(TBLOB *blobs, SEAMS seams, INT16 start, INT16 end); 
00059 
00060 void join_pieces(TBLOB *piece_blobs, SEAMS seams, INT16 start, INT16 end); 
00061 
00062 void hide_seam(SEAM *seam); 
00063 
00064 void hide_edge_pair(EDGEPT *pt1, EDGEPT *pt2); 
00065 
00066 void reveal_seam(SEAM *seam); 
00067 
00068 void reveal_edge_pair(EDGEPT *pt1, EDGEPT *pt2); 
00069 
00070 void bounds_of_piece(BOUNDS_LIST bounds,
00071                      INT16 start,
00072                      INT16 end,
00073                      TPOINT *extreme_tl,
00074                      TPOINT *extreme_br);
00075 
00076 CHOICES classify_piece(TBLOB *pieces,
00077                        SEAMS seams,
00078                        INT16 start,
00079                        INT16 end,
00080                        INT32 fx,
00081                        STATE *this_state,
00082                        STATE *best_state,
00083                        INT32 pass,
00084                        INT32 blob_index);
00085 
00086 CHOICES get_piece_rating(MATRIX ratings,
00087                          TBLOB *blobs,
00088                          SEAMS seams,
00089                          INT16 start,
00090                          INT16 end,
00091                          INT32 fx,
00092                          STATE *this_state,
00093                          STATE *best_state,
00094                          INT32 pass,
00095                          INT32 blob_index);
00096 
00097 BOUNDS_LIST record_blob_bounds(TBLOB *blobs); 
00098 
00099 MATRIX record_piece_ratings(TBLOB *blobs); 
00100 
00101 /*
00102 #if defined(__STDC__) || defined(__cplusplus)
00103 # define _ARGS(s) s
00104 #else
00105 # define _ARGS(s) ()
00106 #endif*/
00107 
00108 /* pieces.c *
00109 void break_pieces
00110   _ARGS((BLOB *blobs,
00111   SEAMS seams));
00112 
00113 void join_pieces
00114   _ARGS((BLOB *piece_blobs,
00115   SEAMS seams,
00116   INT16 start,
00117   INT16 end));
00118 
00119 void hide_seam
00120   _ARGS((SEAM *seam));
00121 
00122 void reveal_seam
00123   _ARGS((SEAM *seam));
00124 
00125 void bounds_of_piece
00126   _ARGS((BOUNDS_LIST bounds,
00127   INT16 start,
00128   INT16 end,
00129   TPOINT *extreme_tl,
00130   TPOINT *extreme_br));
00131 
00132 CHOICES classify_piece
00133   _ARGS((BLOB *pieces,
00134   SEAMS seams,
00135   INT16 start,
00136   INT16 end,
00137   INT32 fx,
00138   STATE* this_state,
00139   STATE* best_state,
00140   INT32 pass,
00141   INT32 blob_index));
00142 
00143 CHOICES get_piece_rating
00144   _ARGS((MATRIX ratings,
00145   BLOB *blobs,
00146   SEAMS seams,
00147   INT16 start,
00148   INT16 end,
00149   INT32 fx,
00150   STATE* this_state,
00151   STATE* best_state,
00152   INT32 pass,
00153   INT32 blob_index));
00154 
00155 BOUNDS_LIST record_blob_bounds
00156   _ARGS((BLOB *blobs));
00157 
00158 MATRIX record_piece_ratings
00159   _ARGS((BLOB *blobs));
00160 
00161 #undef _ARGS
00162 */
00163 #endif

Generated on Wed Feb 28 19:49:13 2007 for Tesseract by  doxygen 1.5.1