Capture quality gate¶
The marker capture flow evaluates image readiness before accepting a saved capture for analysis/reporting. The gate is a workflow safeguard only; it does not claim diagnostic image-quality accuracy.
Default thresholds¶
| Setting | Default | Failure / warning behavior |
|---|---|---|
minImageWidthPx |
800 |
Fail below this natural image width. |
minImageHeightPx |
600 |
Fail below this natural image height. |
minRequiredMarkerRatio |
0.8 |
Fail when fewer than 80% of required markers for the selected view are visible. |
warnRequiredMarkerRatio |
1 |
Warn when any required marker is still missing. |
minSharpnessScoreFail |
0.3 |
Fail when a capture source provides a lower normalized sharpness score. |
minSharpnessScoreWarn |
0.5 |
Warn when a capture source provides a lower normalized sharpness score. |
maxTiltDegreesFail |
7 |
Fail when a capture source provides a larger absolute tilt. |
maxTiltDegreesWarn |
3 |
Warn when a capture source provides a larger absolute tilt. |
minOverrideReasonChars |
12 |
Failed gates require at least this many characters in the override reason. |
The current UI always checks selected view, natural image dimensions, calibration-reference confirmation, and required marker coverage. Blur, tilt, and subject-in-frame checks are evaluated when a capture source supplies those metrics.
Configuration¶
Thresholds are defined in src/lib/capture-quality.ts and can be overridden at
build/runtime through NEXT_PUBLIC_* environment variables:
NEXT_PUBLIC_EPPA_QUALITY_MIN_WIDTH_PXNEXT_PUBLIC_EPPA_QUALITY_MIN_HEIGHT_PXNEXT_PUBLIC_EPPA_QUALITY_MIN_MARKER_RATIONEXT_PUBLIC_EPPA_QUALITY_WARN_MARKER_RATIONEXT_PUBLIC_EPPA_QUALITY_BLUR_FAIL_SCORENEXT_PUBLIC_EPPA_QUALITY_BLUR_WARN_SCORENEXT_PUBLIC_EPPA_QUALITY_TILT_FAIL_DEGREESNEXT_PUBLIC_EPPA_QUALITY_TILT_WARN_DEGREESNEXT_PUBLIC_EPPA_QUALITY_MIN_OVERRIDE_CHARS
Failed gates block marker save and the complete CSV report unless the operator records an explicit override reason. The saved session metadata includes the quality status, thresholds, missing markers, calibration-reference confirmation, and override state.