# Distance Estimation with a Stereo Camera and Accuracy Determination
## 3 Results  
The results are presented below, which were generated to verify the accuracy of object distance calculations in the stereovision system. The test was performed on two objects: a white cup and a LEGO human figure. Measurements were made at distances ranging from 20 to 70 cm, taking three measurements every 2.5 cm for each distance. This resulted in a large amount of data, which were analyzed in detail. The absolute error, or the difference between the actual distance and the average measurement value, and the relative error, or the absolute error expressed as a percentage of the actual distance, were calculated. Example measurement results are shown in Figures 4 and 5. The results obtained are presented below in Tables 1 and 2 and Figure 6, which will be used to assess the precision of the system  
than for the cup, especially at longer distances. The largest absolute error is 4.81 cm at a distance of 70 cm, which translates into a relative error of 6.88%. In contrast, the smallest absolute error occurs at a distance of 45 cm and is 0.23 cm, representing a relative error of 0.52%. Analyzing the measurement data for the cup, we note that there is a certain range of distances where measurement errors are much lower than in other cases. This range is from 25 to 60 cm, where the average absolute error for this range is 0.4 cm and the relative error is 0.95%. In this range, the individual absolute errors are consistently less than 1 cm, indicating the high precision of the measurement system in this distance range, which translates into relative errors of mostly less than 1%, with the highest in this range being only 1.61% at a distance of 45 cm and the lowest being 0.05% at a distance of 50 cm. We can see that in the vast majority of measurements in this range, the absolute error is less than 0.5 cm, which is an excellent result. In particular, measurements in the range from 27.5 to 45 cm have extremely low errors. \begin{table}
\begin{tabular}{c c c c c c c} \hline
**Actual Distance [cm]** & **Measurement 1 [cm]** & **Measurement 2 [cm]** & **Measurement 3 [cm]** & **Average** & **Absolute Error** & **Relative Error** \\ \hline
20.0 & 17.48 & 17.52 & 17.17 & 17.39 & 2.61 & 13.05 \\
22.5 & 19.74 & 20.4 & 21.53 & 20.56 & 1.94 & 8.64 \\
25.0 & 24.54 & 24.57 & 24.5  
The same situation is the case with the measurements of the LEGO figure; a certain range of distances is visible for which the absolute errors are much lower than 1 cm. This is the range of 30 to 47.5 cm, and the average absolute error of this separated interval is 0.56 cm, which translates into a relative error of 1.46%. The measurements obtained indicate high measurement precision, but only one measurement has a relative error of less than 1%, and this is exactly 0.52% at a distance of 45 cm, where the absolute error is 0.23 cm. In this separated range, the highest errors are obtained at a distance of 42.5 cm, where the absolute error is 0.92 cm and the relative error is 2.17%, which is still a good result. Taking into account the entire measurement range, the average absolute error for the cup is 0.98 cm, and the relative error is 2.42%. These results indicate that the measurement system for the cup, which is a larger object, has fairly high precision. The average absolute error suggests that the measurement readings are usually close to the actual values, with a deviation of less than 1 cm. The relative error of 2.42% means that most measurements  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Actual** & **Measurement 1** & **Measurement 2** & **Measurement 3** & **Average** & **Absolute Error** & **Relative Error** \\
**Distance [cm]** & **[cm]** & **[cm]** & **[cm]** & **Measur. [cm]** & **[cm]** & **[\%]** \\ \hline
20.0 & 17.81 & 17.66 & 17.51 & 17.66 & 2.34 & 11.70 \\
22.5 & 20.90 &  
differ from the actual values by just over 2%, which can be considered an acceptable level of precision for many applications. For the LEGO figure, which is a smaller object, the absolute and relative errors are higher than for the cup.