## 5 Discussion  
This section mainly carries out some relevant experiments on the improved stereo matching algorithm, which is based on joint similarity measures and adaptive weight. The following discussion can be obtained from the experiments: With the comparison of the standard parallax image and the parallax image corresponding to the census transformation before and after the improvement, it can be seen that in the same case of supporting the size of the window, the traditional census algorithm and the improved census algorithm can obtain relatively complete parallax images. However, there are more obvious error-matching areas corresponding to the parallax images of the traditional census algorithm, and the improved census algorithms are closer to the standard vision image. Count the error-matching rate of the parallax images of the census algorithm before and after the improvement, and it is shown in Table 1. From the corresponding error-matching rate of the census algorithm before and after the improvement, it can be seen that the corresponding error-matching rate of the two sets of cardiac model images of the traditional census algorithm is more than 25%, while the algorithm after improvement is only about 14%, that is, the corresponding matching effect of the census algorithm that is improved has improved under the same conditions. When brightness changes, the two algorithms have certain robustness for light distortion. However, the corresponding change in the improved census algorithm is relatively small, and its error-matching rate has decreased significantly. By comparing the result parallax images with the standard parallax images corresponding to the joint similarity measure before and after the improvement, the joint similarity measure before and after the improvement can obtain a relatively complete dense parallax image to a certain extent. However, there are fewer obvious mismatches in the result parallax images corresponding to the improved joint similarity measure. The mismatching rate in the result parallax images corresponding to the joint similarity measure before and after the improvement is counted, respectively, as shown in Table 2. It can be seen from the table that for the two groups of heart model images, the corresponding mismatching rate of the joint similarity measure after the improvement is lower than that before the improvement, and the corresponding average mismatching rate before and after the improvement is 12.46% and 7.99%, respectively; that is, the matching accuracy after the improvement is greatly improved compared with that before the improvement. Comparing the standard parallax image with the result parallax images of the adaptive weight (AW) before and after the improvement, it can be seen that under the same conditions, both matching algorithms can obtain a complete parallax image, but there are more mismatching areas in the AW before the improvement, and the mismatching areas are mainly distributed in the areas with a dark color or certain illumination distortion and the areas with obvious color changes, the matching result of the improved AW is closer to the standard parallax image. The mismatching rate in the parallax image of the AW corresponding to matching results before and after the improvement is counted, respectively, as shown in Table 3. It can be seen from the table that for the two groups of heart model images, the mismatching rate of the AW after the improvement is lower, and  
Figure 10: Stereo images of cardiac soft tissue and corresponding matching results. (**a**) Corrected left image; (**b**) corrected right image; (**c**) result parallax map; (**d**) enlarged posterior parallax map. the average mismatching rate of the AW before and after the improvement is 7.99% and 5.92%, respectively; that is, the matching effect of improved AW is significantly higher. The main reason is that the improved AW draws on the idea of graph cutting. Therefore, when assigning weights to pixels in the support window, it is more targeted.