#include <stepblob.h>
Definition at line 36 of file stepblob.h.
◆ C_BLOB() [1/3]
◆ C_BLOB() [2/3]
C_BLOB::C_BLOB |
( |
C_OUTLINE_LIST * |
outline_list | ) |
|
|
explicit |
Definition at line 158 of file stepblob.cpp.
164 for (C_OUTLINE_IT ol_it(outline_list); !ol_it.empty(); ol_it.forward()) {
◆ C_BLOB() [3/3]
◆ area()
Definition at line 266 of file stepblob.cpp.
275 C_OUTLINE_IT it = &outlines;
◆ bounding_box()
TBOX C_BLOB::bounding_box |
( |
| ) |
const |
Definition at line 247 of file stepblob.cpp.
256 C_OUTLINE_IT it = const_cast<C_OUTLINE_LIST*>(&outlines);
◆ CheckInverseFlagAndDirection()
void C_BLOB::CheckInverseFlagAndDirection |
( |
| ) |
|
Definition at line 219 of file stepblob.cpp.
225 C_OUTLINE_IT ol_it(&outlines);
226 for (ol_it.mark_cycle_pt(); !ol_it.cycled_list(); ol_it.forward()) {
230 reverse_outline_list(outline->
child());
◆ ComputeEdgeOffsets()
void C_BLOB::ComputeEdgeOffsets |
( |
int |
threshold, |
|
|
Pix * |
pix |
|
) |
| |
◆ ConstructBlobsFromOutlines()
void C_BLOB::ConstructBlobsFromOutlines |
( |
bool |
good_blob, |
|
|
C_OUTLINE_LIST * |
outline_list, |
|
|
C_BLOB_IT * |
good_blobs_it, |
|
|
C_BLOB_IT * |
bad_blobs_it |
|
) |
| |
|
static |
Definition at line 184 of file stepblob.cpp.
194 C_OUTLINE_LIST nested_outlines;
195 for (C_OUTLINE_IT ol_it(outline_list); !ol_it.empty(); ol_it.forward()) {
198 position_outline(outline, &nested_outlines);
201 for (C_OUTLINE_IT ol_it(&nested_outlines); !ol_it.empty(); ol_it.forward()) {
203 bool blob_is_good = good_blob;
207 blob_is_good =
false;
208 ol_it.add_list_after(outline->
child());
210 auto* blob =
new C_BLOB(outline);
212 blob->CheckInverseFlagAndDirection();
214 if (!blob_is_good && bad_blobs_it !=
nullptr)
◆ count_transitions()
int32_t C_BLOB::count_transitions |
( |
int32_t |
threshold | ) |
|
◆ deep_copy()
◆ EstimateBaselinePosition()
int16_t C_BLOB::EstimateBaselinePosition |
( |
| ) |
|
Definition at line 419 of file stepblob.cpp.
433 int left = box.
left();
434 int width = box.
width();
435 int bottom = box.
bottom();
441 C_OUTLINE_IT it(&outlines);
442 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
445 for (
int s = 0; s < outline->
pathlength(); ++s) {
446 if (pos.
y() < y_mins[pos.
x() - left])
447 y_mins[pos.
x() - left] = pos.
y();
448 pos += outline->
step(s);
452 int bottom_extent = 0;
453 for (
int x = 0; x <= width; ++x) {
454 if (y_mins[x] == bottom || y_mins[x] == bottom + 1)
458 int best_min = box.
top();
460 int prev_y = box.
top();
461 int prev_prev_y = box.
top();
462 for (
int x = 0; x < width; x += prev_run) {
464 int y_at_x = y_mins[x];
466 while (x + run <= width && y_mins[x + run] == y_at_x) ++run;
467 if (y_at_x > bottom + 1) {
471 while (x + total_run <= width &&
472 (y_mins[x + total_run] == y_at_x ||
473 y_mins[x + total_run] == y_at_x + 1)) ++total_run;
475 if (prev_prev_y > y_at_x + 1 || x + total_run > width ||
476 y_mins[x + total_run] > y_at_x + 1) {
◆ FakeBlob()
◆ move()
void C_BLOB::move |
( |
const ICOORD |
vec | ) |
|
◆ operator=()
Definition at line 111 of file stepblob.h.
113 if (!outlines.empty ())
◆ out_list()
C_OUTLINE_LIST* C_BLOB::out_list |
( |
| ) |
|
|
inline |
◆ outer_area()
int32_t C_BLOB::outer_area |
( |
| ) |
|
Definition at line 303 of file stepblob.cpp.
314 C_OUTLINE_IT it = &outlines;
◆ perimeter()
int32_t C_BLOB::perimeter |
( |
| ) |
|
Definition at line 284 of file stepblob.cpp.
294 C_OUTLINE_IT it = &outlines;
◆ plot()
◆ plot_normed()
◆ render()
Definition at line 501 of file stepblob.cpp.
505 C_OUTLINE_IT it(list);
506 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
◆ render_outline()
Pix * C_BLOB::render_outline |
( |
| ) |
|
◆ rotate()
void C_BLOB::rotate |
( |
const FCOORD & |
rotation | ) |
|
◆ SortByXMiddle()
static int C_BLOB::SortByXMiddle |
( |
const void * |
v1, |
|
|
const void * |
v2 |
|
) |
| |
|
inlinestatic |
Definition at line 124 of file stepblob.h.
126 const C_BLOB* blob1 = *static_cast<const C_BLOB* const*>(v1);
127 const C_BLOB* blob2 = *static_cast<const C_BLOB* const*>(v2);
The documentation for this class was generated from the following files: