The invention provides an image digital
watermark embedding and extracting method and device, and the method comprises the steps: carrying out the DCT of an image, then embedding a digital
watermark, and carrying out the proper embedding of a correction template, thereby effectively hiding the
watermark information, and achieving the hiding of information. The randomly generated template vector p1 improves the security of the watermark, and the watermark can be effectively extracted only when the template is known. The fixed matrix p2 provides an additional
security layer, so that the watermark is more difficult to remove by an attacker.
Watermark extraction is correspondingly carried out based on the embedding mode, the situation that the image cannot restore to the original shape after size transformation in the transformation process is prevented through a deviation rectification template, whether
geometric transformation occurs to the image or not can be verified through an
algorithm, and if
geometric transformation occurs, inverse
geometric transformation is carried out, and then watermark extraction is carried out. The watermark extraction accuracy is extremely high, the error rate can be basically controlled within 8%, and the extremely high watermark extraction accuracy can be guaranteed no matter which color channel of the
color image is embedded.