Back to Index
Phase 02

Spatial Normalization

Broadcast cameras use extreme perspective angles. If a raider is standing exactly 1 meter from the midline on the left side of the screen, the pixel distance will be completely different than if they are standing 1 meter away on the right side. You cannot run geometric analysis on warped pixels.

BEV Transformation

The Homography Matrix

Raw video frames are fundamentally flawed for analytical reasoning due to perspective distortion, camera motion, and non-uniform scaling of distances.

By mapping the 8 court keypoints detected in Phase 1 against a mathematically perfect 2D reference court, K-RAID calculates a Homography Matrix. This mathematical transformation warps the 2D broadcast camera view into a perfect top-down Bird's Eye View (BEV). Now, distance calculates exactly to millimeters, allowing the agents to compute the precise physical pressure exerted by a defensive chain.

Coordinate Normalization

The per-player transformation procedure applies the homography matrix to every bounding box centre across all frames. After transformation, coordinates are normalized to fit within a standard court dimension (maintaining strict aspect ratios). This step is absolutely essential for ensuring compatibility with downstream AI agents, allowing them to compare spatial trajectories regardless of which stadium the match was played in.

Central State Backbone

The BEV JSON serves as the central input to all subsequent agents. The Retrieval Agent uses trajectories for similarity matching, the Analysis Agent evaluates defensive formations, the Simulation Agent generates alternate trajectories, and the Description Agent converts data into text.

Trajectory Construction

The finalized BEV data is serialized into a highly structured JSON format that captures frame-wise data, player identities, player roles, and normalized 2D coordinates.

Using the BEV coordinates, temporal trajectories are constructed for each player across time. Each trajectory is defined as a sequence of positions over frames, capturing both the spatial path and the velocity dynamics of each player. This provides the mathematical foundation for the STGCN networks used in Phase 04.

Figure 4.3: BEV Projection Flow