Skip to content

Clarify dark_threshold semantics for IR users in config.ini#1108

Open
ds17f wants to merge 1 commit into
boltgolt:masterfrom
ds17f:docs/dark-threshold-clarification
Open

Clarify dark_threshold semantics for IR users in config.ini#1108
ds17f wants to merge 1 commit into
boltgolt:masterfrom
ds17f:docs/dark-threshold-clarification

Conversation

@ds17f
Copy link
Copy Markdown

@ds17f ds17f commented May 5, 2026

The dark_threshold config comment causes systemic confusion for IR-camera users. Five years of issues β€” #418, #725, #884, plus the enhancement request #727 β€” boil down to users reading

The lower this setting is, the more dark frames are ignored

as "lower is better for dark rooms," then ending up with an even stricter threshold than the default and login failing more often, not less.

The comment is technically correct (lower threshold = more frames marked as dark and skipped) but the natural-language ambiguity is hard to escape without first understanding the histogram-bucket math in compare.py.

What this PR changes

Documentation only. Rewrites the comment to:

  • Lead with what the value means β€” rejection threshold for the percentage of near-black pixels in a frame.
  • State direction explicitly β€” higher tolerates darker rooms, lower rejects more frames.
  • Note the IR-camera case β€” the default is calibrated for visible-light webcams; pure-IR cameras in dim rooms commonly read 80-95% near-black pixels (face is lit by the IR emitter, background stays unlit) and need this raised to 80-95.

The default value (60), the underlying computation, and runtime behavior are all unchanged.

Why this is worth merging

The previous comment ('the lower this setting is, the more dark frames
are ignored') was technically correct but caused systemic confusion
with IR-camera users β€” see boltgolt#418, boltgolt#725, and boltgolt#884 β€” who read 'lower
ignores more dark frames' as 'lower is better for dark rooms' and
ended up with a stricter threshold than the default.

Rewrite the comment to:

* Lead with what the value means (rejection threshold for percentage
  of near-black pixels in the frame).
* State direction explicitly (higher = tolerates darker rooms).
* Note the default is calibrated for visible-light webcams and that
  IR-only cameras typically need 80-95.

This is documentation only; default value, behavior, and computation
are unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant