|
Tesseract
3.02
|
#include "olutil.h"#include "structures.h"#include "blobs.h"#include "const.h"#include <assert.h>Go to the source code of this file.
Functions | |
| void | correct_blob_order (TBLOB *blob1, TBLOB *blob2) |
| void | eliminate_duplicate_outlines (TBLOB *blob) |
| void | setup_blob_outlines (TBLOB *blob) |
Definition at line 46 of file olutil.cpp.
| void eliminate_duplicate_outlines | ( | TBLOB * | blob | ) |
Definition at line 67 of file olutil.cpp.
{
TESSLINE *outline;
TESSLINE *other_outline;
TESSLINE *last_outline;
for (outline = blob->outlines; outline; outline = outline->next) {
for (last_outline = outline, other_outline = outline->next;
other_outline;
last_outline = other_outline, other_outline = other_outline->next) {
if (same_outline_bounds (outline, other_outline)) {
last_outline->next = other_outline->next;
// This doesn't leak - the outlines share the EDGEPTs.
other_outline->loop = NULL;
delete other_outline;
other_outline = last_outline;
// If it is part of a cut, then it can't be a hole any more.
outline->is_hole = false;
}
}
}
}
| void setup_blob_outlines | ( | TBLOB * | blob | ) |
Definition at line 96 of file olutil.cpp.
{
TESSLINE *outline;
for (outline = blob->outlines; outline; outline = outline->next) {
outline->ComputeBoundingBox();
}
}