20 #ifndef TESSERACT_TEXTORD_STROKEWIDTH_H_ 21 #define TESSERACT_TEXTORD_STROKEWIDTH_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);
147 void FindLeadersAndMarkNoise(
TO_BLOCK* block,
148 ColPartition_LIST* leader_parts);
165 void AccumulateOverlaps(
const BLOBNBOX* not_this,
bool debug,
166 int max_size,
int max_dist,
167 TBOX* bbox, BLOBNBOX_CLIST* blobs);
176 void FindTextlineFlowDirection(
PageSegMode pageseg_mode,
177 bool display_if_debugging);
184 void SetNeighbours(
bool leaders,
bool activate_line_trap,
BLOBNBOX* blob);
195 void SetNeighbourFlows(
BLOBNBOX* blob);
200 void SimplifyObviousNeighbours(
BLOBNBOX* blob);
205 void SmoothNeighbourTypes(
PageSegMode pageseg_mode,
bool desperate,
227 bool find_problems,
TO_BLOCK* block,
228 BLOBNBOX_LIST* diacritic_blobs,
230 ColPartition_LIST* big_parts,
236 bool DetectAndRemoveNoise(
int pre_overlap,
const TBOX& grid_box,
238 BLOBNBOX_LIST* diacritic_blobs);
265 bool DiacriticXGapFilled(
BlobGrid* grid,
const TBOX& diacritic_box,
266 const TBOX& base_box);
272 void RemoveLargeUnusedBlobs(
TO_BLOCK* block,
274 ColPartition_LIST* big_parts);
277 void PartitionRemainingBlobs(
PageSegMode pageseg_mode,
282 void MakePartitionsFromCellList(
PageSegMode pageseg_mode,
bool combine,
284 BLOBNBOX_CLIST* cell_list);
293 bool FindingVerticalOnly(
PageSegMode pageseg_mode)
const {
294 if (rerotation_.
y() == 0.0f) {
302 bool FindingHorizontalOnly(
PageSegMode pageseg_mode)
const {
303 if (rerotation_.
y() == 0.0f) {
322 bool NoNoiseInBetween(
const TBOX& box1,
const TBOX& box2)
const;
326 ScrollView* DisplayGoodBlobs(
const char* window_name,
int x,
int y);
329 ScrollView* DisplayDiacritics(
const char* window_name,
355 #endif // TESSERACT_TEXTORD_STROKEWIDTH_H_
void SetNeighboursOnMediumBlobs(TO_BLOCK *block)
const ICOORD & bleft() const
void RemoveLineResidue(ColPartition_LIST *big_part_list)
void FindLeaderPartitions(TO_BLOCK *block, ColPartitionGrid *part_grid)
bool PSM_ORIENTATION_ENABLED(int pageseg_mode)
virtual void HandleClick(int x, int y)
bool TestVerticalTextDirection(double find_vertical_text_ratio, TO_BLOCK *block, BLOBNBOX_CLIST *osd_blobs)
void FindTextlineDirectionAndFixBrokenCJK(PageSegMode pageseg_mode, bool cjk_merge, TO_BLOCK *input_block)
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)
void CorrectForRotation(const FCOORD &rerotation, ColPartitionGrid *part_grid)
StrokeWidth(int gridsize, const ICOORD &bleft, const ICOORD &tright)
const ICOORD & tright() const