tesseract
5.0.0-alpha-619-ge9db
|
#include <edgblob.h>
Public Member Functions | |
~OL_BUCKETS ()=default | |
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_t x, int16_t y) |
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) |
Definition at line 63 of file edgblob.cpp.
|
default |
int32_t OL_BUCKETS::count_children | ( | C_OUTLINE * | outline, |
int32_t | max_count | ||
) |
Definition at line 178 of file edgblob.cpp.
void OL_BUCKETS::extract_children | ( | C_OUTLINE * | outline, |
C_OUTLINE_IT * | it | ||
) |
Definition at line 294 of file edgblob.cpp.
C_OUTLINE_LIST * OL_BUCKETS::operator() | ( | int16_t | x, |
int16_t | y | ||
) |
Definition at line 82 of file edgblob.cpp.
int32_t OL_BUCKETS::outline_complexity | ( | C_OUTLINE * | outline, |
int32_t | max_count, | ||
int16_t | depth | ||
) |
Definition at line 109 of file edgblob.cpp.
|
inline |
|
inline |