# A Method for Adapting Stereo Matching Algorithms to Real Environments
## 4 Results  
The experiments using the ACS module were focused on analyzing the impact that this module has on the quality of the results of stereo matching. The ACS was applied to pairs of images with different extents of inaccuracies in their calibration. In order to prepare sets of images with a different calibration precision level, image sets from the Middlebury Stereo Vision project were processed using the method described in Section 3.2. Figure 4a shows the relationship between parameter \(g\) in Equation (8) and the quality of the resulting disparity map measured with the widely used Bad Matched Pixels (BMP) metric [1]. BMP version 1.0 was used, and the results were obtained by using the SDK application provided by the Middlebury Stereo Vision project. Figure 4b shows the average error in the disparity value. The red line presented in the charts refers to the BMP of the disparity maps obtained without the usage of the ACS module. It is noticeable that if the right image is shifted over three points in the y-axis (\(|g|>3\), then the quality of the disparity map deteriorates to over 75%. The blue line shows the results with the use of the ACS. If a side image is shifted three pixels, then the average BMP remains below 30%. This shows that the ACS module fulfills its purpose. A similar impact of the ACS module was observed under the rotation of a side image. Figure 5 shows the influence of the \(\omega\) parameter on the results of stereo matching. The red line reflects the quality of disparity maps obtained without the ACS module. If a side image is rotated by only \(\pi/180\), then the values of BMP rise to over 88%. The blue line in Figure 5 corresponds to the results obtained with the use of ACS. The errors in stereo matching are reduced, and the value of BMP remains lower than 36% when a side image is rotated less than 1.5\(\pi/180\). Figure 6a shows parameter \(H\), as described in Section Calculation of ACS Parameter. The figure presents the extent of necessary translation in the y-axis estimated by the ACS module for different values of \(H\). The estimates were obtained for a pair of images in which a side image was moved up by one point. These estimates do not depend significantly on the selection of parameter \(H\). If \(3\leq H\leq 30\), all results were in the range between 0.8221 and 0.9093. Values closest to the correct one were observed for \(H=11\), \(H=27\), and \(H=28\). Similarly, there is a wide range of acceptable values for the \(H\) parameter for the purpose of performing rotation. Figure 6b presents a relation between rotation calculated by the ACS module for images rotated by \(1\pi/180\) rad. Values between 5 and 30 are in the range of 0.879 and 1.054, with the best estimations for 12 \(\leq H\leq\) 19. Therefore, an accurate selection of the \(H\) parameter is not crucial for the successful performance of the ACS module; however, it contributes to improved results. In the calculations, parameter H is used to exclude possible errors when matching points on the basis of descriptors. [PERSON] et al. analyzed the performance of SURF and SIFT descriptors [38]. Their research shows that these descriptors are almost invariant to minor rotations of images and translations. The scaling of images and inserting noise is more problematic. Theoretically, the value of the H parameter is best when it is higher than the extent of miscalibration that occurs when translating the side image in the y-axis. It needs to be high enough to make it possible for the SURF algorithm to identify corresponding descriptors. However, greater values of H will not have a positive impact on calibration quality. The experiments presented in this paper show that even if the value of H is much higher than its ideal selection, it does not have a crucial impact on the quality of the results for the tested input data. Parameter H can be set according to the resolution of images from stereo cameras and their application. Nevertheless, by default, it can be set to the maximum expected miscalibration in the y-axis.