13 #ifndef TESSERACT_TEXTORD_DEVNAGARI_PROCESSING_H_ 14 #define TESSERACT_TEXTORD_DEVNAGARI_PROCESSING_H_ 16 #include "allheaders.h" 17 #include "debugpixa.h" 26 INT_VAR_H(devanagari_split_debuglevel, 0,
27 "Debug level for split shiro-rekha process.");
30 BOOL_VAR_H(devanagari_split_debugimage, 0,
31 "Whether to create a debug image for split shiro-rekha process.");
87 bool Split(
bool split_for_pageseg,
DebugPixa* pixa_debug);
95 void RefreshSegmentationWithNewBlobs(C_BLOB_LIST* new_blobs);
99 return pageseg_split_strategy_ != ocr_split_strategy_;
106 segmentation_block_list_ = block_list;
109 static const int kUnspecifiedXheight = -1;
112 global_xheight_ = xheight;
116 perform_close_ = perform;
123 return splitted_image_;
127 void set_orig_pix(Pix* pix);
136 return ocr_split_strategy_;
140 ocr_split_strategy_ = strategy;
144 return pageseg_split_strategy_;
148 pageseg_split_strategy_ = strategy;
152 return segmentation_block_list_;
158 static int GetModeHeight(Pix* pix);
163 static void PerformClose(Pix* pix,
int xheight_estimate);
168 int GetXheightForCC(Box* cc_bbox);
182 Boxa* regions_to_clear);
186 Box* GetBoxForTBOX(
const TBOX& tbox)
const;
190 static void GetShiroRekhaYExtents(Pix* word_pix,
192 int* shirorekha_bottom,
193 int* shirorekha_ylevel);
210 #endif // TESSERACT_TEXTORD_DEVNAGARI_PROCESSING_H_ Pix * splitted_image()
Definition: devanagari_processing.h:122
SplitStrategy ocr_split_strategy_
Definition: devanagari_processing.h:199
Definition: devanagari_processing.h:76
SplitStrategy
Definition: devanagari_processing.h:74
void set_segmentation_block_list(BLOCK_LIST *block_list)
Definition: devanagari_processing.h:105
~PixelHistogram()
Definition: devanagari_processing.h:44
int GetHistogramMaximum(int *count) const
Definition: devanagari_processing.cpp:455
void ConstructVerticalCountHist(Pix *pix)
Definition: devanagari_processing.cpp:469
Pix * debug_image_
Definition: devanagari_processing.h:200
Definition: baseapi.cpp:94
int * hist_
Definition: devanagari_processing.h:68
bool HasDifferentSplitStrategies() const
Definition: devanagari_processing.h:98
Definition: devanagari_processing.h:37
Pix * orig_pix()
Definition: devanagari_processing.h:131
void set_perform_close(bool perform)
Definition: devanagari_processing.h:115
BLOCK_LIST * segmentation_block_list()
Definition: devanagari_processing.h:151
PixelHistogram()
Definition: devanagari_processing.h:39
SplitStrategy ocr_split_strategy() const
Definition: devanagari_processing.h:135
Definition: debugpixa.h:10
int length_
Definition: devanagari_processing.h:69
bool perform_close_
Definition: devanagari_processing.h:204
Pix * orig_pix_
Definition: devanagari_processing.h:195
void Clear()
Definition: devanagari_processing.h:48
SplitStrategy pageseg_split_strategy() const
Definition: devanagari_processing.h:143
void set_ocr_split_strategy(SplitStrategy strategy)
Definition: devanagari_processing.h:139
void ConstructHorizontalCountHist(Pix *pix)
Definition: devanagari_processing.cpp:487
void set_pageseg_split_strategy(SplitStrategy strategy)
Definition: devanagari_processing.h:147
Pix * splitted_image_
Definition: devanagari_processing.h:196
BLOCK_LIST * segmentation_block_list_
Definition: devanagari_processing.h:202
Definition: devanagari_processing.h:72
int * hist() const
Definition: devanagari_processing.h:53
int global_xheight_
Definition: devanagari_processing.h:203
SplitStrategy pageseg_split_strategy_
Definition: devanagari_processing.h:198
void set_global_xheight(int xheight)
Definition: devanagari_processing.h:111
int length() const
Definition: devanagari_processing.h:55