Settings for Omr. 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.
Tags: Vision, Advanced
from nutrient_sdk import OmrSettingsConstruction
OmrSettings is accessed through a Document instance for per-document overrides, or via SdkSettings for SDK-wide defaults.
# Per-document overridewith Document.open("input.pdf") as doc: settings = doc.settings.omr_settings settings.some_field = new_value # mutate fields directly
# SDK-wide default (applies to all documents)SdkSettings.omr_settings.some_field = new_valueSettings are configured by writing to fields on the returned object. The settings property itself cannot be reassigned — doc.settings.omr_settings = other_settings is rejected.
Properties
adaptive_character_level
@propertydef adaptive_character_level(self) -> float
@adaptive_character_level.setterdef adaptive_character_level(self, value: float) -> NoneFraction of the paper level below which ink is as dark as the printed character.
Type: float
Default: 0.55f
adaptive_character_visible_coverage
@propertydef adaptive_character_visible_coverage(self) -> float
@adaptive_character_visible_coverage.setterdef adaptive_character_visible_coverage(self, value: float) -> NonePortion of the bubble holding character-dark ink above which the printed character counts as still visible — the signature of an erased mark rather than a deliberate one.
Type: float
Default: 0.10f
adaptive_deep_shade_level
@propertydef adaptive_deep_shade_level(self) -> float
@adaptive_deep_shade_level.setterdef adaptive_deep_shade_level(self, value: float) -> NoneFraction of the paper level below which ink counts as deliberate shading.
Type: float
Default: 0.70f
adaptive_disc_radius
@propertydef adaptive_disc_radius(self) -> float
@adaptive_disc_radius.setterdef adaptive_disc_radius(self, value: float) -> NoneRadius of the analyzed bubble interior, as a fraction of the field size, chosen to sit inside the printed ring.
Type: float
Default: 0.36f
adaptive_field_paper_sanity
@propertydef adaptive_field_paper_sanity(self) -> float
@adaptive_field_paper_sanity.setterdef adaptive_field_paper_sanity(self, value: float) -> NoneA field whose own paper reads darker than this fraction of the page’s paper is overfilled past its margins; its paper estimate is untrustworthy, so the page’s is used instead.
Type: float
Default: 0.60f
adaptive_ink_margin
@propertydef adaptive_ink_margin(self) -> float
@adaptive_ink_margin.setterdef adaptive_ink_margin(self, value: float) -> NoneFraction below a field’s paper level at which ink starts counting as a mark.
Type: float
Default: 0.12f
adaptive_mark_deep_coverage
@propertydef adaptive_mark_deep_coverage(self) -> float
@adaptive_mark_deep_coverage.setterdef adaptive_mark_deep_coverage(self, value: float) -> NonePortion of the bubble that deliberate shading must cover for the field to be a mark.
Type: float
Default: 0.60f
adaptive_mark_shade_coverage
@propertydef adaptive_mark_shade_coverage(self) -> float
@adaptive_mark_shade_coverage.setterdef adaptive_mark_shade_coverage(self, value: float) -> NonePortion of the bubble that light shading must cover for the field to be a mark, provided the printed character is also covered.
Type: float
Default: 0.60f
adaptive_minimum_paper
@propertydef adaptive_minimum_paper(self) -> int
@adaptive_minimum_paper.setterdef adaptive_minimum_paper(self, value: int) -> NonePaper darker than this absolute level is not believed to be paper; the page-wide level is used for that field instead.
Type: int
Default: 100
adaptive_paper_percentile
@propertydef adaptive_paper_percentile(self) -> int
@adaptive_paper_percentile.setterdef adaptive_paper_percentile(self, value: int) -> NonePercentile of a field’s pixels taken to represent its paper level. A field is mostly paper even when marked, so a high percentile lands on the paper rather than on the mark.
Type: int
Default: 90
enable_adaptive_binarization
@propertydef enable_adaptive_binarization(self) -> bool
@enable_adaptive_binarization.setterdef enable_adaptive_binarization(self, value: bool) -> NoneIndicates whether the black and white reduction threshold applied before mark detection is derived from the image, rather than using a fixed value. Mark detection operates on black and white data, so a color or grayscale image is reduced first. The fixed threshold treats anything lighter than itself as blank, which discards marks made with light ink — for example gray shading or a soft pencil — before detection runs. The resulting field is reported as empty rather than as a low-confidence mark. When enabled, each OMR field is instead measured against the paper level found within that same field, so ink appreciably darker than its surrounding paper is preserved however light it is. Because every field is judged on its own, this also holds up on tinted or aged stock and on pages that are lit unevenly, where no single threshold would suit the whole image. Enable this for forms whose marks are not reliably solid black. If the fields cannot be measured, the fixed threshold is used, so enabling this cannot give a worse result than leaving it off. Erased marks are recognized and reported as not filled: an erased bubble keeps light residue with the printed character showing through it, which differs measurably from a deliberate mark — shading a bubble either darkens it deeply or covers its character. Marks cancelled by other means, such as crossing out or blotting, are not distinguished from deliberate marks; resolving those requires knowing which fields belong to the same question, which this method does not. This setting has no effect when the supplied image is already black and white, because no reduction is performed in that case.
Type: bool
Default: false