#include "clst.h"
#include "elst2.h"
#include "werd.h"
#include "ocrblock.h"
#include "statistc.h"
Go to the source code of this file.
Classes |
class | BLOBNBOX |
class | TO_ROW |
class | TO_BLOCK |
Namespaces |
namespace | tesseract |
Enumerations |
enum | PITCH_TYPE {
PITCH_DUNNO,
PITCH_DEF_FIXED,
PITCH_MAYBE_FIXED,
PITCH_DEF_PROP,
PITCH_MAYBE_PROP,
PITCH_CORR_FIXED,
PITCH_CORR_PROP
} |
enum | TabType {
TT_NONE,
TT_DELETED,
TT_MAYBE_RAGGED,
TT_MAYBE_ALIGNED,
TT_CONFIRMED,
TT_VLINE
} |
enum | BlobRegionType {
BRT_NOISE,
BRT_HLINE,
BRT_VLINE,
BRT_RECTIMAGE,
BRT_POLYIMAGE,
BRT_UNKNOWN,
BRT_VERT_TEXT,
BRT_TEXT,
BRT_COUNT
} |
enum | BlobNeighbourDir {
BND_LEFT,
BND_BELOW,
BND_RIGHT,
BND_ABOVE,
BND_COUNT
} |
enum | BlobSpecialTextType {
BSTT_NONE,
BSTT_ITALIC,
BSTT_DIGIT,
BSTT_MATH,
BSTT_UNCLEAR,
BSTT_SKIP,
BSTT_COUNT
} |
enum | BlobTextFlowType {
BTFT_NONE,
BTFT_NONTEXT,
BTFT_NEIGHBOURS,
BTFT_CHAIN,
BTFT_STRONG_CHAIN,
BTFT_TEXT_ON_IMAGE,
BTFT_LEADER,
BTFT_COUNT
} |
Functions |
BlobNeighbourDir | DirOtherWay (BlobNeighbourDir dir) |
bool | DominatesInMerge (BlobTextFlowType type1, BlobTextFlowType type2) |
void | find_cblob_limits (C_BLOB *blob, float leftx, float rightx, FCOORD rotation, float &ymin, float &ymax) |
void | find_cblob_vlimits (C_BLOB *blob, float leftx, float rightx, float &ymin, float &ymax) |
void | find_cblob_hlimits (C_BLOB *blob, float bottomy, float topy, float &xmin, float &xymax) |
C_BLOB * | crotate_cblob (C_BLOB *blob, FCOORD rotation) |
TBOX | box_next (BLOBNBOX_IT *it) |
TBOX | box_next_pre_chopped (BLOBNBOX_IT *it) |
void | vertical_cblob_projection (C_BLOB *blob, STATS *stats) |
void | vertical_coutline_projection (C_OUTLINE *outline, STATS *stats) |
void | plot_blob_list (ScrollView *win, BLOBNBOX_LIST *list, ScrollView::Color body_colour, ScrollView::Color child_colour) |
Variables |
double | textord_error_weight = 3 |
Enumeration Type Documentation
- Enumerator:
BND_LEFT |
|
BND_BELOW |
|
BND_RIGHT |
|
BND_ABOVE |
|
BND_COUNT |
|
Definition at line 72 of file blobbox.h.
- Enumerator:
BRT_NOISE |
|
BRT_HLINE |
|
BRT_VLINE |
|
BRT_RECTIMAGE |
|
BRT_POLYIMAGE |
|
BRT_UNKNOWN |
|
BRT_VERT_TEXT |
|
BRT_TEXT |
|
BRT_COUNT |
|
Definition at line 57 of file blobbox.h.
- Enumerator:
BSTT_NONE |
|
BSTT_ITALIC |
|
BSTT_DIGIT |
|
BSTT_MATH |
|
BSTT_UNCLEAR |
|
BSTT_SKIP |
|
BSTT_COUNT |
|
Definition at line 81 of file blobbox.h.
- Enumerator:
BTFT_NONE |
|
BTFT_NONTEXT |
|
BTFT_NEIGHBOURS |
|
BTFT_CHAIN |
|
BTFT_STRONG_CHAIN |
|
BTFT_TEXT_ON_IMAGE |
|
BTFT_LEADER |
|
BTFT_COUNT |
|
Definition at line 99 of file blobbox.h.
- Enumerator:
PITCH_DUNNO |
|
PITCH_DEF_FIXED |
|
PITCH_MAYBE_FIXED |
|
PITCH_DEF_PROP |
|
PITCH_MAYBE_PROP |
|
PITCH_CORR_FIXED |
|
PITCH_CORR_PROP |
|
Definition at line 29 of file blobbox.h.
- Enumerator:
TT_NONE |
|
TT_DELETED |
|
TT_MAYBE_RAGGED |
|
TT_MAYBE_ALIGNED |
|
TT_CONFIRMED |
|
TT_VLINE |
|
Definition at line 44 of file blobbox.h.
Function Documentation
Definition at line 604 of file blobbox.cpp.
{
C_OUTLINE_LIST out_list;
C_OUTLINE_IT in_it = blob->out_list ();
C_OUTLINE_IT out_it = &out_list;
for (in_it.mark_cycle_pt (); !in_it.cycled_list (); in_it.forward ()) {
out_it.add_after_then_move (new C_OUTLINE (in_it.data (), rotation));
}
return new C_BLOB (&out_list);
}
Definition at line 569 of file blobbox.cpp.
{
inT16 stepindex;
ICOORD pos;
ICOORD vec;
C_OUTLINE *outline;
C_OUTLINE_IT out_it = blob->out_list ();
xmin = (float) MAX_INT32;
xmax = (float) -MAX_INT32;
for (out_it.mark_cycle_pt (); !out_it.cycled_list (); out_it.forward ()) {
outline = out_it.data ();
pos = outline->start_pos ();
for (stepindex = 0; stepindex < outline->pathlength (); stepindex++) {
if (pos.y () >= bottomy && pos.y () <= topy) {
UpdateRange(pos.x(), &xmin, &xmax);
}
vec = outline->step (stepindex);
pos += vec;
}
}
}
Definition at line 492 of file blobbox.cpp.
{
inT16 stepindex;
ICOORD pos;
ICOORD vec;
C_OUTLINE *outline;
C_OUTLINE_IT out_it = blob->out_list ();
ymin = (float) MAX_INT32;
ymax = (float) -MAX_INT32;
for (out_it.mark_cycle_pt (); !out_it.cycled_list (); out_it.forward ()) {
outline = out_it.data ();
pos = outline->start_pos ();
pos.rotate (rotation);
for (stepindex = 0; stepindex < outline->pathlength (); stepindex++) {
if (pos.x () >= leftx && pos.x () <= rightx) {
UpdateRange(pos.y(), &ymin, &ymax);
}
vec = outline->step (stepindex);
vec.rotate (rotation);
pos += vec;
}
}
}
Definition at line 532 of file blobbox.cpp.
{
inT16 stepindex;
ICOORD pos;
ICOORD vec;
C_OUTLINE *outline;
C_OUTLINE_IT out_it = blob->out_list ();
ymin = (float) MAX_INT32;
ymax = (float) -MAX_INT32;
for (out_it.mark_cycle_pt (); !out_it.cycled_list (); out_it.forward ()) {
outline = out_it.data ();
pos = outline->start_pos ();
for (stepindex = 0; stepindex < outline->pathlength (); stepindex++) {
if (pos.x () >= leftx && pos.x () <= rightx) {
UpdateRange(pos.y(), &ymin, &ymax);
}
vec = outline->step (stepindex);
pos += vec;
}
}
}
Definition at line 1080 of file blobbox.cpp.
{
BLOBNBOX_IT it = list;
for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
it.data()->plot(win, body_colour, child_colour);
}
}
Definition at line 881 of file blobbox.cpp.
{
ICOORD pos;
ICOORD step;
inT32 length;
inT16 stepindex;
C_OUTLINE_IT out_it = outline->child ();
pos = outline->start_pos ();
length = outline->pathlength ();
for (stepindex = 0; stepindex < length; stepindex++) {
step = outline->step (stepindex);
if (step.x () > 0) {
stats->add (pos.x (), -pos.y ());
} else if (step.x () < 0) {
stats->add (pos.x () - 1, pos.y ());
}
pos += step;
}
for (out_it.mark_cycle_pt (); !out_it.cycled_list (); out_it.forward ()) {
vertical_coutline_projection (out_it.data (), stats);
}
}
Variable Documentation
"Weighting for error in believability"