19 #ifndef TESSERACT_TEXTORD_COLFIND_H_
20 #define TESSERACT_TEXTORD_COLFIND_H_
40 class ColPartitionSet;
41 class ColPartitionSet_LIST;
42 class ColSegment_LIST;
43 class ColumnGroup_LIST;
46 class TempColumn_LIST;
47 class EquationDetectBase;
62 int resolution,
bool cjk_script,
double aligned_gap_fraction,
63 TabVector_LIST* vlines, TabVector_LIST* hlines,
64 int vertical_x,
int vertical_y);
123 TO_BLOCK* block, BLOBNBOX_CLIST* osd_blobs);
137 int recognition_rotation);
163 TO_BLOCK* block, Pix* photo_mask_pix, Pix* thresholds_pix,
164 Pix* grey_pix,
DebugPixa* pixa_debug, BLOCK_LIST* blocks,
165 BLOBNBOX_LIST* diacritic_blobs, TO_BLOCK_LIST* to_blocks);
175 void DisplayBlocks(BLOCK_LIST* blocks);
184 bool MakeColumns(
bool single_column);
192 void PrintColumnCandidates(
const char* title);
199 bool BiggestUnassignedRange(
int set_count,
const bool* any_columns_possible,
200 int* start,
int* end);
202 int RangeModalColumnSet(
int** column_set_costs,
const int* assigned_costs,
208 void ShrinkRangeToLongestRun(
int** column_set_costs,
209 const int* assigned_costs,
210 const bool* any_columns_possible,
212 int* best_start,
int* best_end);
216 void ExtendRangePastSmallGaps(
int** column_set_costs,
217 const int* assigned_costs,
218 const bool* any_columns_possible,
220 int step,
int end,
int* start);
222 void AssignColumnToRange(
int column_set_id,
int start,
int end,
223 int** column_set_costs,
int* assigned_costs);
226 void ComputeMeanColumnGap(
bool any_multi_column);
234 void ReleaseBlobsAndCleanupUnused(
TO_BLOCK* block);
236 void GridSplitPartitions();
239 void GridMergePartitions();
242 void InsertRemainingNoise(
TO_BLOCK* block);
245 void GridRemoveUnderlinePartitions();
247 void GridInsertHLinePartitions();
249 void GridInsertVLinePartitions();
252 void SetPartitionTypes();
255 void SmoothPartnerRuns();
261 void AddToTempPartList(
ColPartition* part, ColPartition_CLIST* temp_list);
263 void EmptyTempPartList(ColPartition_CLIST* temp_list,
264 WorkingPartSet_LIST* work_set);
267 void TransformToBlocks(BLOCK_LIST* blocks, TO_BLOCK_LIST* to_blocks);
275 void ReflectForRtl(
TO_BLOCK* input_block, BLOBNBOX_LIST* bblobs);
289 void RotateAndReskewBlocks(
bool input_is_rtl, TO_BLOCK_LIST* to_blocks);
296 FCOORD ComputeBlockAndClassifyRotation(
BLOCK* block);
304 int min_gutter_width_;
306 int mean_column_gap_;
309 double tabfind_aligned_gap_fraction_;
333 ColPartition_LIST good_parts_;
336 ColPartition_LIST big_parts_;
338 ColPartition_LIST noise_parts_;
340 BLOBNBOX_LIST image_bblobs_;
342 TabVector_LIST horizontal_lines_;
366 #endif // TESSERACT_TEXTORD_COLFIND_H_