19#ifndef TESSERACT_TEXTORD_COLFIND_H_
20#define TESSERACT_TEXTORD_COLFIND_H_
41class ColPartitionSet_LIST;
43class ColumnGroup_LIST;
47class EquationDetectBase;
62 bool cjk_script,
double aligned_gap_fraction, TabVector_LIST *vlines,
63 TabVector_LIST *hlines,
int vertical_x,
int vertical_y);
120 bool IsVerticallyAlignedText(
double find_vertical_text_ratio,
TO_BLOCK *block,
121 BLOBNBOX_CLIST *osd_blobs);
134 void CorrectOrientation(
TO_BLOCK *block,
bool vertical_text_lines,
int recognition_rotation);
161 BLOCK_LIST *blocks, BLOBNBOX_LIST *diacritic_blobs, TO_BLOCK_LIST *to_blocks);
171 void DisplayBlocks(BLOCK_LIST *blocks);
180 bool MakeColumns(
bool single_column);
187 void PrintColumnCandidates(
const char *title);
194 bool BiggestUnassignedRange(
int set_count,
const bool *any_columns_possible,
int *start,
197 int RangeModalColumnSet(
int **column_set_costs,
const int *assigned_costs,
int start,
int end);
202 void ShrinkRangeToLongestRun(
int **column_set_costs,
const int *assigned_costs,
203 const bool *any_columns_possible,
int column_set_id,
int *best_start,
208 void ExtendRangePastSmallGaps(
int **column_set_costs,
const int *assigned_costs,
209 const bool *any_columns_possible,
int column_set_id,
int step,
210 int end,
int *start);
212 void AssignColumnToRange(
int column_set_id,
int start,
int end,
int **column_set_costs,
213 int *assigned_costs);
216 void ComputeMeanColumnGap(
bool any_multi_column);
224 void ReleaseBlobsAndCleanupUnused(
TO_BLOCK *block);
226 void GridSplitPartitions();
229 void GridMergePartitions();
232 void InsertRemainingNoise(
TO_BLOCK *block);
235 void GridRemoveUnderlinePartitions();
237 void GridInsertHLinePartitions();
239 void GridInsertVLinePartitions();
242 void SetPartitionTypes();
245 void SmoothPartnerRuns();
251 void AddToTempPartList(
ColPartition *part, ColPartition_CLIST *temp_list);
253 void EmptyTempPartList(ColPartition_CLIST *temp_list, WorkingPartSet_LIST *work_set);
256 void TransformToBlocks(BLOCK_LIST *blocks, TO_BLOCK_LIST *to_blocks);
264 void ReflectForRtl(
TO_BLOCK *input_block, BLOBNBOX_LIST *bblobs);
278 void RotateAndReskewBlocks(
bool input_is_rtl, TO_BLOCK_LIST *to_blocks);
285 FCOORD ComputeBlockAndClassifyRotation(
BLOCK *block);
293 int min_gutter_width_;
295 int mean_column_gap_;
298 double tabfind_aligned_gap_fraction_;
322 ColPartition_LIST good_parts_;
325 ColPartition_LIST big_parts_;
327 ColPartition_LIST noise_parts_;
329 BLOBNBOX_LIST image_bblobs_;
331 TabVector_LIST horizontal_lines_;
345#ifndef GRAPHICS_DISABLED
std::vector< ColPartitionSet * > PartSetVector
const TextlineProjection * projection() const
void set_cjk_script(bool is_cjk)
const DENORM * denorm() const