In this paper we propose a new watermarking scheme for digital images that allows watermark recovery even if the image has been subjected to generalized geometrical transforms. The watermark is given by a binary number and every watermark bit is represented by a 2D function. The functions are weighted, using a mask that is proportional to the luminance, and then modulated onto the blue component of the image. To recover an embedded bit, the embedded watermark is estimated using a prediction filter. The sign of the correlation between the estimated watermark and the original function determine the embedded several times at horizontally and vertically shifted locations. In the watermark recovery process we first compute a prediction of the embedded watermark. Then the autocorrelation function is computed for this prediction. The multiple embedding of the watermark result in additional autocorrelation peaks. By comparing the configuration of the extracted peaks with their expected configuration we can determine the affine distortion applied to the image. The distortion can then be inverted and the watermark recovered in a standard way.