wordrec/gradechop.h

Go to the documentation of this file.
00001 
00020 #ifndef GRADECHOP_H
00021 #define GRADECHOP_H
00022 
00023 /*----------------------------------------------------------------------
00024               I n c l u d e s
00025 ----------------------------------------------------------------------*/
00026 #include "seam.h"
00027 
00028 /*----------------------------------------------------------------------
00029               T y p e s
00030 ----------------------------------------------------------------------*/
00035 typedef INT16 BOUNDS_RECT[4];
00036 
00037 /*----------------------------------------------------------------------
00038               V a r i a b l e s
00039 ---------------------------------------------------------------------*/
00040 /* Doxygen comments in chop.cpp */
00041 extern int x_y_weight;
00042 
00043 /*----------------------------------------------------------------------
00044               M a c r o s
00045 ----------------------------------------------------------------------*/
00046 /* ================== */
00053 #define partial_split_priority(split)  \
00054 (grade_split_length   (split) +      \
00055    grade_sharpness      (split))       \
00056 
00057 
00058 /* ================== */
00064 #define split_bounds_overlap(split,outline)  \
00065 (outline->topleft.x  <= max (split->point1->pos.x,split->point2->pos.x) && \
00066    outline->botright.x >= min (split->point1->pos.x,split->point2->pos.x) && \
00067    outline->botright.y <= max (split->point1->pos.y,split->point2->pos.y) && \
00068    outline->topleft.y  >= min (split->point1->pos.y,split->point2->pos.y))
00069 
00070 /*----------------------------------------------------------------------
00071               F u n c t i o n s
00072 ----------------------------------------------------------------------*/
00073 PRIORITY full_split_priority(SPLIT *split, INT16 xmin, INT16 xmax); 
00074 
00075 PRIORITY grade_center_of_blob(register BOUNDS_RECT rect); 
00076 
00077 PRIORITY grade_overlap(register BOUNDS_RECT rect); 
00078 
00079 PRIORITY grade_split_length(register SPLIT *split); 
00080 
00081 PRIORITY grade_sharpness(register SPLIT *split); 
00082 
00083 PRIORITY grade_width_change(register BOUNDS_RECT rect); 
00084 
00085 void set_outline_bounds(register EDGEPT *point1,
00086                         register EDGEPT *point2,
00087                         BOUNDS_RECT rect);
00088 #endif

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