20 #ifndef TESSERACT_TEXTORD_STROKEWIDTH_H_ 21 #define TESSERACT_TEXTORD_STROKEWIDTH_H_ 25 #include "colpartitiongrid.h" 26 #include "textlineprojection.h" 34 class ColPartition_LIST;
36 class TextlineProjection;
93 BLOBNBOX_CLIST* osd_blobs);
124 Pix* nontext_pix,
const DENORM* denorm,
126 BLOBNBOX_LIST* diacritic_blobs,
128 ColPartition_LIST* big_parts);
148 ColPartition_LIST* leader_parts);
166 int max_size,
int max_dist,
167 TBOX* bbox, BLOBNBOX_CLIST* blobs);
177 bool display_if_debugging);
227 bool find_problems,
TO_BLOCK* block,
228 BLOBNBOX_LIST* diacritic_blobs,
230 ColPartition_LIST* big_parts,
238 BLOBNBOX_LIST* diacritic_blobs);
266 const TBOX& base_box);
274 ColPartition_LIST* big_parts);
284 BLOBNBOX_CLIST* cell_list);
355 #endif // TESSERACT_TEXTORD_STROKEWIDTH_H_ Definition: colpartitiongrid.h:33
bool ConfirmEasyMerge(const ColPartition *p1, const ColPartition *p2)
Definition: strokewidth.cpp:1889
void SmoothNeighbourTypes(PageSegMode pageseg_mode, bool desperate, BLOBNBOX *blob)
Definition: strokewidth.cpp:1202
TBOX grid_box_
Definition: strokewidth.h:340
void InsertBlobs(TO_BLOCK *block)
Definition: strokewidth.cpp:515
Definition: strokewidth.h:47
void MakePartitionsFromCellList(PageSegMode pageseg_mode, bool combine, ColPartitionGrid *part_grid, BLOBNBOX_CLIST *cell_list)
Definition: strokewidth.cpp:1818
bool TestVerticalTextDirection(double find_vertical_text_ratio, TO_BLOCK *block, BLOBNBOX_CLIST *osd_blobs)
Definition: strokewidth.cpp:209
bool PSM_ORIENTATION_ENABLED(int pageseg_mode)
Definition: publictypes.h:194
void AccumulateOverlaps(const BLOBNBOX *not_this, bool debug, int max_size, int max_dist, TBOX *bbox, BLOBNBOX_CLIST *blobs)
Definition: strokewidth.cpp:709
bool FindingVerticalOnly(PageSegMode pageseg_mode) const
Definition: strokewidth.h:293
float y() const
Definition: points.h:211
ScrollView * widths_win_
Definition: strokewidth.h:346
StrokeWidth(int gridsize, const ICOORD &bleft, const ICOORD &tright)
Definition: strokewidth.cpp:110
Definition: strokewidth.h:48
Definition: strokewidth.h:49
void RemoveLineResidue(ColPartition_LIST *big_part_list)
Definition: strokewidth.cpp:280
ScrollView * DisplayGoodBlobs(const char *window_name, int x, int y)
Definition: strokewidth.cpp:1926
void RemoveLargeUnusedBlobs(TO_BLOCK *block, ColPartitionGrid *part_grid, ColPartition_LIST *big_parts)
Definition: strokewidth.cpp:1765
void MergeDiacritics(TO_BLOCK *block, ColPartitionGrid *part_grid)
Definition: strokewidth.cpp:1736
bool DetectAndRemoveNoise(int pre_overlap, const TBOX &grid_box, TO_BLOCK *block, ColPartitionGrid *part_grid, BLOBNBOX_LIST *diacritic_blobs)
Definition: strokewidth.cpp:1307
virtual void HandleClick(int x, int y)
Definition: strokewidth.cpp:401
Definition: baseapi.cpp:94
ScrollView * DisplayDiacritics(const char *window_name, int x, int y, TO_BLOCK *block)
Definition: strokewidth.cpp:1978
TextlineProjection * projection_
Definition: strokewidth.h:336
ScrollView * initial_widths_win_
Definition: strokewidth.h:345
void SetNeighbours(bool leaders, bool activate_line_trap, BLOBNBOX *blob)
Definition: strokewidth.cpp:856
void CompletePartition(PageSegMode pageseg_mode, ColPartition *part, ColPartitionGrid *part_grid)
Definition: strokewidth.cpp:1847
Definition: strokewidth.h:40
void FindHorizontalTextChains(ColPartitionGrid *part_grid)
Definition: strokewidth.cpp:1415
ScrollView * leaders_win_
Definition: strokewidth.h:344
LeftOrRight
Definition: strokewidth.h:39
Pix * nontext_map_
Definition: strokewidth.h:334
void TestDiacritics(ColPartitionGrid *part_grid, TO_BLOCK *block)
Definition: strokewidth.cpp:1450
Definition: strokewidth.h:57
Definition: blobbox.h:144
const ICOORD & bleft() const
Definition: bbgrid.h:73
int gridsize() const
Definition: bbgrid.h:64
void GradeBlobsIntoPartitions(PageSegMode pageseg_mode, const FCOORD &rerotation, TO_BLOCK *block, Pix *nontext_pix, const DENORM *denorm, bool cjk_script, TextlineProjection *projection, BLOBNBOX_LIST *diacritic_blobs, ColPartitionGrid *part_grid, ColPartition_LIST *big_parts)
Definition: strokewidth.cpp:344
bool DiacriticBlob(BlobGrid *small_grid, BLOBNBOX *blob)
Definition: strokewidth.cpp:1527
bool NoNoiseInBetween(const TBOX &box1, const TBOX &box2) const
Definition: strokewidth.cpp:1918
int FindGoodNeighbour(BlobNeighbourDir dir, bool leaders, BLOBNBOX *blob)
Definition: strokewidth.cpp:878
ScrollView * diacritics_win_
Definition: strokewidth.h:348
const DENORM * denorm_
Definition: strokewidth.h:338
Definition: blobgrid.h:33
bool OrientationSearchBox(ColPartition *part, TBOX *box)
Definition: strokewidth.cpp:1877
bool DiacriticXGapFilled(BlobGrid *grid, const TBOX &diacritic_box, const TBOX &base_box)
Definition: strokewidth.cpp:1697
void SetNeighboursOnMediumBlobs(TO_BLOCK *block)
Definition: strokewidth.cpp:143
void FindLeadersAndMarkNoise(TO_BLOCK *block, ColPartition_LIST *leader_parts)
Definition: strokewidth.cpp:446
Definition: publictypes.h:170
void FindTextlineDirectionAndFixBrokenCJK(PageSegMode pageseg_mode, bool cjk_merge, TO_BLOCK *input_block)
Definition: strokewidth.cpp:157
virtual ~StrokeWidth()
Definition: strokewidth.cpp:123
integer coordinate
Definition: points.h:32
void CorrectForRotation(const FCOORD &rerotation, ColPartitionGrid *part_grid)
Definition: strokewidth.cpp:251
void SetNeighbourFlows(BLOBNBOX *blob)
Definition: strokewidth.cpp:1107
Definition: normalis.h:50
bool FindingHorizontalOnly(PageSegMode pageseg_mode) const
Definition: strokewidth.h:302
void MarkLeaderNeighbours(const ColPartition *part, LeftOrRight side)
Definition: strokewidth.cpp:523
void ComputeNoiseDensity(TO_BLOCK *block, TabFind *line_grid)
Definition: textlineprojection.h:33
void FindLeaderPartitions(TO_BLOCK *block, ColPartitionGrid *part_grid)
Definition: strokewidth.cpp:260
FCOORD rerotation_
Definition: strokewidth.h:342
ScrollView * smoothed_win_
Definition: strokewidth.h:350
Definition: blobbox.h:705
void EasyMerges(ColPartitionGrid *part_grid)
Definition: strokewidth.cpp:1868
const ICOORD & tright() const
Definition: bbgrid.h:76
ScrollView * chains_win_
Definition: strokewidth.h:347
PartitionFindResult
Definition: strokewidth.h:46
ScrollView * textlines_win_
Definition: strokewidth.h:349
void FindTextlineFlowDirection(PageSegMode pageseg_mode, bool display_if_debugging)
Definition: strokewidth.cpp:800
Definition: colpartition.h:68
void SimplifyObviousNeighbours(BLOBNBOX *blob)
Definition: strokewidth.cpp:1163
void PartitionRemainingBlobs(PageSegMode pageseg_mode, ColPartitionGrid *part_grid)
Definition: strokewidth.cpp:1782
Definition: strokewidth.h:41
void FindVerticalTextChains(ColPartitionGrid *part_grid)
Definition: strokewidth.cpp:1369
PartitionFindResult FindInitialPartitions(PageSegMode pageseg_mode, const FCOORD &rerotation, bool find_problems, TO_BLOCK *block, BLOBNBOX_LIST *diacritic_blobs, ColPartitionGrid *part_grid, ColPartition_LIST *big_parts, FCOORD *skew_angle)
Definition: strokewidth.cpp:1249
bool FixBrokenCJK(TO_BLOCK *block)
Definition: strokewidth.cpp:581
PageSegMode
Definition: publictypes.h:163