THPDFScanPreprocessOptions
Controls geometric corrections, cleanup, detector acceptance, and finite image budgets
Unit
HPDFScanPreprocess
Behaviour
Start with HPDFDefaultScanPreprocessOptions; see the guide for field ranges, defaults, transformation order, and ownership
| Member | Default | Contract |
|---|---|---|
Orientation | sor0 | Explicit clockwise quadrant correction |
AutoOrientation | False | Require detector evidence and use the detected correction |
MinimumOrientationConfidence | 0.85 | Normalised detector evidence threshold, 0.5 through 1 |
DeskewDegrees | 0 | Explicit continuous deskew correction, -180 through 180 degrees |
AutoDeskew | True | Estimate a small deskew correction from dark-pixel row projections |
MaximumAutoDeskewDegrees | 10 | Search radius, 0 through 45 degrees |
DeskewStepDegrees | 0.25 | Search increment, 0.1 through 5 degrees |
MinimumDeskewConfidence | 0.2 | Accept the estimated deskew only at this evidence threshold, 0 through 1 |
NormalizeShadows | True | Normalise local grayscale background before geometry correction |
ShadowTileSize | 48 | Local background tile dimension, 8 through 256 pixels |
MedianDenoise | False | Apply a 3 by 3 median filter |
RemoveDarkBorder | True | Remove contiguous dark edge rows and columns |
ExplicitBorderPixels | 0 | Explicit whitening width, at most one quarter of the smaller source dimension |
MaximumAutoBorderPixels | 32 | Maximum automatic edge whitening width, additionally capped at one quarter of the corresponding source dimension |
DarkBorderDensity | 0.9 | Required edge density of pixels darker than 96, 0.5 through 1 |
OutputMode | somGrayscale | Grayscale output or Otsu-thresholded binary output |
UsePerspectiveQuad | False | Rectify the explicitly supplied finite convex quadrilateral |
PerspectiveQuad | Zeroed | Four source pixel points ordered top-left, top-right, bottom-right, bottom-left |
PerspectiveWidth / PerspectiveHeight | 0 | Explicit output dimensions when perspective correction is enabled |
MaxDimension | 32768 | Maximum source and corrected dimension, 2 through 32768 |
MaxInputPixels / MaxOutputPixels | 16777216 | Positive source and corrected pixel caps; array indices must also fit a signed integer |
MaxWorkingBytes | 512 MiB | Positive conservative allowance for simultaneously owned raster and processing buffers |
MaxWorkUnits | 500000000 | Positive work allowance for pixel scans, candidate search, and resampling |
MaxDeskewSamples | 20000 | Maximum sampled dark pixels, 30 through 200000 |