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