# Correcting Ski Resort Trajectories Extracted from Video
## 2 Perspective Correction
### Determination of Correction Coefficient
Using the scaling factor, we derive a correction factor as \(f_{y}(d_{y})=\frac{s_{y}\cdot d_{y}}{d_{2}}\), where \(d_{y}\) is the distance between the location of the point and a reference line at the bottom, and \(d_{2}\) the distance between the top and the bottom point. 4. **Application to correction**: Finally, this correction factor is applied to the \(y\)-coordinates to correct for distortions. In Table 2, the end point coordinates \((x^{\prime},y^{\prime})\) for a skier at the top and bottom of the slope are extracted from the video. The apparent size of this skier is 5.135 pixels at the top and 32.622 pixels at the lower position. This results in a scaling factor of 6.35, which leads to the correction factor \[f_{y}(d_{y})=\frac{6.35\cdot d_{y}}{209.97}=0.03\cdot d_{y}\] (3)  
With this, we have nearly completed the \(y\)-axis correction. Next, our focus will shift to correction. First, we need to select a baseline to transform the raw trajectory obtained from PeTrack. We have chosen the line connecting points 3 and 4 in Figure 2 as the baseline. To start, we will explore perspective correction using the trajectory shown in Figure 4. We applied a processing step to the original coordinates obtained from the software as follows:  
\[x_{i} = x_{i}^{\prime}+\alpha_{x}\cdot d_{y} \tag{4}\] \[y_{i} = y_{i}^{\prime}+\alpha_{y}\cdot d_{y} \tag{5}\] \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Points** & **Frame** & \(x^{\prime}\) & \(y^{\prime}\) \\ \hline
1 & 213 & \(-258.107\) & 316.847 \\
2 & 213 & \(-258.107\) & 311.712 \\
3 & 925 & \(-252.335\) & 134.364 \\
4 & 925 & \(-252.227\) & 101.742 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Coordinates of the top and bottom points in Figure 3.  
Here, we have introduced the abbreviations \(\alpha_{x}=0.035\) and \(\alpha_{y}=0.03\) for the correction coefficients in the \(x\)- and \(y\)-directions. \(d_{y}\) is the distance of the object to the reference line (see Figure 2), i.e.,  
\[d_{y}=y_{i}^{\prime}-y_{\text{base}} \tag{6}\]  
where \(y_{\text{base}}\) is the \(y\)-coordinate of the baseline. In addition, to further clarify the correction factors \(f_{x}(d_{y})\) and \(f_{y}(d_{y})\), the correction coefficients \(\alpha_{x}\) and \(\alpha_{y}\), and the scaling factors \(s_{x}\) and \(s_{y}\), we provide the following explanation:  
\[s_{x}=\frac{d_{\text{bottom}}}{d_{\text{top}}},\quad s_{y}=\frac{p_{\text{ bottom}}}{p_{\text{top}}}\]  
\[f_{x}(d_{y})=\frac{s_{x}\cdot d_{y}}{d_{2}}=\alpha_{x}\cdot d_{y},\quad f_{y}( d_{y})=\frac{s_{y}\cdot d_{y}}{d_{2}}=\alpha_{y}\cdot d_{y}\]  
Figure 5 provides a diagram illustrating how the model works. The above two Formulas (4) and (5) were used for the correction of the \((x^{\prime},y^{\prime})\)-coordinates extracted from the video to determine the real coordinates \((x,y)\). As we can see from Figure 6, the overall shapes of the two trajectories are basically the same, indicating that after the correction, the change in the trajectory did not lead to a strong deviations of the path. As expected, the correction is much larger for large \(y\)-values, but the overall shape of the trajectory is not significantly changed. The derivation of the correction factors used so far was based on some assumptions. In the following, we will use improved correction methods to see whether this will have a stronger effect on the extracted trajectories. Figure 4: Original trajectory from video, the red line here shows one skier’s movement path.