/dports/graphics/tesseract/tesseract-5.0.0/include/tesseract/ |
H A D | publictypes.h | 188 inline bool PSM_OSD_ENABLED(int pageseg_mode) { in PSM_OSD_ENABLED() argument 189 return pageseg_mode <= PSM_AUTO_OSD || pageseg_mode == PSM_SPARSE_TEXT_OSD; in PSM_OSD_ENABLED() 192 return pageseg_mode <= PSM_AUTO || pageseg_mode == PSM_SPARSE_TEXT_OSD; in PSM_ORIENTATION_ENABLED() 194 inline bool PSM_COL_FIND_ENABLED(int pageseg_mode) { in PSM_COL_FIND_ENABLED() argument 195 return pageseg_mode >= PSM_AUTO_OSD && pageseg_mode <= PSM_AUTO; in PSM_COL_FIND_ENABLED() 197 inline bool PSM_SPARSE(int pageseg_mode) { in PSM_SPARSE() argument 198 return pageseg_mode == PSM_SPARSE_TEXT || pageseg_mode == PSM_SPARSE_TEXT_OSD; in PSM_SPARSE() 201 return pageseg_mode >= PSM_AUTO_OSD && pageseg_mode <= PSM_SINGLE_COLUMN; in PSM_BLOCK_FIND_ENABLED() 204 return pageseg_mode >= PSM_AUTO_OSD && pageseg_mode <= PSM_SINGLE_BLOCK; in PSM_LINE_FIND_ENABLED() 207 return (pageseg_mode >= PSM_AUTO_OSD && pageseg_mode <= PSM_SINGLE_LINE) || in PSM_WORD_FIND_ENABLED() [all …]
|
/dports/graphics/tesseract/tesseract-5.0.0/src/textord/ |
H A D | strokewidth.h | 67 void FindTextlineDirectionAndFixBrokenCJK(PageSegMode pageseg_mode, bool cjk_merge, 163 void FindTextlineFlowDirection(PageSegMode pageseg_mode, bool display_if_debugging); 191 void SmoothNeighbourTypes(PageSegMode pageseg_mode, bool desperate, BLOBNBOX *blob); 257 void PartitionRemainingBlobs(PageSegMode pageseg_mode, ColPartitionGrid *part_grid); 261 void MakePartitionsFromCellList(PageSegMode pageseg_mode, bool combine, 270 bool FindingVerticalOnly(PageSegMode pageseg_mode) const { in FindingVerticalOnly() argument 272 return pageseg_mode == PSM_SINGLE_BLOCK_VERT_TEXT; in FindingVerticalOnly() 274 return !PSM_ORIENTATION_ENABLED(pageseg_mode) && pageseg_mode != PSM_SINGLE_BLOCK_VERT_TEXT; in FindingVerticalOnly() 278 bool FindingHorizontalOnly(PageSegMode pageseg_mode) const { in FindingHorizontalOnly() argument 280 return !PSM_ORIENTATION_ENABLED(pageseg_mode) && pageseg_mode != PSM_SINGLE_BLOCK_VERT_TEXT; in FindingHorizontalOnly() [all …]
|
H A D | textord.cpp | 194 } else if (!PSM_SPARSE(pageseg_mode)) { in TextordPage() 201 if (pageseg_mode == PSM_SINGLE_BLOCK_VERT_TEXT) { in TextordPage() 224 if (PSM_LINE_FIND_ENABLED(pageseg_mode)) { in TextordPage() 226 } else if (!PSM_SPARSE(pageseg_mode)) { in TextordPage() 228 gradient = make_single_row(page_tr_, pageseg_mode != PSM_RAW_LINE, to_block, to_blocks); in TextordPage() 235 page_tr_, pageseg_mode != PSM_RAW_LINE, textord_heavy_nr, textord_show_final_rows, this); in TextordPage() 237 if (PSM_WORD_FIND_ENABLED(pageseg_mode)) { in TextordPage() 245 make_single_word(pageseg_mode == PSM_SINGLE_CHAR, to_block->get_rows(), in TextordPage() 249 cleanup_blocks(PSM_WORD_FIND_ENABLED(pageseg_mode), blocks); in TextordPage() 264 void Textord::CleanupSingleRowResult(PageSegMode pageseg_mode, PAGE_RES *page_res) { in CleanupSingleRowResult() argument [all …]
|
H A D | strokewidth.cpp | 167 FindTextlineFlowDirection(pageseg_mode, false); in FindTextlineDirectionAndFixBrokenCJK() 363 FindTextlineFlowDirection(pageseg_mode, false); in GradeBlobsIntoPartitions() 378 FindTextlineFlowDirection(pageseg_mode, true); in GradeBlobsIntoPartitions() 386 FindTextlineFlowDirection(pageseg_mode, true); in GradeBlobsIntoPartitions() 830 if (FindingVerticalOnly(pageseg_mode)) { in FindTextlineFlowDirection() 854 SmoothNeighbourTypes(pageseg_mode, true, bbox); in FindTextlineFlowDirection() 859 SmoothNeighbourTypes(pageseg_mode, true, bbox); in FindTextlineFlowDirection() 1279 if (!FindingHorizontalOnly(pageseg_mode)) { in FindInitialPartitions() 1282 if (!FindingVerticalOnly(pageseg_mode)) { in FindInitialPartitions() 1413 PageSegMode pageseg_mode = in FindVerticalTextChains() local [all …]
|
H A D | colfind.h | 110 void SetupAndFilterNoise(PageSegMode pageseg_mode, Image photo_mask_pix, TO_BLOCK *input_block); 159 int FindBlocks(PageSegMode pageseg_mode, Image scaled_color, int scaled_factor, TO_BLOCK *block,
|
H A D | textord.h | 90 void TextordPage(PageSegMode pageseg_mode, const FCOORD &reskew, int width, int height, 96 void CleanupSingleRowResult(PageSegMode pageseg_mode, PAGE_RES *page_res); 130 void MakeRows(PageSegMode pageseg_mode, const FCOORD &skew, int width, int height,
|
H A D | colfind.cpp | 151 void ColumnFinder::SetupAndFilterNoise(PageSegMode pageseg_mode, Image photo_mask_pix, in SetupAndFilterNoise() argument 172 stroke_width_->FindTextlineDirectionAndFixBrokenCJK(pageseg_mode, cjk_script_, input_block); in SetupAndFilterNoise() 286 int ColumnFinder::FindBlocks(PageSegMode pageseg_mode, Image scaled_color, int scaled_factor, in FindBlocks() argument 295 stroke_width_->GradeBlobsIntoPartitions(pageseg_mode, rerotate_, input_block, nontext_map_, in FindBlocks() 298 if (!PSM_SPARSE(pageseg_mode)) { in FindBlocks() 345 if (!PSM_SPARSE(pageseg_mode)) { in FindBlocks() 346 if (!PSM_COL_FIND_ENABLED(pageseg_mode)) { in FindBlocks() 407 if (!PSM_SPARSE(pageseg_mode)) { in FindBlocks() 458 if (PSM_SPARSE(pageseg_mode)) { in FindBlocks()
|
/dports/graphics/tesseract/tesseract-5.0.0/src/ccmain/ |
H A D | pagesegmain.cpp | 126 pageseg_mode = PSM_SINGLE_BLOCK; in SegmentPage() 137 if (PSM_OSD_ENABLED(pageseg_mode) || PSM_BLOCK_FIND_ENABLED(pageseg_mode) || in SegmentPage() 138 PSM_SPARSE(pageseg_mode)) { in SegmentPage() 140 AutoPageSeg(pageseg_mode, blocks, &to_blocks, in SegmentPage() 142 if (pageseg_mode == PSM_OSD_ONLY) { in SegmentPage() 150 if (pageseg_mode == PSM_CIRCLE_WORD) { in SegmentPage() 210 pageseg_mode, blocks, osd_tess, osr, &temp_blocks, &photomask_pix, in AutoPageSeg() 305 if (!PSM_COL_FIND_ENABLED(pageseg_mode)) { in SetupPageSegAndDetectOrientation() 335 finder->SetupAndFilterNoise(pageseg_mode, *photo_mask_pix, to_block); in SetupPageSegAndDetectOrientation() 355 if (PSM_OSD_ENABLED(pageseg_mode) && osd_tess != nullptr && osr != nullptr) { in SetupPageSegAndDetectOrientation() [all …]
|
H A D | tesseractclass.h | 331 int AutoPageSeg(PageSegMode pageseg_mode, BLOCK_LIST *blocks, TO_BLOCK_LIST *to_blocks, 333 ColumnFinder *SetupPageSegAndDetectOrientation(PageSegMode pageseg_mode, BLOCK_LIST *blocks,
|
H A D | control.cpp | 433 const auto pageseg_mode = static_cast<PageSegMode>(static_cast<int>(tessedit_pageseg_mode)); in recog_all_words() local 434 textord_.CleanupSingleRowResult(pageseg_mode, page_res); in recog_all_words()
|