This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /api/csharp/settings/vision/advanced/deskew-settings.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. DeskewSettings

Settings for Deskew. Values fall back through three levels: document → SDK → built-in default. Writes target the document only when set on a document’s settings, otherwise the SDK globally when set on SdkSettings.

using Nutrient;

The SDK creates this class through factory methods or other SDK objects.

Properties

EnableDeskew

public bool EnableDeskew { get; set; }

Indicates whether automatic deskewing is enabled. Honored by the recognition pipelines. An explicit page-level deskew call always runs, since requesting it is already the decision this setting would gate.

Type: bool

EnableOrientationCorrection

public bool EnableOrientationCorrection { get; set; }

Indicates whether model-based cardinal orientation correction is enabled before fine deskewing. This is independent from VisionSettings.EnableOcr. Honored by the recognition pipelines only — orientation correction is model-based and does not run on an explicit page-level deskew.

Type: bool

ForceOrientationCorrection

public bool ForceOrientationCorrection { get; set; }

Forces cardinal orientation correction to run even on born-digital pages, which are otherwise skipped because a rendered text layer implies the page is already upright. Enable this when the source may still be rotated (for example a PDF with a rotated page box) and orientation correction must run regardless. Honored by the recognition pipelines only.

Type: bool

InverseDeskew

public bool InverseDeskew { get; set; }

Indicates whether the inverse deskew transform is enabled. When disabled, bounding boxes remain in deskewed-image coordinates. Applies to the recognition pipelines only. A page-level deskew rotates the page content itself, so there are no detected coordinates to map back.

Type: bool

OptimisticSkewDetection

public bool OptimisticSkewDetection { get; set; }

Indicates whether skew detection runs in optimistic mode. Optimistic mode relaxes the confidence heuristics that suppress a detected angle, so a skew is reported in cases a conservative pass would discard. Enable it when the source is known to be skewed; on clean pages it increases the chance of correcting a page that wasn’t actually skewed. Honored everywhere skew is detected.

Type: bool

OrientationCorrectionConfidenceThreshold

public float OrientationCorrectionConfidenceThreshold { get; set; }

Minimum model confidence required before applying cardinal orientation correction. Predictions below this threshold are recorded but not applied. Honored by the recognition pipelines only.

Type: float

SkewBinarizationMethod

public string SkewBinarizationMethod { get; set; }

Binarization method for skew detection. Supported values: “default” (internal Modified Otsu), “sauvola” (better for poor contrast), “otsu” (explicit Modified Otsu). Honored everywhere skew is detected. Only “sauvola” changes behavior — “default” and “otsu” both let the detector threshold with Modified Otsu itself.

Type: string

SkewTolerance

public float SkewTolerance { get; set; }

Maximum skew angle tolerance in degrees. Skew larger than this is not corrected. Honored everywhere skew is detected.

Type: float

Resource management

public void Dispose()

DeskewSettings implements IDisposable. Call Dispose() or use a C# using declaration to release its native handle right away. If you don’t, the handle is released when the object is garbage collected.