ImageEn, unit ievision

TIEVisionOCRPageSegmentationMode


Declaration

  TIEVisionOCRPageSegmentationMode = (
    ievOCROSD_Only               =  0,              // Orientation and script detection (OSD) only (NO OCR)
    ievOCRAuto_OSD               =  1,              // Automatic page segmentation with OSD
    ievOCRAuto_OnlySegmenting    =  2,              // Automatic page segmentation, but no OSD or OCR
    ievOCRAuto                   =  3,              // Fully automatic page segmentation, but no OSD (Default)
    ievOCRSingle_Column          =  4,              // Assume a single column of text of variable sizes
    ievOCRSingle_Block_Vert_Text =  5,              // Assume a single uniform block of vertically aligned text
    ievOCRSingle_Block           =  6,              // Assume a single uniform block of text
    ievOCRSingle_Line            =  7,              // Treat the image as a single text line
    ievOCRSingle_Word            =  8,              // Treat the image as a single word
    ievOCRCircle_Word            =  9,              // Treat the image as a single word in a circle
    ievOCRSingle_Char            = 10,              // Treat the image as a single character
    ievOCRSparseText             = 11,              // Find as much text as possible in no particular order
    ievOCRSparseText_OSD         = 12,              // Sparse text with OSD
    ievOCRRawLine                = 13               // Raw line. Treat the image as a single raw text line
  );

Description

Const Description OCR Auto-Orient Page Segmentation OSD
ievOCROSD_Only (0) Orientation and script detection (OSD) only (NO OCR)          
ievOCRAuto_OSD (1) Automatic page segmentation with OSD            
ievOCRAuto_OnlySegmenting (2) Automatic page segmentation, but no OSD or OCR            
ievOCRAuto (3) Fully automatic page segmentation, but no OSD (Default)            
ievOCRSingle_Column (4) Assume a single column of text of variable sizes            
ievOCRSingle_Block_Vert_Text (5) Assume a single uniform block of vertically aligned text            
ievOCRSingle_Block (6) Assume a single uniform block of text            
ievOCRSingle_Line (7) Treat the image as a single text line          
ievOCRSingle_Word (8) Treat the image as a single word          
ievOCRCircle_Word (9) Treat the image as a single word in a circle          
ievOCRSingle_Char (10) Treat the image as a single character          
ievOCRSparseText (11) Find as much text as possible in no particular order          
ievOCRSparseText_OSD (12) Sparse text with OSD          
ievOCRRawLine (13) Raw line. Treat the image as a single raw text line          

Auto-Orient: Supports documents even when oriented incorrectly (e.g. sideways). Also used for getOrientation
Page Segmentation: Supports documents even if they have multiple columns of text
OSD: Analyzes the document to determine how the page is oriented (0, 90, 270 or 180 deg.) and the confidence of the script (e.g. Latin, Han Chinese, Cyrillic, etc).

Note:
 All OSD options require the file "osd.traineddata" for all languages (located in the language path passed with createOCR). If "osd.traineddata" is not available then orientation detection is not possible (e.g. upside-down pages will process incorrectly).
 For Orientation detection ievOCRAuto_OSD should be used
 For Region detection ievOCRAuto_OnlySegmenting or ievOCRAuto should be used