#include "scrollview.h"
#include "params.h"
#include "ocrblock.h"
#include "coutln.h"
#include "crakedge.h"
#include <memory>
Go to the source code of this file.
◆ BUCKETSIZE
◆ capture_children()
bool capture_children |
( |
OL_BUCKETS * |
buckets, |
|
|
C_BLOB_IT * |
reject_it, |
|
|
C_OUTLINE_IT * |
blob_it |
|
) |
| |
Definition at line 435 of file edgblob.cpp.
443 outline = blob_it->data();
444 if (edges_use_new_outline_complexity)
446 edges_children_count_limit,
450 edges_children_count_limit);
451 if (child_count > edges_children_count_limit)
int32_t outline_complexity(C_OUTLINE *outline, int32_t max_count, int16_t depth)
void extract_children(C_OUTLINE *outline, C_OUTLINE_IT *it)
int32_t count_children(C_OUTLINE *outline, int32_t max_count)
◆ empty_buckets()
Definition at line 393 of file edgblob.cpp.
398 C_OUTLINE_LIST outlines;
400 C_OUTLINE_IT out_it = &outlines;
401 C_OUTLINE_IT bucket_it = buckets->
start_scan();
402 C_OUTLINE_IT parent_it;
403 C_BLOB_IT good_blobs = block->
blob_list();
406 while (!bucket_it.empty()) {
407 out_it.set_to_list(&outlines);
409 parent_it = bucket_it;
412 }
while (!bucket_it.at_first() &&
413 !(*parent_it.data() < *bucket_it.data()));
414 }
while (!bucket_it.at_first());
417 out_it.add_after_then_move(parent_it.extract());
422 bucket_it.set_to_list(buckets->
scan_next());
bool capture_children(OL_BUCKETS *buckets, C_BLOB_IT *reject_it, C_OUTLINE_IT *blob_it)
C_BLOB_LIST * reject_blobs()
C_BLOB_LIST * blob_list()
get blobs
static void ConstructBlobsFromOutlines(bool good_blob, C_OUTLINE_LIST *outline_list, C_BLOB_IT *good_blobs_it, C_BLOB_IT *bad_blobs_it)
C_OUTLINE_LIST * start_scan()
C_OUTLINE_LIST * scan_next()
◆ extract_edges()
void extract_edges |
( |
Pix * |
pix, |
|
|
BLOCK * |
block |
|
) |
| |
Definition at line 329 of file edgblob.cpp.
331 C_OUTLINE_LIST outlines;
332 C_OUTLINE_IT out_it = &outlines;
void outlines_to_blobs(BLOCK *block, ICOORD bleft, ICOORD tright, C_OUTLINE_LIST *outlines)
void block_edges(Pix *t_pix, PDBLK *block, C_OUTLINE_IT *outline_it)
PDBLK pdblk
Page Description Block.
void bounding_box(ICOORD &bottom_left, ICOORD &top_right) const
get box
◆ fill_buckets()
void fill_buckets |
( |
C_OUTLINE_LIST * |
outlines, |
|
|
OL_BUCKETS * |
buckets |
|
) |
| |
Definition at line 368 of file edgblob.cpp.
373 C_OUTLINE_IT out_it = outlines;
374 C_OUTLINE_IT bucket_it;
377 for (out_it.mark_cycle_pt(); !out_it.cycled_list(); out_it.forward()) {
378 outline = out_it.extract();
381 bucket_it.set_to_list((*buckets) (ol_box.
left(), ol_box.
bottom()));
382 bucket_it.add_to_end(outline);
const TBOX & bounding_box() const
◆ outlines_to_blobs()
void outlines_to_blobs |
( |
BLOCK * |
block, |
|
|
ICOORD |
bleft, |
|
|
ICOORD |
tright, |
|
|
C_OUTLINE_LIST * |
outlines |
|
) |
| |
Definition at line 349 of file edgblob.cpp.
void empty_buckets(BLOCK *block, OL_BUCKETS *buckets)
void fill_buckets(C_OUTLINE_LIST *outlines, OL_BUCKETS *buckets)