ImageEn, unit IEVision

TIEVisionOCRPrepareFlags

TIEVisionOCRPrepareFlags

Declaration

  type TIEVisionOCRPrepareFlags = int32_t;
  const ievOCRPrepNormalizeBackground = 1;    // Flatten uneven lighting and shadows
  const ievOCRPrepDeskew              = 2;    // Measure and correct text skew (up to 7 degrees)
  const ievOCRPrepBinarizeSauvola     = 4;    // Local adaptive (Sauvola) binarization. Best for uneven lighting when ievOCRPrepNormalizeBackground is not used
  const ievOCRPrepBinarizeOtsu        = 8;    // Global Otsu binarization. Best after ievOCRPrepNormalizeBackground (ignored if ievOCRPrepBinarizeSauvola is set)
  const ievOCRPrepRemoveSpeckles      = 16;   // Remove tiny dark specks (binarized output only)
  const ievOCRPrepRemoveBorder        = 32;   // Remove dark areas touching the image edge, e.g. scanner borders (binarized output only)
  const ievOCRPrepAddMargin           = 64;   // Add a 10 pixel white margin
  const ievOCRPrepUpscale             = 128;  // Enlarge the image if the text is small
  const ievOCRPrepRemoveLines         = 256;  // Remove form and table lines and underlines (not included in ievOCRPrepDefault)
  const ievOCRPrepDefault             = ievOCRPrepNormalizeBackground or ievOCRPrepDeskew or ievOCRPrepBinarizeOtsu or ievOCRPrepRemoveSpeckles or ievOCRPrepAddMargin or ievOCRPrepUpscale;