# Correcting Ski Resort Trajectories Extracted from Video
## 2 Perspective Correction
### Determination of Correction Coefficient  
Figures 2 and 3 present screenshots that have been extracted from the video footage. We use these screenshots to determine approximate scaling factors for the \(x\)- and \(y\)-coordinates that account for perspective and distortion effects. Assuming that the width of the slope is almost constant, a scaling factor for the \(x\)-coordinate can be determined. Based on the apparent size of the same person at different positions on the slope, a correction factor for the \(y\)-coordinates is derived. Figure 1: Geometry scheme: The camera is positioned at the front of the slope, allowing for comprehensive monitoring of all skiers on the slope. Figure 2: Screenshot of the PeTrack working platform. The red lines represent the grid system of the PeTrack platform, corresponding to the coordinates \((x^{\prime},y^{\prime})\). The yellow lines at the top and bottom indicate the width of the slope. The pixels of the top and bottom lines are noted, and \(d_{2}\) and \(d_{y}\) represent the distance in pixels. To determine the correction in \(x\)-direction we perform the following steps:  
1. **Selection of reference lines**: Reference lines were selected based on two key criteria: (1) visual uniformity of the slope width in the video frames and (2) their position in areas where skier movement trajectories were well-defined and less affected by out-of-frame distortions. The lines were drawn at positions where the slope appeared to have minimal curvature and variability, ensuring reliable scaling. For example, in Figure 2, the top and bottom lines were chosen where the slope width appeared consistent and measurable. 2. **Scaling factor determination**: The scaling factor for the \(x\)-coordinate \(s_{x}\) was calculated as the ratio of the pixel widths between the top and bottom reference lines, minimizing perspective distortions. For the \(y\)-coordinate, the vertical scaling coefficient \(s_{y}\) was derived by comparing the pixel heights of the same skier at different vertical positions (Figure 3). These steps ensure the coefficients reflect both horizontal and vertical variations caused by perspective distortions. 3. **Deriving the correction factor**: Using this scaling factor, we derive the correction factor as \(f_{x}(d_{y})=\frac{s_{x}-d_{y}}{d_{2}}\), where \(d_{y}\) is the distance between any point in the slope and the bottom line, whereas \(d_{2}\) is the distance between the two reference lines (see Figure 2). Figure 3: The pixel size of a person at the top and bottom of the slope is illustrated, with the two reference lines—the top line and the bottom line—also noted for comparison. 4. **Application to correction**: Finally, this correction factor is applied to the \(x\)-coordinates to correct for distortions from the perspective. As shown by the relevant data in Figure 2, we can determine both the scaling factor and the correction factor in the \(x\)-direction, \[s_{x}=d_{\text{bottom}}/d_{\text{top}}=385.22/209.90=1.84\] (1) \[f_{x}(d_{y})=\frac{s_{x}\cdot d_{y}}{d_{2}}=\frac{1.84\cdot d_{y}}{52.48}=0.035 \cdot d_{y}\] (2) Note that we do not calibrate the positions. Instead, all coordinates, including the corrected ones, will be given in pixels. This is sufficient to obtain a qualitative understanding of the skiers' trajectories. The correction in \(y\)-direction is determined by the following steps: 1. **Selection of reference points**: As shown in Figure 3, we selected a person at the top of the hill and the same person at the bottom of the hill, recording their height \(p_{\text{bottom}}\) and \(p_{\text{top}}\) (in pixels) at these two different locations. 2. **Scaling factor determination**: Next, we calculate the ratio of the two pixel values, which allows us to determine the scaling factor \(s_{y}=\frac{p_{\text{bottom}}}{p_{\text{top}}}\). 3. **Deriving the correction factor**: The correction factor for an arbitrary point on the slope depends on its \(y\)-coordinate.