Go to the documentation of this file.
19 #ifndef TESSERACT_CCMAIN_EQUATIONDETECT_H_
20 #define TESSERACT_CCMAIN_EQUATIONDETECT_H_
35 class ColPartitionGrid;
36 class ColPartitionSet;
41 const char* equ_language);
120 const float foreground_density_th,
148 const float math_density_low,
169 const int textPartsLineSpacing);
173 bool IsInline(
const bool search_bottom,
174 const int textPartsLineSpacing,
195 const TBOX& part_box)
const;
273 #endif // TESSERACT_CCMAIN_EQUATIONDETECT_H_
void SplitCPHor(ColPartition *part, GenericVector< ColPartition * > *parts_splitted)
void SetLangTesseract(Tesseract *lang_tesseract)
void SetResolution(const int resolution)
float ComputeForegroundDensity(const TBOX &tbox)
void GetOutputTiffName(const char *name, STRING *image_name) const
void ExpandSeedHorizontal(const bool search_left, ColPartition *seed, GenericVector< ColPartition * > *parts_to_merge)
void IdentifyInlinePartsHorizontal()
void ComputeCPsSuperBBox()
BlobSpecialTextType EstimateTypeForUnichar(const UNICHARSET &unicharset, const UNICHAR_ID id) const
void IdentifyInlinePartsVertical(const bool top_to_bottom, const int textPartsLineSpacing)
bool IsInline(const bool search_bottom, const int textPartsLineSpacing, ColPartition *part)
EquationDetect(const char *equ_datapath, const char *equ_language)
void PaintColParts(const STRING &outfile) const
void PrintSpecialBlobsDensity(const ColPartition *part) const
int LabelSpecialText(TO_BLOCK *to_block) override
void IdentifyInlineParts()
bool IsNearSmallNeighbor(const TBOX &seed_box, const TBOX &part_box) const
bool CheckForSeed2(const GenericVector< int > &indented_texts_left, const float foreground_density_th, ColPartition *part)
void SplitCPHorLite(ColPartition *part, GenericVector< TBOX > *splitted_boxes)
int CountAlignment(const GenericVector< int > &sorted_vec, const int val) const
void IdentifySpecialText()
ColPartitionGrid * part_grid_
bool CheckSeedBlobsCount(ColPartition *part)
bool IsNearMathNeighbor(const int y_gap, const ColPartition *neighbor) const
bool CheckSeedFgDensity(const float density_th, ColPartition *part)
void IdentifyBlobsToSkip(ColPartition *part)
bool ExpandSeed(ColPartition *seed)
int FindEquationParts(ColPartitionGrid *part_grid, ColPartitionSet **best_columns) override
void ProcessMathBlockSatelliteParts()
void InsertPartAfterAbsorb(ColPartition *part)
Tesseract * lang_tesseract_
void ExpandSeedVertical(const bool search_bottom, ColPartition *seed, GenericVector< ColPartition * > *parts_to_merge)
ColPartitionSet ** best_columns_
GenericVector< ColPartition * > cp_seeds_
ColPartition * SearchNNVertical(const bool search_bottom, const ColPartition *part)
int EstimateTextPartLineSpacing()
void MergePartsByLocation()
bool CheckSeedDensity(const float math_density_high, const float math_density_low, const ColPartition *part) const
bool IsMathBlockSatellite(ColPartition *part, GenericVector< ColPartition * > *math_blocks)
bool CheckSeedNeighborDensity(const ColPartition *part) const
void SearchByOverlap(ColPartition *seed, GenericVector< ColPartition * > *parts_overlap)
IndentType IsIndented(ColPartition *part)
void PaintSpecialTexts(const STRING &outfile) const
~EquationDetect() override