Electronic watermarks in digital documents can be detected, even if the
content of the digital documents has been subjected to distortion or other
attempts to hide or destroy the watermarks. A method involves inputting
the distorted image and comparison information, the comparison information
including at least one of the original image or information used for
embedding the electronic watermark; dividing a domain of the original
image into a plurality of patches, based on the comparison information;
inputting affine parameters of a predetermined patch from among the
patches in the original image; extracting a patch candidate from the
distorted image; using a predetermined electronic watermark detection
method, judging whether the patch candidate in the distorted image
adequately correlates with a neighboring patch in the original image; when
the judging indicates an adequate correlation, outputting a part of the
electronic watermark.