tesseract
5.0.0-alpha-619-ge9db
|
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 ExpandSeedHorizontal(const bool search_left, ColPartition *seed, GenericVector< ColPartition * > *parts_to_merge)
int EstimateTextPartLineSpacing()
bool IsInline(const bool search_bottom, const int textPartsLineSpacing, ColPartition *part)
void GetOutputTiffName(const char *name, STRING *image_name) const
void IdentifyInlineParts()
bool CheckForSeed2(const GenericVector< int > &indented_texts_left, const float foreground_density_th, ColPartition *part)
bool IsNearMathNeighbor(const int y_gap, const ColPartition *neighbor) const
void IdentifyInlinePartsVertical(const bool top_to_bottom, const int textPartsLineSpacing)
void SetLangTesseract(Tesseract *lang_tesseract)
void ExpandSeedVertical(const bool search_bottom, ColPartition *seed, GenericVector< ColPartition * > *parts_to_merge)
void SplitCPHor(ColPartition *part, GenericVector< ColPartition * > *parts_splitted)
EquationDetect(const char *equ_datapath, const char *equ_language)
void IdentifyInlinePartsHorizontal()
BlobSpecialTextType EstimateTypeForUnichar(const UNICHARSET &unicharset, const UNICHAR_ID id) const
bool IsNearSmallNeighbor(const TBOX &seed_box, const TBOX &part_box) const
void SplitCPHorLite(ColPartition *part, GenericVector< TBOX > *splitted_boxes)
bool CheckSeedFgDensity(const float density_th, ColPartition *part)
bool ExpandSeed(ColPartition *seed)
void IdentifySpecialText()
int CountAlignment(const GenericVector< int > &sorted_vec, const int val) const
ColPartitionSet ** best_columns_
int FindEquationParts(ColPartitionGrid *part_grid, ColPartitionSet **best_columns) override
IndentType IsIndented(ColPartition *part)
void MergePartsByLocation()
void SearchByOverlap(ColPartition *seed, GenericVector< ColPartition * > *parts_overlap)
float ComputeForegroundDensity(const TBOX &tbox)
Tesseract * lang_tesseract_
bool CheckSeedBlobsCount(ColPartition *part)
void PaintColParts(const STRING &outfile) const
void PaintSpecialTexts(const STRING &outfile) const
void PrintSpecialBlobsDensity(const ColPartition *part) const
void ProcessMathBlockSatelliteParts()
void ComputeCPsSuperBBox()
int LabelSpecialText(TO_BLOCK *to_block) override
ColPartitionGrid * part_grid_
GenericVector< ColPartition * > cp_seeds_
ColPartition * SearchNNVertical(const bool search_bottom, const ColPartition *part)
void InsertPartAfterAbsorb(ColPartition *part)
~EquationDetect() override
void SetResolution(const int resolution)
bool IsMathBlockSatellite(ColPartition *part, GenericVector< ColPartition * > *math_blocks)
bool CheckSeedDensity(const float math_density_high, const float math_density_low, const ColPartition *part) const
bool CheckSeedNeighborDensity(const ColPartition *part) const
void IdentifyBlobsToSkip(ColPartition *part)