QualityAttributeThresholds class final

Thresholds of quality attributes.

You may adjust quality requirements for the output image. To perform this, you can use pre-defined instances of QualityAttributeThresholds using QualityAttributeThresholdPresets with recommended thresholds and pass it to DocumentAutoCaptureWidgetConfiguration. You can also create your own instance of QualityAttributeThresholds from scratch or based on pre-defined instances according to your needs.

Possible ways how to create QualityAttributeThresholds:

// The standard preset
QualityAttributeThresholds standard = QualityAttributeThresholdPresets.standard;

// Modified thresholds based on the standard preset
QualityAttributeThresholds modified = QualityAttributeThresholdPresets.standard.copy(
    minConfidence: minConfidence,
    minSharpness: null,
);

// Custom thresholds
QualityAttributeThresholds custom = QualityAttributeThresholds(
    minConfidence: minConfidence,
    minSharpness: minSharpness,
);

See all available presets and their thresholds in QualityAttributeThresholdPresets.

Annotations

Constructors

QualityAttributeThresholds({double? minConfidence, double? minSize, double? minSharpness, IntervalDouble? brightnessInterval, double? maxHotspotsScore})
Create an instance.

Properties

brightnessInterval IntervalDouble?
Valid brightness interval.
final
hashCode int
The hash code for this object.
no setteroverride
maxHotspotsScore double?
Maximum hotspots score.
final
minConfidence double?
Minimum detection confidence.
final
minSharpness double?
Minimum sharpness.
final
minSize double?
Minimum document size.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copy({double? minConfidence, double? minSize, double? minSharpness, IntervalDouble? brightnessInterval, double? maxHotspotsScore}) QualityAttributeThresholds
Creates a copy of this instance with the given fields replaced by the new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override