Matlab code for DCT based Watermarking
Invisible digital watermarking is coming to be the most popular technology to protect digital copyright of multimedia data. Schemes based on Discrete Cosine Transform (DCT) are widely used in image or video digital watermarking. In this paper, we proposed a new method that simplify the previous DCT-based methods while more robust to common attacks than conventional methods. We get rid of traditional restrict of DCT-based methods that the blocks sizes conducted DCT transform is 8*8, we divide the carrier image according to watermark image size, and the block size M*N varies due to the carrier image and watermark image. This change made our method more flexible that carrier image and watermark image size no longer need to satisfy restrict to get the 8*8 DCT transform blocks. This also made us can resist the image zoom in, zoom out and height-width ratio change attack. In previous DCT-based methods, watermark extraction is an inverse process of watermark embedding, which need to conduct DCT transform and we simplified the watermark extraction process just subtract the watermarked image with original image to get the watermark. The experiment results show that our method is robust to kinds of common piracy attacks.