# Correction Compensation and Adaptive Cost Aggregation for Deep Laparoscopic Stereo Matching
## 1 Introduction  
Three-dimensional laparoscopic systems have demonstrated the potential to decrease the duration of minimally invasive surgery (MIS) and potentially minimize perioperative complications, especially in procedures involving laparoscopic suturing [1]. But they currently can only display stereoscopic images through polarized glasses to provide surgeons with depth perception, without the capability to calculate digital depth information. Digitalization is a prerequisite for informational and intelligitization. Accurately digitizing depth perception poses a significant challenge in the context of intellectualized 3D laparoscopic systems. However, range-finding sensors such as LiDAR systems are not convenient for robot-assisted MIS because of the limited port size and requirements of sterilization. As an alternative, binocular stereo laparoscopes can satisfy these conditions and havethe potential to address the depth perception problem by implementing stereo matching techniques [2]. For pixels in one view of a pair of stereo images, stereo matching aims to find their corresponding pixels along the epipolar lines in the other view, and to output the disparity \(d\), namely, the horizontal displacement between a pair of corresponding pixels. Then, the depth can be calculated by \(\frac{f\cdot b}{d}\), where \(f\) is the camera's focal length and \(b\) is the distance between two camera centers. Stereo matching has become an active area of research in the field of computer vision. In recent years, benefiting from deep learning technology and large synthetic datasets, stereo matching for natural images such as KITTI 2015 [3] and Middlebury [4] has made substantial progress [5; 6; 7; 8; 9]. However, acquiring dense depth information from laparoscopic stereo images remains a non-trivial task. Several challenges have led to this situation. First, there is a scarcity of datasets in the surgical domain owing to limitations in acquiring accurate depth information using conventional depth sensors. Publicly available datasets with precise depth labels can hardly support supervised learning methods [2; 10; 11]. Second, perfect correction is difficult to obtain from stereoscopic images during surgery because of errors from camera calibration [12; 13; 14; 15; 16] and intraoperative focusing [17; 18], whereas most state-of-the-art stereo networks are designed on this premise. Figure 1 shows an example of correction error, where the blue solid lines connect the matching point pairs, and the white dashed lines represent the horizontal lines. The angle between these two lines indicates the vertical correction error between the matching points. As the camera calibration is a homography transformation, correction errors also exist in the horizontal direction, although they are difficult to visualize. Third, large textureless areas in smooth tissues and organs, as well as specular highlights present challenges for registration. The lack of labeled datasets has made researchers focus more on the self-supervised learning ability of stereo networks, which has been shown to be promising [11; 20; 21]. Given that [21] relies on the parallax attention mechanism, which possesses a global receptive field, and consequently, has advantages in the registration of textureless areas, in this work, we followed [21] and extended it to the application scenario of endoscopic surgery. On this basis, we designed a correction compensation module to alleviate the negative effects caused by imperfect correction of laparoscopic stereo images. To enhance prediction effectiveness in areas with specular highlights and no texture, we further developed an adaptive cost aggregation module to guide the network to make greater use of high-value cost information determined by a unimodal distribution coefficient. Simultaneously, this module leverages interleaved group convolution structure (IGCS) and dense connection structure (DCS) to ensure the preservation of the original accuracy while reducing the overall complexity of the model.