tesseract-doxygen/textord/tordmain.cpp File Reference

#include "mfcpch.h"
#include "stderr.h"
#include "globaloc.h"
#include "tessout.h"
#include "ocrblock.h"
#include "tessclas.h"
#include "statistc.h"
#include "notdll.h"
#include "blread.h"
#include "blobbox.h"
#include "edgblob.h"
#include "drawtord.h"
#include "makerow.h"
#include "wordseg.h"
#include "ocrclass.h"
#include "genblob.h"
#include "imgs.h"
#include "tordmain.h"
#include "secname.h"
#include "tesseractclass.h"

Defines

#define EXTERN
#define MAX_NEAREST_DIST   600
#define MAX_BLOB_TRANSITIONS100

Functions

EXTERN STRING_EVAR (tessedit_image_ext,".tif","Externsion for image file")
void find_components (BLOCK_LIST *blocks, TO_BLOCK_LIST *land_blocks, TO_BLOCK_LIST *port_blocks, TBOX *page_box)
void SetBlobStrokeWidth (bool debug, BLOBNBOX *blob)
void assign_blobs_to_blocks2 (BLOCK_LIST *blocks, TO_BLOCK_LIST *land_blocks, TO_BLOCK_LIST *port_blocks)
void filter_blobs (ICOORD page_tr, TO_BLOCK_LIST *blocks, BOOL8 testing_on)
float filter_noise_blobs (BLOBNBOX_LIST *src_list, BLOBNBOX_LIST *noise_list, BLOBNBOX_LIST *small_list, BLOBNBOX_LIST *large_list)
float filter_noise_blobs2 (BLOBNBOX_LIST *src_list, BLOBNBOX_LIST *noise_list, BLOBNBOX_LIST *small_list, BLOBNBOX_LIST *large_list)
void textord_page (ICOORD page_tr, BLOCK_LIST *blocks, TO_BLOCK_LIST *land_blocks, TO_BLOCK_LIST *port_blocks, tesseract::Tesseract *tess)
void cleanup_blocks (BLOCK_LIST *blocks)
BOOL8 clean_noise_from_row (ROW *row)
void clean_noise_from_words (ROW *row)
void clean_small_noise_from_words (ROW *row)
void tweak_row_baseline (ROW *row)
inT32 blob_y_order (void *item1, void *item2)

Variables

const ERRCODE BLOCKLESS_BLOBS = "Warning:some blobs assigned to no block"
EXTERN bool textord_no_rejects = FALSE
EXTERN bool textord_show_blobs = FALSE
EXTERN bool textord_show_boxes = FALSE
EXTERN bool textord_new_initial_xheight = TRUE
EXTERN bool textord_exit_after = FALSE
EXTERN int textord_max_noise_size = 7
EXTERN double textord_blob_size_bigile = 95
EXTERN double textord_noise_area_ratio = 0.7
EXTERN double textord_blob_size_smallile = 20
EXTERN double textord_initialx_ile = 0.75
EXTERN double textord_initialasc_ile = 0.90
EXTERN int textord_noise_sizefraction = 10
EXTERN double textord_noise_sizelimit = 0.5
EXTERN int textord_noise_translimit = 16
EXTERN double textord_noise_normratio = 2.0
EXTERN bool textord_noise_rejwords = TRUE
EXTERN bool textord_noise_rejrows = TRUE
EXTERN double textord_noise_syfract = 0.2
EXTERN double textord_noise_sxfract = 0.4
EXTERN double textord_noise_hfract = 1.0/64
EXTERN int textord_noise_sncount = 1
EXTERN double textord_noise_rowratio = 6.0
EXTERN bool textord_noise_debug = FALSE
EXTERN double textord_blshift_maxshift = 0.00
EXTERN double textord_blshift_xfraction = 9.99
EXTERN clock_t previous_cpu
bool polygon_tess_approximation = TRUE
IMAGE page_image
bool interactive_mode = TRUE
ETEXT_DESCglobal_monitor

Define Documentation

#define EXTERN
#define MAX_BLOB_TRANSITIONS100
#define MAX_NEAREST_DIST   600

Function Documentation

