tesseract-doxygen/textord/blkocc.cpp File Reference

#include "mfcpch.h"
#include <ctype.h>
#include <math.h>
#include "errcode.h"
#include "drawtord.h"
#include "varable.h"
#include "scrollview.h"
#include "elst.h"
#include "clst.h"
#include "blobbox.h"
#include "statistc.h"
#include "notdll.h"
#include "polyblob.h"

Defines

#define EXTERN
#define REGION_TYPE_EMPTY   0
#define REGION_TYPE_OPEN_RIGHT   1
#define REGION_TYPE_OPEN_LEFT   2
#define REGION_TYPE_UPPER_BOUND   3
#define REGION_TYPE_UPPER_UNBOUND   4
#define REGION_TYPE_LOWER_BOUND   5
#define REGION_TYPE_LOWER_UNBOUND   6
#define REGION_TYPE_ENCLOSED   7

Functions

BOOL8 test_underline (BOOL8 testing_on, PBLOB *blob, float baseline, float xheight)
BOOL8 test_underline (BOOL8 testing_on, C_BLOB *blob, inT16 baseline, inT16 xheight)
void horizontal_cblob_projection (C_BLOB *blob, STATS *stats)
void horizontal_coutline_projection (C_OUTLINE *outline, STATS *stats)
void set_bands (float baseline, float xheight)
void block_occ (PBLOB *blob, float occs[])
void find_transitions (PBLOB *blob, REGION_OCC_LIST *region_occ_list)
void record_region (inT16 band, float new_min, float new_max, inT16 region_type, REGION_OCC_LIST *region_occ_list)
inT16 find_containing_maximal_band (float y1, float y2, BOOL8 *doubly_contained)
void find_significant_line (POLYPT_IT it, inT16 *band)
inT16 find_overlapping_minimal_band (float y1, float y2)
inT16 find_region_type (inT16 entry_band, inT16 current_band, inT16 exit_band, float entry_x, float exit_x)
void find_trans_point (POLYPT_IT *pt_it, inT16 current_band, inT16 next_band, FCOORD *transition_pt)
void next_region (POLYPT_IT *start_pt_it, inT16 start_band, inT16 *to_band, float *min_x, float *max_x, inT16 *increment, FCOORD *exit_pt)
inT16 find_band (float y)
void compress_region_list (REGION_OCC_LIST *region_occ_list)
void find_fbox (OUTLINE_IT *out_it, float *min_x, float *min_y, float *max_x, float *max_y)
void maintain_limits (float *min_x, float *max_x, float x)

Variables

const ERRCODE BLOCKOCC = "BlockOcc"
EXTERN bool blockocc_show_result = FALSE
EXTERN int blockocc_desc_height = 0
EXTERN int blockocc_asc_height = 255
EXTERN int blockocc_band_count = 4
EXTERN double textord_underline_threshold = 0.5
BAND bands [MAX_NUM_BANDS+1]

Define Documentation

#define EXTERN
#define REGION_TYPE_EMPTY   0
#define REGION_TYPE_ENCLOSED   7
#define REGION_TYPE_LOWER_BOUND   5
#define REGION_TYPE_LOWER_UNBOUND   6
#define REGION_TYPE_OPEN_LEFT   2
#define REGION_TYPE_OPEN_RIGHT   1
#define REGION_TYPE_UPPER_BOUND   3
#define REGION_TYPE_UPPER_UNBOUND   4

Function Documentation

void block_occ ( PBLOB blob,
float  occs[] 
)
void compress_region_list ( REGION_OCC_LIST *  region_occ_list  ) 
inT16 find_band ( float  y  ) 
inT16 find_containing_maximal_band ( float  y1,
float  y2,
BOOL8 doubly_contained 
)
void find_fbox ( OUTLINE_IT *  out_it,
float *  min_x,
float *  min_y,
float *  max_x,
float *  max_y 
)
inT16 find_overlapping_minimal_band ( float  y1,
float  y2 
)
inT16 find_region_type ( inT16  entry_band,
inT16  current_band,
inT16  exit_band,
float  entry_x,
float  exit_x 
)
void find_significant_line ( POLYPT_IT  it,
inT16 band 
)
void find_trans_point ( POLYPT_IT *  pt_it,
inT16  current_band,
inT16  next_band,
FCOORD transition_pt 
)
void find_transitions ( PBLOB blob,
REGION_OCC_LIST *  region_occ_list 
)
void horizontal_cblob_projection ( C_BLOB blob,
STATS stats 
)
void horizontal_coutline_projection ( C_OUTLINE outline,
STATS stats 
)
void maintain_limits ( float *  min_x,
float *  max_x,
float  x 
)
void next_region ( POLYPT_IT *  start_pt_it,
inT16  start_band,
inT16 to_band,
float *  min_x,
float *  max_x,
inT16 increment,
FCOORD exit_pt 
)
void record_region ( inT16  band,
float  new_min,
float  new_max,
inT16  region_type,
REGION_OCC_LIST *  region_occ_list 
)
void set_bands ( float  baseline,
float  xheight 
)
BOOL8 test_underline ( BOOL8  testing_on,
C_BLOB blob,
inT16  baseline,
inT16  xheight 
)
BOOL8 test_underline ( BOOL8  testing_on,
PBLOB blob,
float  baseline,
float  xheight 
)

Variable Documentation

BAND bands[MAX_NUM_BANDS+1]
const ERRCODE BLOCKOCC = "BlockOcc"
EXTERN int blockocc_asc_height = 255

"Ascender height after normalisation"

EXTERN int blockocc_band_count = 4

"Number of bands used"

EXTERN int blockocc_desc_height = 0

"Descender height after normalisation"

EXTERN bool blockocc_show_result = FALSE

"Show intermediate results"

EXTERN double textord_underline_threshold = 0.5

"Fraction of width occupied"

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