tesseract v5.3.3.20231005
|
#include <edgblob.h>
Public Member Functions | |
OL_BUCKETS::OL_BUCKETS | |
Construct an array of buckets for associating outlines into blobs. | |
OL_BUCKETS (ICOORD bleft, ICOORD tright) | |
OL_BUCKETS::count_children | |
Find number of descendants of this outline. | |
int32_t | count_children (C_OUTLINE *outline, int32_t 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_t | outline_complexity (C_OUTLINE *outline, int32_t max_count, int16_t depth) |
OL_BUCKETS::extract_children | |
Find number of descendants of this outline. | |
void | extract_children (C_OUTLINE *outline, C_OUTLINE_IT *it) |
OL_BUCKETS::operator( | |
Return a pointer to a list of C_OUTLINEs corresponding to the given pixel coordinates. | |
C_OUTLINE_LIST * | operator() (TDimension x, TDimension y) |
C_OUTLINE_LIST * | start_scan () |
C_OUTLINE_LIST * | scan_next () |
Definition at line 64 of file edgblob.cpp.
int32_t tesseract::OL_BUCKETS::count_children | ( | C_OUTLINE * | outline, |
int32_t | max_count | ||
) |
Definition at line 195 of file edgblob.cpp.
void tesseract::OL_BUCKETS::extract_children | ( | C_OUTLINE * | outline, |
C_OUTLINE_IT * | it | ||
) |
Definition at line 318 of file edgblob.cpp.
C_OUTLINE_LIST * tesseract::OL_BUCKETS::operator() | ( | TDimension | x, |
TDimension | y | ||
) |
Definition at line 79 of file edgblob.cpp.
int32_t tesseract::OL_BUCKETS::outline_complexity | ( | C_OUTLINE * | outline, |
int32_t | max_count, | ||
int16_t | depth | ||
) |
Definition at line 121 of file edgblob.cpp.
C_OUTLINE_LIST * tesseract::OL_BUCKETS::scan_next | ( | ) |
Definition at line 90 of file edgblob.cpp.
C_OUTLINE_LIST * tesseract::OL_BUCKETS::start_scan | ( | ) |
Definition at line 86 of file edgblob.cpp.