#include "mfcpch.h"
#include "blobbox.h"
#include "helpers.h"
Go to the source code of this file.
Functions |
| 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) |
Macro Definition Documentation
#define PROJECTION_MARGIN 10 |
Function Documentation
TBOX box_next |
( |
BLOBNBOX_IT * |
it | ) |
|
Definition at line 585 of file blobbox.cpp.
{
blob = it->data ();
do {
it->forward ();
blob = it->data ();
}
return result;
}
TBOX box_next_pre_chopped |
( |
BLOBNBOX_IT * |
it | ) |
|
Definition at line 614 of file blobbox.cpp.
{
blob = it->data ();
do {
it->forward ();
blob = it->data ();
}
return result;
}
Definition at line 560 of file blobbox.cpp.
{
C_OUTLINE_LIST out_list;
C_OUTLINE_IT out_it = &out_list;
for (in_it.mark_cycle_pt (); !in_it.cycled_list (); in_it.forward ()) {
out_it.add_after_then_move (
new C_OUTLINE (in_it.data (), rotation));
}
return new C_BLOB (&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.
{
C_OUTLINE_IT out_it = blob->
out_list ();
for (out_it.mark_cycle_pt (); !out_it.cycled_list (); out_it.forward ()) {
outline = out_it.data ();
for (stepindex = 0; stepindex < outline->
pathlength (); stepindex++) {
if (pos.
y () >= bottomy && pos.
y () <= topy) {
}
vec = outline->
step (stepindex);
pos += vec;
}
}
}
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.
{
C_OUTLINE_IT out_it = blob->
out_list ();
for (out_it.mark_cycle_pt (); !out_it.cycled_list (); out_it.forward ()) {
outline = out_it.data ();
for (stepindex = 0; stepindex < outline->
pathlength (); stepindex++) {
if (pos.
x () >= leftx && pos.
x () <= rightx) {
}
vec = outline->
step (stepindex);
pos += vec;
}
}
}
void find_cblob_vlimits |
( |
C_BLOB * |
blob, |
|
|
float |
leftx, |
|
|
float |
rightx, |
|
|
float & |
ymin, |
|
|
float & |
ymax |
|
) |
| |
Definition at line 488 of file blobbox.cpp.
{
C_OUTLINE_IT out_it = blob->
out_list ();
for (out_it.mark_cycle_pt (); !out_it.cycled_list (); out_it.forward ()) {
outline = out_it.data ();
for (stepindex = 0; stepindex < outline->
pathlength (); stepindex++) {
if (pos.
x () >= leftx && pos.
x () <= rightx) {
}
vec = outline->
step (stepindex);
pos += vec;
}
}
}
Definition at line 1014 of file blobbox.cpp.
{
BLOBNBOX_IT it = list;
for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
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.
{
C_OUTLINE_IT out_it = blob->
out_list ();
for (out_it.mark_cycle_pt (); !out_it.cycled_list (); out_it.forward ()) {
}
}
void vertical_coutline_projection |
( |
C_OUTLINE * |
outline, |
|
|
STATS * |
stats |
|
) |
| |
Definition at line 828 of file blobbox.cpp.
{
C_OUTLINE_IT out_it = outline->
child ();
for (stepindex = 0; stepindex < length; stepindex++) {
step = outline->
step (stepindex);
stats->
add (pos.
x (), -pos.
y ());
}
else if (step.
x () < 0) {
stats->
add (pos.
x () - 1, pos.
y ());
}
pos += step;
}
for (out_it.mark_cycle_pt (); !out_it.cycled_list (); out_it.forward ()) {
}
}
Variable Documentation
const double kComplexShapePerimeterRatio = 1.5 |
const double kDefiniteAspectRatio = 2.0 |
const double kMaxMediumSizeRatio = 4.0 |
const double kMinMediumSizeRatio = 0.25 |