DetectionConfig class
Thresholds used to decide whether the card is ready to be captured.
Defaults were tuned for ID-1 cards on mid-range phones; adjust them with
showDebugInfo: true if your devices or documents behave differently.
Constructors
- DetectionConfig({double outerSearchBand = 0.14, double innerSearchBand = 0.28, double edgeTolerance = 0.10, double maxSkew = 0.08, double cornerSkip = 0.12, double minEdgeCoverage = 0.6, double minEdgeStrength = 40, int minDetectedSides = 3, double minBrightness = 55, int glareLuma = 248, double maxGlareRatio = 0.035, double minSharpness = 100, int requiredStableFrames = 4, double maxEdgeJitter = 0.03})
-
const
Properties
- cornerSkip → double
-
Fraction ignored at each end of a side (rounded card corners).
final
- edgeTolerance → double
-
Max distance from the guide line for an edge to count as aligned.
final
- glareLuma → int
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- innerSearchBand → double
-
How far inside the guide an edge is searched (used to say "move closer").
final
- maxEdgeJitter → double
-
Max per-side movement between frames while holding steady.
final
- maxGlareRatio → double
-
final
- maxSkew → double
-
Max tilt of a detected edge (offset difference between its halves).
final
- minBrightness → double
-
final
- minDetectedSides → int
-
Sides (of 4) that must be found; 3 tolerates a background similar to the card.
final
- minEdgeCoverage → double
-
final
- minEdgeStrength → double
-
final
- minSharpness → double
-
Variance of the Laplacian inside the card.
final
- outerSearchBand → double
-
How far outside the guide (fraction of guide size) an edge is searched.
final
- requiredStableFrames → int
-
Consecutive ready frames before auto-capture.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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.
inherited