tesseract  3.03
/usr/local/google/home/jbreiden/tesseract-ocr-read-only/textord/gap_map.h
Go to the documentation of this file.
00001 #ifndef           GAP_MAP_H
00002 #define           GAP_MAP_H
00003 
00004 #include          "blobbox.h"
00005 
00006 class GAPMAP
00007 {
00008   public:
00009     GAPMAP(  //constructor
00010            TO_BLOCK *block);
00011 
00012     ~GAPMAP () {                 //destructor
00013       if (map != NULL)
00014         free_mem(map);
00015     }
00016 
00017     BOOL8 table_gap(               //Is gap a table?
00018                     inT16 left,    //From here
00019                     inT16 right);  //To here
00020 
00021   private:
00022     inT16 total_rows;            //in block
00023     inT16 min_left;              //Left extreme
00024     inT16 max_right;             //Right extreme
00025     inT16 bucket_size;           // half an x ht
00026     inT16 *map;                  //empty counts
00027     inT16 map_max;               //map[0..max_map]       defind
00028     BOOL8 any_tabs;
00029 };
00030 
00031 /*-----------------------------*/
00032 
00033 extern BOOL_VAR_H (gapmap_debug, FALSE, "Say which blocks have tables");
00034 extern BOOL_VAR_H (gapmap_use_ends, FALSE,
00035 "Use large space at start and end of rows");
00036 extern BOOL_VAR_H (gapmap_no_isolated_quanta, FALSE,
00037 "Ensure gaps not less than 2quanta wide");
00038 extern double_VAR_H (gapmap_big_gaps, 1.75, "xht multiplier");
00039 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines