In this paper, a robust watermarking algorithm in DWT domain against geometric distortion is proposed. We introduce a distance measure between the distorted and undistorted images/video in order to determine the distortion. We can then inverse the geometric distortion to regain synchronization. An efficient algorithm searching for the synchronization parameters has been developed. Using multi-resolution coarse-fine searching to prune the searching space, the computation of algorithm is reduced drastically. The BCH code and 2-D interleaving are exploited to lower detection error probability. Our watermarking algorithm can successfully resist geometrical distortion, including rotation, scaling, translation, shearing, cropping, jitter attack and linear transformations.