Piecewise linear transformation is a powerful technique for coping with the registration of images affected by local geometric distortions, as it is usually the case of high-resolution satellite images. A key point when applying this technique is to divide the images to register according to a suitable common triangular mesh. This comprises two different aspects: where to place the mesh vertices (i.e., the mesh geometrical realization) and to set an appropriate topology upon these vertices (i.e., the mesh topological realization). This paper focuses on the latter and presents a novel method that improves the registration of two images by an iterative optimization process that modifies the mesh connectivity by swapping edges. For detecting if an edge needs to be swapped or not, we evaluate the registration improvement of that action on the two triangles connected by the edge. Another contribution of our proposal is the use of the mutual information for measuring the registration consistency within the optimization process, which provides more robustness to image changes than other well-known metrics such as normalized cross-correlation or sum of square differences. The proposed method has been successfully tested with different pairs of panchromatic QuickBird images (0.6 m/pixel of spatial resolution) of a variety of land covers (urban, residential, and rural) acquired under different lighting conditions and viewpoints.