#include "mfcpch.h"
#include "blobbox.h"
#include "helpers.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 585 of file blobbox.cpp.
const TBOX & bounding_box() const
bool joined_to_prev() const
| TBOX box_next_pre_chopped |
( |
BLOBNBOX_IT * |
it | ) |
|
Definition at line 614 of file blobbox.cpp.
const TBOX & bounding_box() const
bool joined_to_prev() const
Definition at line 560 of file blobbox.cpp.
564 C_OUTLINE_LIST out_list;
566 C_OUTLINE_IT in_it = blob->
out_list ();
568 C_OUTLINE_IT out_it = &out_list;
570 for (in_it.mark_cycle_pt (); !in_it.cycled_list (); in_it.forward ()) {
571 out_it.add_after_then_move (
new C_OUTLINE (in_it.data (), rotation));
573 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 525 of file blobbox.cpp.
536 C_OUTLINE_IT out_it = blob->
out_list ();
540 for (out_it.mark_cycle_pt (); !out_it.cycled_list (); out_it.forward ()) {
541 outline = out_it.data ();
543 for (stepindex = 0; stepindex < outline->
pathlength (); stepindex++) {
545 if (pos.
y () >= bottomy && pos.
y () <= topy) {
548 vec = outline->
step (stepindex);
inT16 x() const
access function
const ICOORD & start_pos() const
C_OUTLINE_LIST * out_list()
ICOORD step(inT16 index) const
inT16 y() const
access_function
void UpdateRange(const T1 &x, T2 *lower_bound, T2 *upper_bound)
| void find_cblob_limits |
( |
C_BLOB * |
blob, |
|
|
float |
leftx, |
|
|
float |
rightx, |
|
|
FCOORD |
rotation, |
|
|
float & |
ymin, |
|
|
float & |
ymax |
|
) |
| |
Definition at line 448 of file blobbox.cpp.
460 C_OUTLINE_IT out_it = blob->
out_list ();
464 for (out_it.mark_cycle_pt (); !out_it.cycled_list (); out_it.forward ()) {
465 outline = out_it.data ();
468 for (stepindex = 0; stepindex < outline->
pathlength (); stepindex++) {
470 if (pos.
x () >= leftx && pos.
x () <= rightx) {
473 vec = outline->
step (stepindex);
void rotate(const FCOORD &vec)
inT16 x() const
access function
const ICOORD & start_pos() const
C_OUTLINE_LIST * out_list()
ICOORD step(inT16 index) const
inT16 y() const
access_function
void UpdateRange(const T1 &x, T2 *lower_bound, T2 *upper_bound)
| void find_cblob_vlimits |
( |
C_BLOB * |
blob, |
|
|
float |
leftx, |
|
|
float |
rightx, |
|
|
float & |
ymin, |
|
|
float & |
ymax |
|
) |
| |
Definition at line 488 of file blobbox.cpp.
499 C_OUTLINE_IT out_it = blob->
out_list ();
503 for (out_it.mark_cycle_pt (); !out_it.cycled_list (); out_it.forward ()) {
504 outline = out_it.data ();
506 for (stepindex = 0; stepindex < outline->
pathlength (); stepindex++) {
508 if (pos.
x () >= leftx && pos.
x () <= rightx) {
511 vec = outline->
step (stepindex);
inT16 x() const
access function
const ICOORD & start_pos() const
C_OUTLINE_LIST * out_list()
ICOORD step(inT16 index) const
inT16 y() const
access_function
void UpdateRange(const T1 &x, T2 *lower_bound, T2 *upper_bound)
Definition at line 1014 of file blobbox.cpp.
1018 BLOBNBOX_IT it = list;
1019 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
1020 it.data()->plot(win, body_colour, child_colour);
| void vertical_cblob_projection |
( |
C_BLOB * |
blob, |
|
|
STATS * |
stats |
|
) |
| |
Definition at line 808 of file blobbox.cpp.
813 C_OUTLINE_IT out_it = blob->
out_list ();
815 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 828 of file blobbox.cpp.
836 C_OUTLINE_IT out_it = outline->
child ();
840 for (stepindex = 0; stepindex < length; stepindex++) {
841 step = outline->
step (stepindex);
843 stats->
add (pos.
x (), -pos.
y ());
844 }
else if (step.
x () < 0) {
845 stats->
add (pos.
x () - 1, pos.
y ());
850 for (out_it.mark_cycle_pt (); !out_it.cycled_list (); out_it.forward ()) {
void vertical_coutline_projection(C_OUTLINE *outline, STATS *stats)
inT16 x() const
access function
const ICOORD & start_pos() const
ICOORD step(inT16 index) const
void add(inT32 value, inT32 count)
inT16 y() const
access_function
| const double kComplexShapePerimeterRatio = 1.5 |
| const double kDefiniteAspectRatio = 2.0 |
| const double kMaxMediumSizeRatio = 4.0 |
| const double kMinMediumSizeRatio = 0.25 |