# System Overview

VideoDistanceMarking is a real-time multi-camera ski jumping distance measurement system. It captures video from three HDMI cameras pointed at the landing hill, detects jumpers automatically, records video clips, and provides precision distance measurement using calibrated grid lines.

## How It Works

The system runs as multiple cooperating processes that communicate through shared memory:

Step | Process | Description
--- | --- | ---
1 | Capture (x3) | Read 1080p60 video from USB HDMI devices, write YUV420 frames to shared memory
2 | Motion (x3) | Analyze frames: compute diffs, detect blobs, track movement, trigger recording
3 | VideoGen | Merge camera feeds, encode H.264 video, upload clips
4 | Viewer | Display frames with grid line overlay for distance measurement

## Camera Layout

Three cameras are positioned along the landing hill:

- Feed 0 — Top of hill camera (covers upper landing area near takeoff)
- Feed 1 — Middle camera (covers mid landing area, primary view)
- Feed 2 — Bottom of hill camera (covers lower landing area)

The video generator merges the top half of feed 1 with the bottom half of feed 0 or feed 2, creating a composite view of the landing.

## Distance Measurement

Calibrated grid lines are overlaid on the video at known meter positions on the hill. The system interpolates between lines to give sub-meter precision at the cursor position. See Grid Line Calibration for setup instructions.

## Shared Memory

All processes communicate through ~16 GB of Windows shared memory (named memory-mapped files). Each camera feed has a 520-frame circular buffer (~8.7 seconds at 60fps). This allows frame-by-frame review of recent jumps.

See Architecture for technical details.