|
tesseract 3.04.01
|
#include "cutil.h"#include "matrix.h"#include "seam.h"#include "stopper.h"Go to the source code of this file.
Functions | |
| void | preserve_outline (EDGEPT *start) |
| void | preserve_outline_tree (TESSLINE *srcline) |
| EDGEPT * | restore_outline (EDGEPT *start) |
| void | restore_outline_tree (TESSLINE *srcline) |
| int | any_shared_split_points (const GenericVector< SEAM * > &seams, SEAM *seam) |
| int | check_blob (TBLOB *blob) |
| inT16 | total_containment (TBLOB *blob1, TBLOB *blob2) |
| int any_shared_split_points | ( | const GenericVector< SEAM * > & | seams, |
| SEAM * | seam | ||
| ) |
Definition at line 282 of file chopper.cpp.
{
int length;
int index;
length = seams.size();
for (index = 0; index < length; index++)
if (seam->SharesPosition(*seams[index])) return TRUE;
return FALSE;
}
| int check_blob | ( | TBLOB * | blob | ) |
Definition at line 298 of file chopper.cpp.
| void preserve_outline | ( | EDGEPT * | start | ) |
| void preserve_outline_tree | ( | TESSLINE * | srcline | ) |
Definition at line 83 of file chopper.cpp.
{
TESSLINE *outline;
for (outline = srcline; outline != NULL; outline = outline->next) {
preserve_outline (outline->loop);
}
}
Definition at line 97 of file chopper.cpp.
{
EDGEPT *srcpt;
EDGEPT *real_start;
if (start == NULL)
return NULL;
srcpt = start;
do {
if (srcpt->flags[1] == 2)
break;
srcpt = srcpt->next;
}
while (srcpt != start);
real_start = srcpt;
do {
srcpt = srcpt->next;
if (srcpt->prev->flags[1] == 0) {
remove_edgept(srcpt->prev);
}
}
while (srcpt != real_start);
return real_start;
}
| void restore_outline_tree | ( | TESSLINE * | srcline | ) |
Definition at line 123 of file chopper.cpp.
Definition at line 656 of file chopper.cpp.
{
TBOX box1 = blob1->bounding_box();
TBOX box2 = blob2->bounding_box();
return box1.contains(box2) || box2.contains(box1);
}