UML  Diagram A

UML  Diagram B

Variables

Vision

resolution (e.g., 1920×1080), fps (30–60), latencyMs (target <120), confidenceThr (0–1), calibMatrix (camera → world mapping).

Audio

sampleRate (44.1/48kHz), windowSize (e.g., 1024), bpm, onset (bool per frame), spectrum[] (FFT bins).

Interaction & Scene

activeScene (Idle/Attract/Engage), engagementScore (0–1 EMA), crowdSize (count), control inputs (button, slider 0–1).

Effects & Output

params{} (effect intensities 0–1), mappingProfile (projector/LED map JSON), vSync (on/off), gainDb (audio level), fixtureCount.

Data & Consent

consentStatus (Unknown/Granted/Refused), enteredAt / exitedAt, retentionDays.

Why it matters: these variables define responsiveness, safety (brightness/sound caps), and privacy behavior at runtime.

Functions

Sensing & Analysis

captureFrame(), captureAudio(); detectFaces(frame) → Face[], estimatePose(frame) → Pose, track(objs) → Tracks; analyze(buffer) → AudioFeatures, getBeat() → bool.

Privacy & Control

checkConsent(session) → bool, applyMask(frame, faces) → Frame (blur/pixelate); setScene(name), applyCue(cue).

Rendering & Routing

apply(features) → Frame (EffectEngine); loadAssets(assets[]), toDisplay(frame, surface), toLighting(cues[]), toAudio(bus).

Ops & Safety

heartbeat() → StatusReport, cutPower(), fadeToBlack(ms), close() (end session).

Math challenges

Camera → screen mapping (projective geometry): We compute homographies/calibMatrix so visuals align with real surfaces (keystone correction, multi-projector blends).

Face/pose detection thresholds (ROC trade-off): Tuning confidenceThr balances misses vs false hits; we target stable tracking without flicker.

Latency budgeting: End-to-end time = capture + CV + analysis + effects + render. We manage queue sizes and downscale frames to stay <120ms.

Feature → parameter mapping: Normalize, clamp, and ease CV/Audio values to avoid jitter.

Crowd estimation / engagement: Exponential moving averages smooth detections into engagementScore for scene changes.

Customer / User modeling

Visitor (primary)

Motivation: surprise, play, a sense of being “seen” by the system. Needs: clear affordances, low friction, privacy awareness. Accessibility: brightness/sound limits, high-contrast mode, physical controls.

Facilitator/Technician (secondary)

Motivation: reliability, quick recovery, simple presets. Needs: start/stop, calibration, emergency kill, live meters.

Admin/Curator (secondary/remote)

Motivation: schedule content, update assets/models, view health. Needs: asset uploads, model versioning, telemetry.

Consent flow (all users)

Defaults to anonymized visuals; optional QR/kiosk for explicit consent. Retention policy shown on entry signage.

Relationships between units  (how pieces fit — summary)

Sensors → Processing: Cameras → ComputerVisionModule; Microphones → AudioAnalysis; Control devices → SceneManager.

Privacy guards Vision: Consent/PrivacyController masks faces or enables full features.

Processing → Effects: CV features + audio features + scene state feed EffectEngine.

Effects → Outputs: OutputRouter sends frames to displays, cues to lighting, audio to speakers.

Ops layer: AdminUI controls scenes/effects/outputs; HealthCheck monitors; EmergencyKillSwitch overrides all.

Data layer: VisitorSession ties events and ConsentRecord; Telemetry logs performance and interactions.