4-seasons: protect night frames from grey filter with brightness floor
A stddev-only filter would wrongly drop near-black night frames. Now only skips a frame when BOTH stddev < GREY_MIN AND mean brightness > GREY_DARK_FLOOR (default 30/255). Night frames are dark so they always pass; bad-signal grey frames are mid-bright so they are caught. https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ
This commit is contained in:
+12
-4
@@ -257,13 +257,21 @@ AUDIO_BITRATE=192k # montage-mvt.sh — music track on movement
|
||||
|
||||
# ── Frame validation (4-seasons.sh) ──────────────────────────────────────────
|
||||
# Corrupt or empty frames (e.g. first frame after a camera reconnect) are always
|
||||
# skipped automatically via ffprobe.
|
||||
# skipped automatically via ffprobe. No config needed.
|
||||
#
|
||||
# SEASONS_GREY_STDDEV_MIN: also skip uniform-grey frames caused by a bad RTSP
|
||||
# signal. These are valid JPEGs but contain a near-solid grey image.
|
||||
# Value is the minimum pixel standard deviation on a 0–255 scale.
|
||||
# 0 = disabled (default). Try 5–10 if your camera produces grey frames on reconnect.
|
||||
# signal (valid JPEGs, but near-solid grey — no real image content).
|
||||
# A frame is only skipped when BOTH conditions hold:
|
||||
# 1. pixel standard deviation (0–255) is below SEASONS_GREY_STDDEV_MIN
|
||||
# 2. mean brightness (0–255) is above SEASONS_GREY_DARK_FLOOR
|
||||
# This keeps genuine night frames (dark + low stddev) while dropping
|
||||
# bad-signal grey frames (mid-bright + low stddev).
|
||||
#
|
||||
# SEASONS_GREY_STDDEV_MIN=0 disables the filter entirely (default).
|
||||
# Try 5–10 if your camera produces solid-grey frames on reconnect.
|
||||
# Requires ImageMagick (convert) to be installed.
|
||||
SEASONS_GREY_STDDEV_MIN=0
|
||||
SEASONS_GREY_DARK_FLOOR=30 # frames with mean brightness below this are always kept
|
||||
|
||||
# ── Montage attribution overlay ───────────────────────────────────────────────
|
||||
# A translucent bar across the top of each movement montage, naming the
|
||||
|
||||
Reference in New Issue
Block a user