#include "ocrpara.h"
#include "ocrrow.h"
#include "pdblock.h"
Go to the source code of this file.
◆ ExtractBlobsFromSegmentation()
void ExtractBlobsFromSegmentation |
( |
BLOCK_LIST * |
blocks, |
|
|
C_BLOB_LIST * |
output_blob_list |
|
) |
| |
Definition at line 442 of file ocrblock.cpp.
444 C_BLOB_IT return_list_it(output_blob_list);
445 BLOCK_IT block_it(blocks);
446 for (block_it.mark_cycle_pt(); !block_it.cycled_list(); block_it.forward()) {
447 BLOCK* block = block_it.data();
449 for (row_it.mark_cycle_pt(); !row_it.cycled_list(); row_it.forward()) {
450 ROW* row = row_it.data();
453 for (werd_it.mark_cycle_pt(); !werd_it.cycled_list(); werd_it.forward()) {
454 WERD* werd = werd_it.data();
455 return_list_it.move_to_last();
456 return_list_it.add_list_after(werd->
cblob_list());
457 return_list_it.move_to_last();
ROW_LIST * row_list()
get rows
C_BLOB_LIST * rej_cblob_list()
C_BLOB_LIST * cblob_list()
◆ PrintSegmentationStats()
void PrintSegmentationStats |
( |
BLOCK_LIST * |
block_list | ) |
|
Definition at line 409 of file ocrblock.cpp.
414 BLOCK_IT block_it(block_list);
415 for (block_it.mark_cycle_pt(); !block_it.cycled_list(); block_it.forward()) {
416 BLOCK* block = block_it.data();
419 for (row_it.mark_cycle_pt(); !row_it.cycled_list(); row_it.forward()) {
421 ROW* row = row_it.data();
424 for (werd_it.mark_cycle_pt(); !werd_it.cycled_list(); werd_it.forward()) {
425 WERD* werd = werd_it.data();
431 tprintf(
"Block list stats:\nBlocks = %d\nRows = %d\nWords = %d\nBlobs = %d\n",
432 num_blocks, num_rows, num_words, num_blobs);
ROW_LIST * row_list()
get rows
DLLSYM void tprintf(const char *format,...)
C_BLOB_LIST * cblob_list()
◆ RefreshWordBlobsFromNewBlobs()
void RefreshWordBlobsFromNewBlobs |
( |
BLOCK_LIST * |
block_list, |
|
|
C_BLOB_LIST * |
new_blobs, |
|
|
C_BLOB_LIST * |
not_found_blobs |
|
) |
| |
Definition at line 477 of file ocrblock.cpp.
482 BLOCK_IT block_it(block_list);
483 for (block_it.mark_cycle_pt(); !block_it.cycled_list(); block_it.forward()) {
484 BLOCK* block = block_it.data();
489 for (row_it.mark_cycle_pt(); !row_it.cycled_list(); row_it.forward()) {
490 ROW* row = row_it.data();
494 WERD_IT new_words_it(&new_words);
495 for (werd_it.mark_cycle_pt(); !werd_it.cycled_list(); werd_it.forward()) {
496 WERD* werd = werd_it.extract();
502 new_words_it.add_after_then_move(new_werd);
508 new_words_it.add_after_then_move(werd);
513 werd_it.move_to_first();
514 werd_it.add_list_after(&new_words);
ROW_LIST * row_list()
get rows
POLY_BLOCK * poly_block() const
WERD * ConstructWerdWithNewBlobs(C_BLOB_LIST *all_blobs, C_BLOB_LIST *orphan_blobs)