# Identification of Location and Camera Parameters for Public Live Streaming Web Cameras
## 5 Examples
### Example 1: Inclined Driving Surface and a Camera with Tilted Horizon
Let us use the area nearest to the camera carriageway region as the ROI (area \(Q\)). We select several points in \(Q\), estimate their global coordinates, and convert them to \(F_{emu}\)[8]. Next, we convert \(F_{emu}\) coordinates to \(F_{c}\) with (27). The results are in Table 2.  
We obtain et the road plane \(\Pi\) approximation with the (29) and (32):  
\[p=(-0.20316,2.04433,86.99813). \tag{48}\]  
We choose four corners of \(g_{1},g_{2},g_{3}\) and \(g_{4}\) of the domain \(\hat{Q}_{im}\) in the \(\hat{\Phi}\) (see Table 3 and Figure 6). We calculate the lines that bound domain \(\hat{Q}_{im}\) by (41) and detect the set of pixel coordinates that belong to \(\hat{Q}_{im}\). Note that this set does not change for different frames from the camera video. We can save it for later usage with the camera and the \(Q\). \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Num** & **Lat** & **Long** & **Height** & \(x_{c}\) & \(y_{c}\) & \(z_{c}\) \\ \hline
1 & 43.176500\({}^{\circ}\) & 131.918103\({}^{\circ}\) & 59.36 & 8.22 & 12.45 & 61.94 \\
2 & 43.176442\({}^{\circ}\) & 131.918310\({}^{\circ}\) & 59 & \(-\)3.12 & 5.76 & 74.25 \\
3 & 43.176532\({}^{\circ}\) & 131.918362\({}^{\circ}\) & 59.3 & \(-\)11.75 & 7.97 & 68.04 \\
4 & 43.176329\({}^{\circ}\) & 131.918286\({}^{\circ}\) & 58.6 & 4.82 & 2.07 & 83.47 \\
5 & 43.176139\({}^{\circ}\) & 131.917970\({}^{\circ}\) & 57 & 37.46 & 2.9 & 89.96 \\
6 & 43.176093\({}^{\circ}\) & 131.918187\({}^{\circ}\) & 56.9 & 24.76 & \(-\)3.76 & 101.44 \\
7 & 43.175553\({}^{\circ}\) & 131.917725\({}^{\circ}\) & 56 & 87.14 & \(-\)14.46 & 133.16 \\
8 & 43.175495\({}^{\circ}\) & 131.917991\({}^{\circ}\) & 55.9 & 71.67 & \(-\)22.71 & 147.37 \\
9 & 43.175794\({}^{\circ}\) & 131.917845\({}^{\circ}\) & 56 & 65.33 & \(-\)7.39 & 116.24 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The spatial points used for the road plane approximation (global and \(F_{c}\) coordinates); \(F_{c}\) coordinates are in meters. Figure 5: The image \(\hat{\Phi}\) rotated by \(4.1^{\circ}\) around the optical axis of the camera. We compute the \(Q_{c}\) as \(\xi(\hat{Q}_{im})\) by (48) and (35)-(39). We convert the pixel coordinates from \(Q_{c}\) to \(F_{\pi}\) by (43)-(47):  
\[Q_{\pi}=R_{c2\pi}(Q_{c}-o) \tag{49}\]  
and save the result. The coordinates set \(Q_{\pi}\) does not change for the (fixed) camera and the \(Q\). The obtained discrete sets \(Q_{c}\) and \(Q_{\pi}\) are sets of metric coordinates. We can use \(Q_{\pi}\) for measurements on the plane \(\Pi\) as is or apply an interpolation. Since \(Q_{\pi}\subset\Pi\), the point set is suitable to output in a plane picture. If for each point, we use \(\xi(g)\in Q_{\pi}\) and the color of the pixel \(g\) for all \(g\in\hat{Q}_{im}\subset\hat{\Phi}\), and output the plane as the scatter map, we obtain the bottom image from Figure 6. We chose a multi-car scene in the center of \(Q\) for the demonstration. We obtain the accurate \"view from above\" for the points that initially lie on the road's surface. The positions of the pixels representing objects that tower above plane \(\Pi\) have shifted. There are options for estimating and accounting for the height of cars and other objects so that their images look realistic in the bottom image. However, this is the subject of a separate article. It is worth paying attention to the axes of the bottom figure (they show meters). In comparison with the original (top image of Figure 6), there are noticeable perspective distortion changes in the perception of distance. The width and length of the area are in good agreement with the measurements made by the rangefinder and estimates from online maps. The horizontal lines in the image are almost parallel which indicates the good quality of \(f_{u}\) and \(f_{v}\). In this way, we cross-checked the camera parameters obtained earlier. Obviously, all vehicles are in contact with the road surface. We do not need to remove distortions (radial and perspective) from all video frames to estimate traffic statistics.