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