THPDFScanPreprocessOptions

Controls geometric corrections, cleanup, detector acceptance, and finite image budgets

Unit

HPDFScanPreprocess

Behavior

Start with HPDFDefaultScanPreprocessOptions; see the guide for field ranges, defaults, transformation order, and ownership

MemberDefaultContract
Orientationsor0Explicit clockwise quadrant correction
AutoOrientationFalseRequire detector evidence and use the detected correction
MinimumOrientationConfidence0.85Normalized detector evidence threshold, 0.5 through 1
DeskewDegrees0Explicit continuous deskew correction, -180 through 180 degrees
AutoDeskewTrueEstimate a small deskew correction from dark-pixel row projections
MaximumAutoDeskewDegrees10Search radius, 0 through 45 degrees
DeskewStepDegrees0.25Search increment, 0.1 through 5 degrees
MinimumDeskewConfidence0.2Accept the estimated deskew only at this evidence threshold, 0 through 1
NormalizeShadowsTrueNormalize local grayscale background before geometry correction
ShadowTileSize48Local background tile dimension, 8 through 256 pixels
MedianDenoiseFalseApply a 3 by 3 median filter
RemoveDarkBorderTrueRemove contiguous dark edge rows and columns
ExplicitBorderPixels0Explicit whitening width, at most one quarter of the smaller source dimension
MaximumAutoBorderPixels32Maximum automatic edge whitening width, additionally capped at one quarter of the corresponding source dimension
DarkBorderDensity0.9Required edge density of pixels darker than 96, 0.5 through 1
OutputModesomGrayscaleGrayscale output or Otsu-thresholded binary output
UsePerspectiveQuadFalseRectify the explicitly supplied finite convex quadrilateral
PerspectiveQuadZeroedFour source pixel points ordered top-left, top-right, bottom-right, bottom-left
PerspectiveWidth / PerspectiveHeight0Explicit output dimensions when perspective correction is enabled
MaxDimension32768Maximum source and corrected dimension, 2 through 32768
MaxInputPixels / MaxOutputPixels16777216Positive source and corrected pixel caps; array indices must also fit a signed integer
MaxWorkingBytes512 MiBPositive conservative allowance for simultaneously owned raster and processing buffers
MaxWorkUnits500000000Positive work allowance for pixel scans, candidate search, and resampling
MaxDeskewSamples20000Maximum sampled dark pixels, 30 through 200000

Related topics

Scan preprocessing and structured OCR