Per-platform colour-border sensitivity (Teams violet, Meet glow)
Cross-platform research (Grant) flagged that the colour-border cue differs by app; checking the real brand colours against the detector found a concrete bug: the global 0.5 saturation threshold MISSES Teams' violet ring (#6264A7 ≈ 0.41, light variants ~0.27) entirely and Meet's lighter blue glow (#8ab4f8 ≈ 0.44). Those adapters would have detected nothing. - FrameSampler.saturatedPoints: add a tunable threshold + optional hue-band gate (degrees) so a lowered threshold doesn't pick up warm video. - GridCallAnalyzer.Config: colorSaturation / colorMinBrightness / colorHueRange, plumbed to the colour-border path (defaults preserve prior behaviour). - MeetAdapter sat→0.35 (catch the glow); TeamsAdapter sat→0.22 + hue 215–275° (catch the faint violet, reject other colours); ZoomAdapter sat 0.45 + hue 40–150° (vivid green/yellow). Values are first-pass pending real-fixture calibration; the hue gate is the main calibration lever. Tests: Teams now detects the faint violet ring and rejects a green one; Meet/Zoom vivid cases still pass. 27/27 XCTest.
This commit is contained in:
@@ -27,8 +27,11 @@ struct MeetAdapter: AppAdapter {
|
||||
init() {
|
||||
var config = GridCallAnalyzer.Config()
|
||||
config.nameAnchor = .bottomLeft
|
||||
config.detectColoredBorder = true // Google-blue speaking ring
|
||||
config.detectColoredBorder = true // Google-blue speaking ring/glow
|
||||
config.detectWhiteBorder = false
|
||||
// The bright ring (#1a73e8) is ~0.89 sat but the lighter glow (#8ab4f8) is
|
||||
// ~0.44, below the 0.5 default — lower the threshold so the glow registers.
|
||||
config.colorSaturation = 0.35
|
||||
config.tileExpandX = 3.0
|
||||
config.tileExpandY = 5.0
|
||||
self.analyzer = GridCallAnalyzer(config: config)
|
||||
|
||||
@@ -20,8 +20,14 @@ struct TeamsAdapter: AppAdapter {
|
||||
init() {
|
||||
var config = GridCallAnalyzer.Config()
|
||||
config.nameAnchor = .bottomLeft
|
||||
config.detectColoredBorder = true // Teams-violet speaking ring
|
||||
config.detectColoredBorder = true // Teams-violet speaking ring (faint)
|
||||
config.detectWhiteBorder = false
|
||||
// Teams' ring is muted: brand violet #6264A7 ≈ 0.41 sat, light variants
|
||||
// ~0.27 — well under the 0.5 default, so the default misses it entirely.
|
||||
// Drop the threshold and (since low sat invites warm-video false positives)
|
||||
// gate to the violet/indigo hue band. Both pending real-fixture calibration.
|
||||
config.colorSaturation = 0.22
|
||||
config.colorHueRange = 215...275
|
||||
config.tileExpandX = 3.0
|
||||
config.tileExpandY = 5.0
|
||||
self.analyzer = GridCallAnalyzer(config: config)
|
||||
|
||||
@@ -25,8 +25,13 @@ struct ZoomAdapter: AppAdapter {
|
||||
init() {
|
||||
var config = GridCallAnalyzer.Config()
|
||||
config.nameAnchor = .bottomLeft
|
||||
config.detectColoredBorder = true // green/yellow speaking border
|
||||
config.detectColoredBorder = true // green/yellow speaking border (vivid)
|
||||
config.detectWhiteBorder = false
|
||||
// Zoom's frame is vivid (green #2d8c3c ≈ 0.68, yellow ≈ 0.96); the green→
|
||||
// yellow hue band spans ~45–140°. Keep a generous-but-not-trivial threshold;
|
||||
// require all-four-sides distribution (handled upstream) to reject bright video.
|
||||
config.colorSaturation = 0.45
|
||||
config.colorHueRange = 40...150
|
||||
config.tileExpandX = 3.0
|
||||
config.tileExpandY = 5.0
|
||||
self.analyzer = GridCallAnalyzer(config: config)
|
||||
|
||||
Reference in New Issue
Block a user