In digital image watermark applications, most of watermark algorithms are vulnerable to geometrical affine transformation attacks. In order to resist affine transformation attacks, we propose a correlation coefficient based algorithm, which uses the original image to estimate affine parameters and recover the affine transformed image before watermark detection. Compared with existing affine parameter estimation algorithms, the correlation coefficient based algorithm is more precise, and is able to resist various image processing attacks, including cropping and darken (luminance modification). Therefore, the proposed algorithm is particularly suitable for affine transformation recovery in digital watermark applications.