#include <blobs.h>
List of all members.
Detailed Description
Definition at line 172 of file blobs.h.
Constructor & Destructor Documentation
TBLOB::TBLOB |
( |
| ) |
[inline] |
TBLOB::TBLOB |
( |
const TBLOB & |
src | ) |
[inline] |
TBLOB::~TBLOB |
( |
| ) |
[inline] |
Member Function Documentation
int TBLOB::BBArea |
( |
| ) |
const [inline] |
Definition at line 216 of file blobs.h.
{
int total_area = 0;
for (TESSLINE* outline = outlines; outline != NULL; outline = outline->next)
total_area += outline->BBArea();
return total_area;
}
TBOX TBLOB::bounding_box |
( |
| ) |
const |
TBLOB * TBLOB::ClassifyNormalizeIfNeeded |
( |
const DENORM ** |
denorm | ) |
const |
Definition at line 276 of file blobs.cpp.
{
TBLOB* rotated_blob = NULL;
if ((*denorm)->block() != NULL &&
(*denorm)->block()->classify_rotation().y() != 0.0) {
TBOX box = bounding_box();
int x_middle = (box.left() + box.right()) / 2;
int y_middle = (box.top() + box.bottom()) / 2;
rotated_blob = new TBLOB(*this);
const FCOORD& rotation = (*denorm)->block()->classify_rotation();
DENORM* norm = new DENORM;
float target_y = kBlnBaselineOffset +
(rotation.y() > 0 ? x_middle - box.left() : box.right() - x_middle);
norm->SetupNormalization(NULL, NULL, &rotation, *denorm, NULL, 0,
x_middle, y_middle, 1.0f, 1.0f, 0.0f, target_y);
rotated_blob->Normalize(*norm);
*denorm = norm;
}
return rotated_blob;
}
void TBLOB::ComputeBoundingBoxes |
( |
| ) |
|
void TBLOB::CopyFrom |
( |
const TBLOB & |
src | ) |
|
void TBLOB::Move |
( |
const ICOORD |
vec | ) |
|
void TBLOB::Normalize |
( |
const DENORM & |
denorm | ) |
|
int TBLOB::NumOutlines |
( |
| ) |
const |
Definition at line 366 of file blobs.cpp.
{
int result = 0;
for (TESSLINE* outline = outlines; outline != NULL; outline = outline->next)
++result;
return result;
}
TBLOB& TBLOB::operator= |
( |
const TBLOB & |
src | ) |
[inline] |
Definition at line 390 of file blobs.cpp.
{
for (TESSLINE* outline = outlines; outline != NULL; outline = outline->next)
outline->plot(window, color, child_color);
}
void TBLOB::Rotate |
( |
const FCOORD |
rotation | ) |
|
void TBLOB::Scale |
( |
float |
factor | ) |
|
Member Data Documentation
The documentation for this struct was generated from the following files: