Abstract : Block matching along epipolar lines is the core of most stereovision algorithms in geographic information systems. The usual distances between blocks are the sum of squared distances in the block (SSD) or the correlation. These distances suffer the adhesion (or fattening) effect, a defect by which the center of the block inherits the disparity of the more contrasted pixels in the block. This report shows that there is a simple and universal solution to this problem. It is enough to use an adaptive weight in the SSD. This weight is nothing but the square of the gradient of the first image in the epipolar direction. This magic adaptive weight yields a computed disparity which is the result of a convolution of the real disparity with a fixed kernel. The choice of the kernel is left to the user. Experiments on simulated and real pairs prove that the formula applies really, and eliminates surface bumps clearly due to the adhesion phenomenon.