tesseract-doxygen/wordrec/outlines.h File Reference
#include "blobs.h"
#include "chop.h"
#include <math.h>
Go to the source code of this file.
Defines |
#define | LARGE_DISTANCE 100000 |
#define | MIN_BLOB_SIZE 10 |
#define | MAX_ASPECT_RATIO 2.5 |
#define | same_point(p1, p2) |
#define | dist_square(p1, p2) |
#define | closest(test_p, p1, p2) |
#define | edgept_dist(p1, p2) (dist_square ((p1)->pos, (p2)->pos)) |
#define | is_exterior_point(edge, point) |
#define | is_equal(p1, p2) (((p1).x == (p2).x) && ((p1).y == (p2).y)) |
#define | is_on_line(p, p0, p1) |
#define | within_range(x, x0, x1) (((x0 <= x) && (x <= x1)) || ((x1 <= x) && (x <= x0))) |
Functions |
int | crosses_outline (EDGEPT *p0, EDGEPT *p1, EDGEPT *outline) |
int | is_crossed (TPOINT a0, TPOINT a1, TPOINT b0, TPOINT b1) |
int | is_same_edgept (EDGEPT *p1, EDGEPT *p2) |
EDGEPT * | near_point (EDGEPT *point, EDGEPT *line_pt_0, EDGEPT *line_pt_1) |
void | reverse_outline (EDGEPT *outline) |
Define Documentation
#define closest |
( |
test_p, |
|
|
p1, |
|
|
p2 |
|
) |
|
Value:(p1 ? \
(p2 ? \
((dist_square (test_p->pos, p1->pos) < \
dist_square (test_p->pos, p2->pos)) ? \
p1 : \
p2) : \
p1) : \
p2)
#define dist_square |
( |
p1, |
|
|
p2 |
|
) |
|
Value:((p2.x - p1.x) * (p2.x - p1.x) + \
(p2.y - p1.y) * (p2.y - p1.y))
#define edgept_dist |
( |
p1, |
|
|
p2 |
|
) |
(dist_square ((p1)->pos, (p2)->pos)) |
#define is_equal |
( |
p1, |
|
|
p2 |
|
) |
(((p1).x == (p2).x) && ((p1).y == (p2).y)) |
#define is_exterior_point |
( |
edge, |
|
|
point |
|
) |
|
#define is_on_line |
( |
p, |
|
|
p0, |
|
|
p1 |
|
) |
|
#define LARGE_DISTANCE 100000 |
#define MAX_ASPECT_RATIO 2.5 |
#define same_point |
( |
p1, |
|
|
p2 |
|
) |
|
#define within_range |
( |
x, |
|
|
x0, |
|
|
x1 |
|
) |
(((x0 <= x) && (x <= x1)) || ((x1 <= x) && (x <= x0))) |
Function Documentation
void reverse_outline |
( |
EDGEPT * |
outline |
) |
|