20 #ifndef TESSERACT_CCSTRUCT_PUBLICTYPES_H_ 21 #define TESSERACT_CCSTRUCT_PUBLICTYPES_H_ 33 constexpr
int kPointsPerInch = 72;
38 constexpr
int kMinCredibleResolution = 70;
40 constexpr
int kMaxCredibleResolution = 2400;
45 constexpr
int kResolutionEstimationFactor = 10;
73 inline bool PTIsLineType(PolyBlockType type) {
74 return type == PT_HORZ_LINE || type == PT_VERT_LINE;
77 inline bool PTIsImageType(PolyBlockType type) {
78 return type == PT_FLOWING_IMAGE || type == PT_HEADING_IMAGE ||
79 type == PT_PULLOUT_IMAGE;
82 inline bool PTIsTextType(PolyBlockType type) {
83 return type == PT_FLOWING_TEXT || type == PT_HEADING_TEXT ||
84 type == PT_PULLOUT_TEXT || type == PT_TABLE ||
85 type == PT_VERTICAL_TEXT || type == PT_CAPTION_TEXT ||
86 type == PT_INLINE_EQUATION;
89 inline bool PTIsPulloutType(PolyBlockType type) {
90 return type == PT_PULLOUT_IMAGE || type == PT_PULLOUT_TEXT;
94 extern const char* kPolyBlockNames[];
286 #endif // TESSERACT_CCSTRUCT_PUBLICTYPES_H_ Treat the image as a single text line.
Definition: publictypes.h:173
WritingDirection
Definition: publictypes.h:135
Definition: publictypes.h:138
Definition: publictypes.h:221
bool PSM_COL_FIND_ENABLED(int pageseg_mode)
Definition: publictypes.h:197
bool PSM_ORIENTATION_ENABLED(int pageseg_mode)
Definition: publictypes.h:194
Definition: publictypes.h:269
Treat the image as a single word.
Definition: publictypes.h:174
Fully automatic page segmentation, but no OSD.
Definition: publictypes.h:168
bool PSM_SPARSE(int pageseg_mode)
Definition: publictypes.h:200
Definition: publictypes.h:271
Find as much text as possible in no particular order.
Definition: publictypes.h:177
Definition: publictypes.h:123
Definition: publictypes.h:179
bool PSM_OSD_ENABLED(int pageseg_mode)
Definition: publictypes.h:191
Definition: publictypes.h:122
Definition: baseapi.cpp:94
Sparse text with orientation and script det.
Definition: publictypes.h:178
PageIteratorLevel
Definition: publictypes.h:219
Definition: publictypes.h:124
Definition: publictypes.h:223
Automatic page segmentation, but no OSD, or OCR.
Definition: publictypes.h:167
Definition: publictypes.h:153
Definition: publictypes.h:281
Definition: publictypes.h:136
Orientation and script detection only.
Definition: publictypes.h:164
Definition: publictypes.h:137
Treat the image as a single character.
Definition: publictypes.h:176
ParagraphJustification
Definition: publictypes.h:251
Definition: publictypes.h:220
Definition: publictypes.h:222
bool PSM_WORD_FIND_ENABLED(int pageseg_mode)
Definition: publictypes.h:209
Orientation
Definition: publictypes.h:120
Definition: publictypes.h:170
Definition: publictypes.h:255
Treat the image as a single word in a circle.
Definition: publictypes.h:175
Definition: publictypes.h:254
bool PSM_BLOCK_FIND_ENABLED(int pageseg_mode)
Definition: publictypes.h:203
Definition: publictypes.h:154
bool PSM_LINE_FIND_ENABLED(int pageseg_mode)
Definition: publictypes.h:206
TextlineOrder
Definition: publictypes.h:152
Definition: publictypes.h:252
Definition: publictypes.h:165
Assume a single column of text of variable sizes.
Definition: publictypes.h:169
Number of enum entries.
Definition: publictypes.h:182
Definition: publictypes.h:155
Definition: publictypes.h:253
Definition: publictypes.h:224
OcrEngineMode
Definition: publictypes.h:268
Assume a single uniform block of text. (Default.)
Definition: publictypes.h:172
Definition: publictypes.h:121
Definition: publictypes.h:274
PageSegMode
Definition: publictypes.h:163
Definition: publictypes.h:270