20 #ifndef TESSERACT_CCMAIN_EQUATIONDETECT_H_ 21 #define TESSERACT_CCMAIN_EQUATIONDETECT_H_ 24 #include "equationdetectbase.h" 25 #include "genericvector.h" 26 #include "tesseractclass.h" 36 class ColPartitionGrid;
37 class ColPartitionSet;
42 const char* equ_language);
79 const UNICHARSET& unicharset,
const UNICHAR_ID
id)
const;
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_ Tesseract equ_tesseract_
Definition: equationdetect.h:244
Definition: colpartitiongrid.h:33
int CountAlignment(const GenericVector< int > &sorted_vec, const int val) const
Definition: equationdetect.cpp:760
IndentType IsIndented(ColPartition *part)
Definition: equationdetect.cpp:1021
void MergePartsByLocation()
Definition: equationdetect.cpp:425
void ExpandSeedVertical(const bool search_bottom, ColPartition *seed, GenericVector< ColPartition *> *parts_to_merge)
Definition: equationdetect.cpp:1184
Definition: equationdetect.h:50
void PaintColParts(const STRING &outfile) const
Definition: equationdetect.cpp:1482
void PaintSpecialTexts(const STRING &outfile) const
Definition: equationdetect.cpp:1465
bool IsInline(const bool search_bottom, const int textPartsLineSpacing, ColPartition *part)
Definition: equationdetect.cpp:937
GenericVector< ColPartition * > cp_seeds_
Definition: equationdetect.h:263
Definition: colpartitionset.h:40
void InsertPartAfterAbsorb(ColPartition *part)
Definition: equationdetect.cpp:513
TBOX * cps_super_bbox_
Definition: equationdetect.h:260
Definition: equationdetectbase.h:32
IndentType
Definition: equationdetect.h:45
int page_count_
Definition: equationdetect.h:269
Definition: unicharset.h:146
void SplitCPHorLite(ColPartition *part, GenericVector< TBOX > *splitted_boxes)
Definition: equationdetect.cpp:698
bool IsNearSmallNeighbor(const TBOX &seed_box, const TBOX &part_box) const
Definition: equationdetect.cpp:1271
void GetOutputTiffName(const char *name, STRING *image_name) const
Definition: equationdetect.cpp:1457
float ComputeForegroundDensity(const TBOX &tbox)
Definition: equationdetect.cpp:612
Definition: equationdetect.h:47
Definition: baseapi.cpp:94
EquationDetect(const char *equ_datapath, const char *equ_language)
Definition: equationdetect.cpp:103
void IdentifyInlineParts()
Definition: equationdetect.cpp:784
ColPartitionGrid * part_grid_
Definition: equationdetect.h:252
Definition: equationdetect.h:39
Definition: equationdetect.h:48
void ExpandSeedHorizontal(const bool search_left, ColPartition *seed, GenericVector< ColPartition *> *parts_to_merge)
Definition: equationdetect.cpp:1128
void ProcessMathBlockSatelliteParts()
Definition: equationdetect.cpp:1310
void SetResolution(const int resolution)
Definition: equationdetect.cpp:128
int FindEquationParts(ColPartitionGrid *part_grid, ColPartitionSet **best_columns)
Definition: equationdetect.cpp:359
void IdentifyInlinePartsVertical(const bool top_to_bottom, const int textPartsLineSpacing)
Definition: equationdetect.cpp:908
bool CheckSeedDensity(const float math_density_high, const float math_density_low, const ColPartition *part) const
Definition: equationdetect.cpp:1002
void SetLangTesseract(Tesseract *lang_tesseract)
Definition: equationdetect.cpp:124
void IdentifySeedParts()
Definition: equationdetect.cpp:540
int resolution_
Definition: equationdetect.h:266
Definition: blobbox.h:144
ColPartitionSet ** best_columns_
Definition: equationdetect.h:257
bool IsMathBlockSatellite(ColPartition *part, GenericVector< ColPartition *> *math_blocks)
Definition: equationdetect.cpp:1359
bool CheckSeedFgDensity(const float density_th, ColPartition *part)
Definition: equationdetect.cpp:626
BlobSpecialTextType EstimateTypeForUnichar(const UNICHARSET &unicharset, const UNICHAR_ID id) const
Definition: equationdetect.cpp:225
int EstimateTextPartLineSpacing()
Definition: equationdetect.cpp:868
bool CheckSeedNeighborDensity(const ColPartition *part) const
Definition: equationdetect.cpp:1293
void SearchByOverlap(ColPartition *seed, GenericVector< ColPartition *> *parts_overlap)
Definition: equationdetect.cpp:464
Definition: equationdetect.h:46
void IdentifyInlinePartsHorizontal()
Definition: equationdetect.cpp:803
bool CheckForSeed2(const GenericVector< int > &indented_texts_left, const float foreground_density_th, ColPartition *part)
Definition: equationdetect.cpp:738
bool ExpandSeed(ColPartition *seed)
Definition: equationdetect.cpp:1085
void PrintSpecialBlobsDensity(const ColPartition *part) const
Definition: equationdetect.cpp:1505
void IdentifyBlobsToSkip(ColPartition *part)
Definition: equationdetect.cpp:311
bool IsNearMathNeighbor(const int y_gap, const ColPartition *neighbor) const
Definition: equationdetect.cpp:1448
Definition: tesseractclass.h:173
Definition: equationdetect.h:49
bool CheckSeedBlobsCount(ColPartition *part)
Definition: equationdetect.cpp:984
Definition: blobbox.h:705
int LabelSpecialText(TO_BLOCK *to_block)
Definition: equationdetect.cpp:132
void IdentifySpecialText()
Definition: equationdetect.cpp:259
ColPartition * SearchNNVertical(const bool search_bottom, const ColPartition *part)
Definition: equationdetect.cpp:1413
~EquationDetect()
Definition: equationdetect.cpp:122
Definition: colpartition.h:68
void ComputeCPsSuperBBox()
Definition: equationdetect.cpp:792
void SplitCPHor(ColPartition *part, GenericVector< ColPartition *> *parts_splitted)
Definition: equationdetect.cpp:648
Tesseract * lang_tesseract_
Definition: equationdetect.h:248