void assign_blobs_to_blocks2 ( BLOCK_LIST *  blocks,
TO_BLOCK_LIST *  land_blocks,
TO_BLOCK_LIST *  port_blocks 
)
inT32 blob_y_order ( void *  item1,
void *  item2 
)
BOOL8 clean_noise_from_row ( ROW row  ) 
void clean_noise_from_words ( ROW row  ) 
void clean_small_noise_from_words ( ROW row  ) 
void cleanup_blocks ( BLOCK_LIST *  blocks  ) 
void filter_blobs ( ICOORD  page_tr,
TO_BLOCK_LIST *  blocks,
BOOL8  testing_on 
)
float filter_noise_blobs ( BLOBNBOX_LIST *  src_list,
BLOBNBOX_LIST *  noise_list,
BLOBNBOX_LIST *  small_list,
BLOBNBOX_LIST *  large_list 
)
float filter_noise_blobs2 ( BLOBNBOX_LIST *  src_list,
BLOBNBOX_LIST *  noise_list,
BLOBNBOX_LIST *  small_list,
BLOBNBOX_LIST *  large_list 
)
void find_components ( BLOCK_LIST *  blocks,
TO_BLOCK_LIST *  land_blocks,
TO_BLOCK_LIST *  port_blocks,
TBOX page_box 
)
void SetBlobStrokeWidth ( bool  debug,
BLOBNBOX blob 
)
EXTERN STRING_EVAR ( tessedit_image_ext  ,
".tif"  ,
"Externsion for image file"   
)
void textord_page ( ICOORD  page_tr,
BLOCK_LIST *  blocks,
TO_BLOCK_LIST *  land_blocks,
TO_BLOCK_LIST *  port_blocks,
tesseract::Tesseract tess 
)
void tweak_row_baseline ( ROW row  ) 

Variable Documentation

const ERRCODE BLOCKLESS_BLOBS = "Warning:some blobs assigned to no block"

"Run interactively?"

"Do tess poly instead of grey scale"

"Do tess poly instead of greyscale"

EXTERN clock_t previous_cpu
EXTERN double textord_blob_size_bigile = 95

"Percentile for large blobs"

EXTERN double textord_blob_size_smallile = 20

"Percentile for small blobs"

EXTERN double textord_blshift_maxshift = 0.00

"Max baseline shift"

EXTERN double textord_blshift_xfraction = 9.99

"Min size of baseline shift"

EXTERN bool textord_exit_after = FALSE

"Exit after completing textord"

EXTERN double textord_initialasc_ile = 0.90

"Ile of sizes for xheight guess"

EXTERN double textord_initialx_ile = 0.75

"Ile of sizes for xheight guess"

EXTERN int textord_max_noise_size = 7

"Pixel size of noise"

"Use test xheight mechanism"

EXTERN bool textord_no_rejects = FALSE

"Don't remove noise blobs"

EXTERN double textord_noise_area_ratio = 0.7

"Fraction of bounding box for noise"

EXTERN bool textord_noise_debug = FALSE

"Debug row garbage detector"

EXTERN double textord_noise_hfract = 1.0/64

"Height fraction to discard outlines as speckle noise"

EXTERN double textord_noise_normratio = 2.0

"Dot to norm ratio for deletion"

"Reject noise-like rows"

"Reject noise-like words"

EXTERN double textord_noise_rowratio = 6.0

"Dot to norm ratio for deletion"

EXTERN int textord_noise_sizefraction = 10

"Fraction of size for maxima"

EXTERN double textord_noise_sizelimit = 0.5

"Fraction of x for big t count"

EXTERN int textord_noise_sncount = 1

"super norm blobs to save row"

EXTERN double textord_noise_sxfract = 0.4

"xh fract width error for norm blobs"

EXTERN double textord_noise_syfract = 0.2

"xh fract error for norm blobs"

EXTERN int textord_noise_translimit = 16

"Transitions for normal blob"

EXTERN bool textord_show_blobs = FALSE

"Display unsorted blobs"

EXTERN bool textord_show_boxes = FALSE

"Display unsorted blobs"

Generated on Sun Jul 18 17:10:51 2010 for Tesseract by  doxygen 1.6.3