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