Tesseract 3.01
OL_BUCKETS Class Reference

#include <edgblob.h>

List of all members.

Public Member Functions

 ~OL_BUCKETS ()
C_OUTLINE_LIST * start_scan ()
C_OUTLINE_LIST * scan_next ()
OL_BUCKETS::OL_BUCKETS

Construct an array of buckets for associating outlines into blobs.

 OL_BUCKETS (ICOORD bleft, ICOORD tright)
OL_BUCKETS::operator(

Return a pointer to a list of C_OUTLINEs corresponding to the given pixel coordinates.

C_OUTLINE_LIST * operator() (inT16 x, inT16 y)
OL_BUCKETS::count_children

Find number of descendants of this outline.

inT32 count_children (C_OUTLINE *outline, inT32 max_count)
OL_BUCKETS::outline_complexity

This is the new version of count_child.

The goal of this function is to determine if an outline and its interiors could be part of a character blob. This is done by computing a "complexity" index for the outline, which is the return value of this function, and checking it against a threshold. The max_count is used for short-circuiting the recursion and forcing a rejection that guarantees to fail the threshold test. The complexity F for outline X with N children X[i] is F(X) = N + sum_i F(X[i]) * edges_children_per_grandchild so each layer of nesting increases complexity exponentially. An outline can be rejected as a text blob candidate if its complexity is too high, has too many children(likely a container), or has too many layers of nested inner loops. This has the side-effect of flattening out boxed or reversed video text regions.

inT32 outline_complexity (C_OUTLINE *outline, inT32 max_count, inT16 depth)
OL_BUCKETS::extract_children

Find number of descendants of this outline.

void extract_children (C_OUTLINE *outline, C_OUTLINE_IT *it)

Constructor & Destructor Documentation

OL_BUCKETS::OL_BUCKETS ( ICOORD  bleft,
ICOORD  tright 
)
Parameters:
bleft/ constructor
OL_BUCKETS::~OL_BUCKETS ( ) [inline]

Member Function Documentation

inT32 OL_BUCKETS::count_children ( C_OUTLINE outline,
inT32  max_count 
)
void OL_BUCKETS::extract_children ( C_OUTLINE outline,
C_OUTLINE_IT *  it 
)
C_OUTLINE_LIST * OL_BUCKETS::operator() ( inT16  x,
inT16  y 
)
inT32 OL_BUCKETS::outline_complexity ( C_OUTLINE outline,
inT32  max_count,
inT16  depth 
)
C_OUTLINE_LIST* OL_BUCKETS::scan_next ( ) [inline]
C_OUTLINE_LIST* OL_BUCKETS::start_scan ( ) [inline]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines