#include "blobbox.h"
#include "allheaders.h"
#include "blobs.h"
#include "helpers.h"
#include "normalis.h"
Go to the source code of this file.
|
| ELISTIZE (BLOBNBOX) ELIST2IZE(TO_ROW) ELISTIZE(TO_BLOCK) const double kCosSmallAngle=0.866 |
|
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 &xmax) |
|
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) |
|
#define PROJECTION_MARGIN 10 |
TBOX box_next |
( |
BLOBNBOX_IT * |
it | ) |
|
Definition at line 629 of file blobbox.cpp.
bool joined_to_prev() const
const TBOX & bounding_box() const
TBOX box_next_pre_chopped |
( |
BLOBNBOX_IT * |
it | ) |
|
Definition at line 658 of file blobbox.cpp.
bool joined_to_prev() const
const TBOX & bounding_box() const
Definition at line 604 of file blobbox.cpp.
608 C_OUTLINE_LIST out_list;
610 C_OUTLINE_IT in_it = blob->
out_list ();
612 C_OUTLINE_IT out_it = &out_list;
614 for (in_it.mark_cycle_pt (); !in_it.cycled_list (); in_it.forward ()) {
615 out_it.add_after_then_move (
new C_OUTLINE (in_it.data (), rotation));
617 return new C_BLOB (&out_list);
C_OUTLINE_LIST * out_list()
void find_cblob_hlimits |
( |
C_BLOB * |
blob, |
|
|
float |
bottomy, |
|
|
float |
topy, |
|
|
float & |
xmin, |
|
|
float & |
xmax |
|
) |
| |
Definition at line 569 of file blobbox.cpp.
580 C_OUTLINE_IT out_it = blob->
out_list ();
584 for (out_it.mark_cycle_pt (); !out_it.cycled_list (); out_it.forward ()) {
585 outline = out_it.data ();
587 for (stepindex = 0; stepindex < outline->
pathlength (); stepindex++) {
589 if (pos.
y () >= bottomy && pos.
y () <= topy) {
592 vec = outline->
step (stepindex);
const ICOORD & start_pos() const
void UpdateRange(const T1 &x, T2 *lower_bound, T2 *upper_bound)
C_OUTLINE_LIST * out_list()
inT16 y() const
access_function
inT16 x() const
access function
ICOORD step(int index) const
void find_cblob_limits |
( |
C_BLOB * |
blob, |
|
|
float |
leftx, |
|
|
float |
rightx, |
|
|
FCOORD |
rotation, |
|
|
float & |
ymin, |
|
|
float & |
ymax |
|
) |
| |
Definition at line 492 of file blobbox.cpp.
504 C_OUTLINE_IT out_it = blob->
out_list ();
508 for (out_it.mark_cycle_pt (); !out_it.cycled_list (); out_it.forward ()) {
509 outline = out_it.data ();
512 for (stepindex = 0; stepindex < outline->
pathlength (); stepindex++) {
514 if (pos.
x () >= leftx && pos.
x () <= rightx) {
517 vec = outline->
step (stepindex);
const ICOORD & start_pos() const
void UpdateRange(const T1 &x, T2 *lower_bound, T2 *upper_bound)
C_OUTLINE_LIST * out_list()
void rotate(const FCOORD &vec)
inT16 y() const
access_function
inT16 x() const
access function
ICOORD step(int index) const
void find_cblob_vlimits |
( |
C_BLOB * |
blob, |
|
|
float |
leftx, |
|
|
float |
rightx, |
|
|
float & |
ymin, |
|
|
float & |
ymax |
|
) |
| |
Definition at line 532 of file blobbox.cpp.
543 C_OUTLINE_IT out_it = blob->
out_list ();
547 for (out_it.mark_cycle_pt (); !out_it.cycled_list (); out_it.forward ()) {
548 outline = out_it.data ();
550 for (stepindex = 0; stepindex < outline->
pathlength (); stepindex++) {
552 if (pos.
x () >= leftx && pos.
x () <= rightx) {
555 vec = outline->
step (stepindex);
const ICOORD & start_pos() const
void UpdateRange(const T1 &x, T2 *lower_bound, T2 *upper_bound)
C_OUTLINE_LIST * out_list()
inT16 y() const
access_function
inT16 x() const
access function
ICOORD step(int index) const
Definition at line 1080 of file blobbox.cpp.
1084 BLOBNBOX_IT it = list;
1085 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
1086 it.data()->plot(win, body_colour, child_colour);
void vertical_cblob_projection |
( |
C_BLOB * |
blob, |
|
|
STATS * |
stats |
|
) |
| |
Definition at line 861 of file blobbox.cpp.
866 C_OUTLINE_IT out_it = blob->
out_list ();
868 for (out_it.mark_cycle_pt (); !out_it.cycled_list (); out_it.forward ()) {
void vertical_coutline_projection(C_OUTLINE *outline, STATS *stats)
C_OUTLINE_LIST * out_list()
void vertical_coutline_projection |
( |
C_OUTLINE * |
outline, |
|
|
STATS * |
stats |
|
) |
| |
Definition at line 881 of file blobbox.cpp.
889 C_OUTLINE_IT out_it = outline->
child ();
893 for (stepindex = 0; stepindex < length; stepindex++) {
894 step = outline->
step (stepindex);
896 stats->
add (pos.
x (), -pos.
y ());
897 }
else if (step.
x () < 0) {
898 stats->
add (pos.
x () - 1, pos.
y ());
903 for (out_it.mark_cycle_pt (); !out_it.cycled_list (); out_it.forward ()) {
void vertical_coutline_projection(C_OUTLINE *outline, STATS *stats)
const ICOORD & start_pos() const
void add(inT32 value, inT32 count)
inT16 y() const
access_function
inT16 x() const
access function
ICOORD step(int index) const
const double kComplexShapePerimeterRatio = 1.5 |
const double kDefiniteAspectRatio = 2.0 |
const double kMaxMediumSizeRatio = 4.0 |
const double kMinMediumSizeRatio = 0.25 |