20 #ifndef TESSERACT_TEXTORD_COLFIND_H_ 21 #define TESSERACT_TEXTORD_COLFIND_H_ 23 #include "colpartitiongrid.h" 24 #include "colpartitionset.h" 25 #include "debugpixa.h" 26 #include "imagefind.h" 29 #include "textlineprojection.h" 41 extern BOOL_VAR_H(textord_tabfind_find_tables,
false,
"run table detection");
43 class ColPartitionSet;
44 class ColPartitionSet_LIST;
45 class ColSegment_LIST;
46 class ColumnGroup_LIST;
49 class TempColumn_LIST;
50 class EquationDetectBase;
65 int resolution,
bool cjk_script,
double aligned_gap_fraction,
66 TabVector_LIST* vlines, TabVector_LIST* hlines,
67 int vertical_x,
int vertical_y);
126 TO_BLOCK* block, BLOBNBOX_CLIST* osd_blobs);
140 int recognition_rotation);
166 TO_BLOCK* block, Pix* photo_mask_pix, Pix* thresholds_pix,
167 Pix* grey_pix,
DebugPixa* pixa_debug, BLOCK_LIST* blocks,
168 BLOBNBOX_LIST* diacritic_blobs, TO_BLOCK_LIST* to_blocks);
203 int* start,
int* end);
212 const int* assigned_costs,
213 const bool* any_columns_possible,
215 int* best_start,
int* best_end);
220 const int* assigned_costs,
221 const bool* any_columns_possible,
223 int step,
int end,
int* start);
226 int** column_set_costs,
int* assigned_costs);
267 WorkingPartSet_LIST* work_set);
369 #endif // TESSERACT_TEXTORD_COLFIND_H_ ColPartitionGrid part_grid_
Definition: colfind.h:332
void InsertRemainingNoise(TO_BLOCK *block)
Definition: colfind.cpp:1154
Definition: colpartitiongrid.h:33
bool cjk_script_
Definition: colfind.h:303
void ReflectForRtl(TO_BLOCK *input_block, BLOBNBOX_LIST *bblobs)
Definition: colfind.cpp:1472
ColPartitionSet ** best_columns_
Definition: colfind.h:328
ColPartition_LIST noise_parts_
Definition: colfind.h:341
PartSetVector column_sets_
Definition: colfind.h:325
void SetupAndFilterNoise(PageSegMode pageseg_mode, Pix *photo_mask_pix, TO_BLOCK *input_block)
Definition: colfind.cpp:143
void GridSplitPartitions()
Definition: colfind.cpp:960
FCOORD reskew_
Definition: colfind.h:316
Definition: colpartitionset.h:40
Definition: equationdetectbase.h:32
int RangeModalColumnSet(int **column_set_costs, const int *assigned_costs, int start, int end)
Definition: colfind.cpp:797
void TransformToBlocks(BLOCK_LIST *blocks, TO_BLOCK_LIST *to_blocks)
Definition: colfind.cpp:1408
bool MakeColumns(bool single_column)
Definition: colfind.cpp:549
Pix * nontext_map_
Definition: colfind.h:347
ColumnFinder(int gridsize, const ICOORD &bleft, const ICOORD &tright, int resolution, bool cjk_script, double aligned_gap_fraction, TabVector_LIST *vlines, TabVector_LIST *hlines, int vertical_x, int vertical_y)
Definition: colfind.cpp:75
int mean_column_gap_
Definition: colfind.h:309
bool IsVerticallyAlignedText(double find_vertical_text_ratio, TO_BLOCK *block, BLOBNBOX_CLIST *osd_blobs)
Definition: colfind.cpp:180
void ComputeMeanColumnGap(bool any_multi_column)
Definition: colfind.cpp:916
Definition: baseapi.cpp:94
const TextlineProjection * projection() const
Definition: colfind.h:74
ColPartition_LIST good_parts_
Definition: colfind.h:336
void AssignColumnToRange(int column_set_id, int start, int end, int **column_set_costs, int *assigned_costs)
Definition: colfind.cpp:905
int min_gutter_width_
Definition: colfind.h:307
StrokeWidth * stroke_width_
Definition: colfind.h:330
Definition: strokewidth.h:57
BLOBNBOX_LIST image_bblobs_
Definition: colfind.h:343
Definition: ocrblock.h:30
FCOORD text_rotation_
Definition: colfind.h:322
const ICOORD & bleft() const
Definition: bbgrid.h:73
int gridsize() const
Definition: bbgrid.h:64
void set_cjk_script(bool is_cjk)
Definition: colfind.h:77
void SetEquationDetect(EquationDetectBase *detect)
Definition: colfind.cpp:503
void GridMergePartitions()
Definition: colfind.cpp:1052
Definition: debugpixa.h:10
BOOL_VAR_H(textord_tabfind_find_tables, false, "run table detection")
FCOORD rotation_
Definition: colfind.h:318
DENORM * denorm_
Definition: colfind.h:352
bool AssignColumns(const PartSetVector &part_sets)
Definition: colfind.cpp:660
FCOORD deskew_
Definition: colfind.h:314
FCOORD ComputeBlockAndClassifyRotation(BLOCK *block)
Definition: colfind.cpp:1585
void ImproveColumnCandidates(PartSetVector *src_sets, PartSetVector *column_sets)
Definition: colfind.cpp:612
TabVector_LIST horizontal_lines_
Definition: colfind.h:345
Definition: statistc.h:33
integer coordinate
Definition: points.h:32
void ExtendRangePastSmallGaps(int **column_set_costs, const int *assigned_costs, const bool *any_columns_possible, int column_set_id, int step, int end, int *start)
Definition: colfind.cpp:855
void ReleaseBlobsAndCleanupUnused(TO_BLOCK *block)
Definition: colfind.cpp:951
TextlineProjection projection_
Definition: colfind.h:349
Definition: normalis.h:50
void GridInsertHLinePartitions()
Definition: colfind.cpp:1259
void ShrinkRangeToLongestRun(int **column_set_costs, const int *assigned_costs, const bool *any_columns_possible, int column_set_id, int *best_start, int *best_end)
Definition: colfind.cpp:816
FCOORD rerotate_
Definition: colfind.h:320
const DENORM * denorm() const
Definition: colfind.h:71
virtual ~ColumnFinder()
Definition: colfind.cpp:98
void RotateAndReskewBlocks(bool input_is_rtl, TO_BLOCK_LIST *to_blocks)
Definition: colfind.cpp:1535
void DisplayColumnBounds(PartSetVector *sets)
Definition: colfind.cpp:534
Definition: textlineprojection.h:33
void SmoothPartnerRuns()
Definition: colfind.cpp:1338
double tabfind_aligned_gap_fraction_
Definition: colfind.h:312
static ScrollView * blocks_win_
Definition: colfind.h:364
int FindBlocks(PageSegMode pageseg_mode, Pix *scaled_color, int scaled_factor, TO_BLOCK *block, Pix *photo_mask_pix, Pix *thresholds_pix, Pix *grey_pix, DebugPixa *pixa_debug, BLOCK_LIST *blocks, BLOBNBOX_LIST *diacritic_blobs, TO_BLOCK_LIST *to_blocks)
Definition: colfind.cpp:286
void CorrectOrientation(TO_BLOCK *block, bool vertical_text_lines, int recognition_rotation)
Definition: colfind.cpp:198
void DisplayBlocks(BLOCK_LIST *blocks)
Definition: colfind.cpp:510
Definition: blobbox.h:705
const ICOORD & tright() const
Definition: bbgrid.h:76
void GridInsertVLinePartitions()
Definition: colfind.cpp:1287
ScrollView * input_blobs_win_
Definition: colfind.h:355
void GridRemoveUnderlinePartitions()
Definition: colfind.cpp:1221
void PrintColumnCandidates(const char *title)
Definition: colfind.cpp:640
void GetDeskewVectors(FCOORD *deskew, FCOORD *reskew)
Definition: colfind.cpp:497
Definition: colpartition.h:68
void EmptyTempPartList(ColPartition_CLIST *temp_list, WorkingPartSet_LIST *work_set)
Definition: colfind.cpp:1397
bool BiggestUnassignedRange(int set_count, const bool *any_columns_possible, int *start, int *end)
Definition: colfind.cpp:763
PageSegMode
Definition: publictypes.h:163
EquationDetectBase * equation_detect_
Definition: colfind.h:360
void AddToTempPartList(ColPartition *part, ColPartition_CLIST *temp_list)
Definition: colfind.cpp:1371
void SetPartitionTypes()
Definition: colfind.cpp:1326
ColPartition_LIST big_parts_
Definition: colfind.h:339