Stereo matching methods estimate the depth information from stereoscopic images using the characteristics of binocular disparity. We try to find corresponding points from the left and right viewpoint images to obtain the disparity map. Once we get the disparity value between the two correspondences, we can calculate the depth information of the object. If there is no texture in the image, the stereo matching operation may not find the accurate disparity value. Especially, it is quite difficult to estimate correct disparity values in occluded regions. In this paper, we propose a new method to detect disparity errors in the disparity map and correct those errors using the enhanced guided image filter (GIF). An error correction using the GIF causes disparity-smoothing near the occluded region because of a coefficient-smoothing process in the GIF. Thus, our method employs a trilateral kernel for the coefficient smoothing process to alleviate the problem.