Você está na página 1de 64

ANURAG ENGINEERING COLLEGE

1. INTRODUCTION
In recent years, many digital watermarking techniques have been proposed to protect the copyright of digital multimedia data. Watermark embedding is performed in many domains such as spatial, Fourier transform, DCT and DWT. One of the commonly used domains for embedding a watermark in an image is the DCT. DCT splits up the image into the frequency bands, so upon the application, the watermark can be embedded in different frequencies. Furthermore, the sensitivity of human visual system to DCT frequencies has been extensively studied which resulted in the recommended JPEG quantization table. These results can be used for predicting and minimizing the visual impact of distortion caused by embedding the watermark. If we know the image compression domain, for example DCT, then it is better to embed watermark in those DCT are 1. Discrete Cosine Transform 2. Discrete Wavelet Transform Coefficients which are unlikely to be discarded during the compression process. Since we are able to anticipate which DCT coefficients will be quantized by the compression scheme, we can choose not to embed the watermark in those coefficients. This approach can be extended to compression methods in other domains, as well. Furthermore, it is a common practice to apply additive noise for watermark embedding and use the correlation techniques for detection. In a watermarking technique is provided in which a watermark is embedded as pseudo-random noise sequences into middle-frequency range of the image. The major objective of this paper is to develop a watermarking algorithm based on DCT and spread spectrum communications in such a way that it is highly robust with respect to JPEG compression and also other common technique. Compared with similar works, our method provided the highest robustness for extracted watermark especially when JPEG compression was applied to the watermarked image

DEPARTMENT OF ECE

ANURAG ENGINEERING COLLEGE

1.1 RELATED WORKS ON WATERMARKING

Existing literature reveals two techniques for the watermarking of images: transform domain and spatial domain. Most of the recent watermarking schemes employ mainly the frequency domain approach because it is superior to the spatial domain approach in robustness and stability .However; there is a crucial question that should be answered. Which frequency band in frequency domain can be robust and imperceptible to various attacks? According to Webers rule, the low frequency area is more robust than high and middle frequency areas. There have been various methods to embed the watermark into the low frequency area. It is known that embedded watermark in the prior approaches are robust to various attacks to a certain extent but it is likely to be destroyed if the distortion exceeds a particular level. Despite their robustness, the key concern is that if the low frequency components are changed, the image quality is degraded and the watermark becomes meaningless. Thus, of importance is to make the modifications that made by watermark embedding in low frequency coefficients as low as possible. This problem can be solved by using spread spectrum communication techniques for embedding watermark in low frequencies. In spread spectrum communications, a narrowband signal is transmitted over a much larger bandwidth such that, the signal energy present in any single frequency is imperceptible. Similarly, in spread spectrum watermarking schemes, the host image is viewed as a communication channel, while the watermark is viewed as a signal to be transmitted. So the watermark is spread over many samples of the host signal by adding a low energy pseudorandom noise sequence to them. The embedded watermark sequence is detected by correlating this specific pseudo random noise sequence with the watermarked signal itself. In some techniques are proposed in which the watermark is embedded in the middle and high frequency components. The low frequency components are left unchanged in order to decrease the visibility of the watermark. Embedding the watermark in middle and high frequency components makes these techniques vulnerable to attacks such as compression and noise addition. It is known that most of the energy of natural images is concentrated in the lower frequency range.

DEPARTMENT OF ECE

ANURAG ENGINEERING COLLEGE

Therefore, most lossy compression methods quantize and discard the information hidden in the higher frequency components. However, the human eye is more sensitive to noise in lower frequency components than in higher frequency ones. In order to invisibly embed the watermark that can survive lossy data compressions, a reasonable trade-off is to embed the watermark as low energy pseudo-random noise sequences into the low-frequency range of the image . Also there are other argues that, using the same transforms for both watermarking and compression will result in optimal performance or using complementary transform. For example in, proposed using complementary transforms can potentially provide greater robustness. But in this paper we show that using the same transforms for both watermarking and compression demonstrates the superiority of robustness and performance. That is, by anticipating which coefficients would be modified by the subsequent transform and quantization, we were able to produce a watermarking technique which has the highest resistance to JPEG compression compared with well known recent works. We could extract the watermark even if the watermarked image is compressed by JPEG with quality factor of 1%. Moreover, watermarking techniques can be divided into two distinct categories depending on the necessity of original images for the watermark extraction. Although existence of original image may facilitate watermark extraction to a certain extent, two problems can come out At the risk of insecurity the owners of original images may be compelled to share their work with anyone who wants to check the existence of the watermark and it is time-consuming and cumbersome to search out the originals that correspond to a given watermark within the database. Thus, in order to overcome these problems we need a method for extracting the embedded watermark without requiring the original image. This method is called a blind watermarking technique. Such techniques appear far more useful since the availability of an original image is usually unwarranted in real-world scenarios. As described, for extraction of watermark from watermarked image we do not need to have the original host image. Recently, research efforts have been devoted to security analysis in which successful attacks have been proposed to defeat previously proposed multimedia authentication systems.

DEPARTMENT OF ECE

ANURAG ENGINEERING COLLEGE

It is well known that many digital watermarking schemes, especially quantization based schemes, are weak against well-designed sophisticated attacks. Therefore, in the watermarkbased authentication systems, security of the overall system including authenticator generation and embedding must be considered. In our development, we assume Kirchhoffs principle which requires that the opponent knows the details of all aspects of the authentication system except for the secret key shared between the transmitter and the receiver. We adopt the following stringent definition of security: given that an opponent has full knowledge of the watermarking system details except for the secret key, it must be computationally infeasible for the opponent to alter the watermarked data in an illegitimate manner such that the modified copy is wrongly accepted as legitimate.

DEPARTMENT OF ECE

ANURAG ENGINEERING COLLEGE

2. LITERATURE REVIEW

2.1 INTRODUCTION TO EXISTING SYSTEMS

The right to privacy is spread implicitly throughout the Bill of Rights. But when the United States Constitution was framed, the Founding Fathers saw no need to explicitly spell out the right to a private conversation. That would have been silly. Two hundred years ago, all conversations were private. If someone else was within earshot, you could just go out behind the barn and have your conversation there. No one could listen in without your knowledge. The right to a private conversation was a natural right, not just in a philosophical sense, but in a law-of physics sense, given the technology of the time.

2.2 CRYPTOGRAPHY

Cryptography is a physical process that scrambles information by rearrangement and substitution of content, making it unreadable to anyone except the person capable of unscrambling it. With the sheer volume of sensitive Internet transactions that occur daily, the benefit of securing information using cryptographic processes becomes a major goal for many organizations. Since no cryptographic system is foolproof, the idea is to make the cost of acquiring the altered data greater than the potential value gained. Essentially, it becomes an issue of deterrence. Generally, all cryptographic processes have four basic parts: Plaintext - Unscrambled information to be transmitted. It could be a simple text document, a credit card number, a password, a bank account number, or sensitive information such as payroll data, personnel information, or a secret formula being transmitted between organizations. Cipher text - Represents plain text rendered unintelligible by the application of a mathematical algorithm. Cipher text is the encrypted plain text that is transmitted to the receiver. Cryptographic Algorithm - A mathematical formula used to scramble the plain text to yield cipher text. Converting plain text to cipher text using the cryptographic algorithm is called encryption, and converting cipher text back to plain text using the same cryptographic algorithm is called decryption

DEPARTMENT OF ECE

ANURAG ENGINEERING COLLEGE

2.2.1 Disadvantages

1. Transmission time for documents encrypted using public key cryptography is significantly slower then symmetric cryptography. In fact, transmission of very large documents is prohibitive. 2. The key sizes must be significantly larger than symmetric cryptography to achieve the same level of protection. 3. Public key cryptography is susceptible to impersonation attacks.

2.3 STEGANOGRAPHY

The word steganography comes from the Greek Seganos, which mean covered or secret and graphy mean writing or drawing. Therefore, steganography mean, literally, covered writing. It is the art and science of hiding information such its presence cannot be detected and a communication is happening. A secrete information is encoding in a manner such that the very existence of the information is concealed. Paired with existing communication methods, steganography can be used to carry out hidden exchanges. The main goal of this projects it to communicate securely in a completely undetectable manner and to avoid drawing suspicion to the transmission of a hider data. There has been a rapid growth of interest in steganography for two reasons: The publishing and broadcasting industries have become interested in techniques for hiding encrypted copyright marks and serial numbers in digital films, audio recordings, books and multimedia products. Moves by various governments to restrict the availability of encryption services have motivated people to study methods by which private messages can be embedded in seemingly innocuous cover messages. The basic model of steganography consists of Carrier, Message and password. Carrier is also known as cover-object, which the message is embedded and serves to hide the presence of the message.

DEPARTMENT OF ECE

ANURAG ENGINEERING COLLEGE

Basically, the model for steganography is shown on following figure:

Cover-object, C F(X,M,K) Message, M Stego Object, Z

Stego-key, K

Fig 2.1 Block diagram of Steganography Message is the data that the sender wishes to remain it confidential. It can be plain text, cipher text, other image, or anything that can be embedded in a bit stream such as a copyright mark, a covert communication, or a serial number. Password is known as stego-key, which ensures that only recipient who know the corresponding decoding key will be able to extract the message from a cover-object. The cover-object with the secretly embedded message is then called the Stego-object. Recovering message from a stego-object requires the cover-object itself and a corresponding decoding key if a stego-key was used during the encoding process. The original image may or may not be required in most applications to extract the message. 2.3.1 Disadvantages

1. This makes difficult to select out the appropriate letters by a computer.

2. The printing/copying/scanning processes bring additional problems to revoke the hidden


text.

DEPARTMENT OF ECE

ANURAG ENGINEERING COLLEGE

2.4 PROPOSED SYSTEM


To overcome the all the problems of existing system we are going for watermarking technique which is robust and provides high security from the hackers. The fast development of the Internet in recent years has made it possible to easily create copy, transmit, and distribute digital data. Consequently, this has led to a strong demand for reliable and secure copyright protection techniques for digital data. Digital watermarking has been proposed as valid solution for this problem. The purpose of the watermark is to embed some additional information about the digital data without visibly modifying it. However, robustness of common DWT and DCT transform methods is increased by previous hybrid method; despite, their robustness against noise and blurring attack is not acceptable. In order to solve this problem, a new image watermarking algorithm based on jointed DWT-DCT method is presented in this paper. In proposed method, Watermarking is done by altering the wavelets coefficients of middle frequency coefficient sets of 3-levels DWT transformed host image, followed by the application of the DCT transform on the selected coefficient sets. Difference between Al-Hajs method and proposed is in selection of sub-band for embedding watermark and novel pre-processing before extraction procedure.

DEPARTMENT OF ECE

ANURAG ENGINEERING COLLEGE

3. PROPOSED MODEL
3.1 INTRODUCTION
A blind low frequency watermarking scheme on gray level images, which is based on DCT transform and spread spectrum communications technique. We compute the DCT of non overlapping 8x8 blocks of the host image, and then using the DC coefficients of each block we construct a low-resolution approximation image. We apply block based DCT on this approximation image, then a pseudo random noise sequence is added into its high frequencies. For detection, we extract the approximation image from the watermarked image, then the same pseudo random noise sequence is generated, and its correlation is computed with high frequencies of the watermarked approximation image. In our method, higher robustness is obtained because of embedding the watermark in low frequency. In addition, higher imperceptibility is gained by scattering the watermark's bit in different blocks.

3.2 WATERMARKING
Concerning visual aspects, the invisibility of the watermark is usually either empirically assumed or only tested with simplified quality metrics such as Peak Signal to Noise Ratio (PSNR) or Root Mean Square Error (RMSE). Most watermarking approaches aiming in the optimization of the robustness versus invisibility trade-off are inspired on well-known perceptual properties from a qualitative point of view rather than on advanced quantitative visual models. This is all the more surprising since several image processing applications, such as quality assessment, or compression made the implementation of complex perceptual models possible. In watermarking applications, a few studies were conducted on the creation of perceptual masks in a data hiding context. A perceptual mask or JND (Just Noticeable Difference) mask is supposed to indicate the maximum amount one can add or subtract at every image site without producing any visible difference. A typical example of the exploitation of qualitative HVS properties is addressed in, where the authors made the following heuristic assumptions: the noise sensitivity is weak on the

DEPARTMENT OF ECE

ANURAG ENGINEERING COLLEGE

image edges, smooth areas are very sensitive to variations and textured areas have a high noise sensitivity level. An edges-texture classification is then used in order to create Masks. The so obtained content based watermarking technique was found to be robust against several attacks, such as JPEG compression, cropping, or Gaussian noise addition. An original method addressing higher levels of the HVS to define suitable masks has been defined in. The method is based on a qualitative approach to regions of interest. Basically, the watermark is inserted in regions that have either high motion (because such regions are not traceable by the HVS) or slow relative motion (because they are not relevant). A similar study was also conducted in, investigating in which region an artifact is noticeable based on color saliency. However, although such heuristic properties can be exploited to implement simple masks, some very useful HVS features are not taken into account. For instance, using an advanced HVS model could allow to fully exploit the masking effects, and thus, to optimize both the invisibility and robustness of the mark

3.2.1Digital image water marking

The fast development of the Internet in recent years has made it possible to easily create copy, transmit, and distribute digital data. Consequently, this has led to a strong demand for reliable and secure copyright protection techniques for digital data. Digital watermarking has been proposed as valid solution for this problem. The purpose of the watermark is to embed some additional information about the digital data without visibly modifying it. In order to be successful, the watermark should be invisible and robust to premeditated or spontaneous modification of the image. It should be robust against common image processing operations such as filtering, additive noise, resizing, cropping etc and common image compression techniques. If the watermark is placed in perceptually significant coefficients of the image, the robustness against image distortion is better achieved. These coefficients do not change much after common image processing and compression operations. Also, if these coefficients are destroyed, the reconstructed image is different from the original image and the digital watermark become irrelevant.

DEPARTMENT OF ECE

10

ANURAG ENGINEERING COLLEGE

Although, embedding the watermark in perceptually significant coefficients could alter the perceived visual quality of the image. Thus, two essential prerequisites for a powerful watermarking scheme, robustness and invisibility conflict with each other. Watermarking techniques can be categorized in different ways. They can be classified according to the type of watermark being used, i.e., the watermark may be a visually recognizable logo or a sequence of random numbers. Another classification is based on domain which the watermark is applied i.e., the spatial domain or the transform domain. The earlier watermarking techniques were almost in spatial domain. Spatial domain techniques are not resistant enough to image compression and other image processing. Transform domain watermarking schemes like those based on the discrete cosine transform (DCT), the discrete wavelet transform (DWT) typically provide higher image imperceptibility and are much more robust to image manipulations. In these domain watermark is placed in perceptually significant coefficients of the image. However, DWT has been used more frequently in digital image watermarking due to its time/frequency decomposition characteristics, which resemble to the theoretical models of the human visual system. In order to further performance improvements in DWT-based digital image watermarking algorithms could be obtained by jointing DWT with DCT. The reason of applying two transform is based on the fact that jointed transform could make up for the disadvantages of each other, so that effective watermarking approaches could acquire. Fotopoulos and Skodras decompose the original image into four bands using the Haar wavelet, and then perform DCT on each of the bands; the watermark is embedded into the DCT coefficients of each band. A compared image dependent and additive blind watermarking algorithms that embed a watermark in the DWTDCT domain by taking the properties of the HVS into account. The image dependent algorithm modulates the watermarking coefficients with original mid-frequency DWT-DCT coefficients .A combined DWT-DCT digital image watermarking algorithm that embed the watermark in the first and second level of DWT coefficient sets of the host image, followed by the application of DCT on the selected DWT coefficient sets. However, robustness of common DWT and DCT transform methods is increased by previous hybrid method; despite, their robustness against noise and blurring attack is not --+acceptable. In order to solve this problem, a new image watermarking algorithm based on jointed DWT-DCT method is presented in this paper. In proposed method, Watermarking is done
DEPARTMENT OF ECE 11

ANURAG ENGINEERING COLLEGE

by altering the wavelets coefficients of middle frequency coefficient sets of 3-levels DWT transformed host image, followed by the application of the DCT transform on the selected coefficient sets. Difference between Al-Hajs method and proposed is in selection of sub-band for embedding watermark and novel pre-processing before extraction procedure. Al-Haj chosen HL sub-band in 2-level dwt transformed to performing block DCT on them, But proposed method use all of the HL frequency sub-band in the middle frequency coefficient sets LHx and HLx in 3-levels DWT transformed image. By this algorithm, coarser level of DWT in terms of imperceptibility and robustness is chosen to apply 44 block-based DCT on them, and consequently higher imperceptibility and robustness can be achieved. Also, pre-filtering operation is used before extraction of the watermark, sharpening and Laplacian of Gaussian (LoG) filtering, is used to increase different between information of watermark and hosted image. 3.2.2 Spread-spectrum watermarking

In spread spectrum communications, a narrowband signal is transmitted over a much larger bandwidth such that, the signal energy present in any single frequency is imperceptible. Similarly, in spread spectrum watermarking schemes, the host image is viewed as a communication channel, while the watermark is viewed as a signal to be transmitted. So the watermark is spread over many samples of the host signal by adding a low energy pseudorandom noise sequence to them. The embedded watermark sequence is detected by correlating this specific pseudo random noise sequence with the watermarked signal itself. As described in above, for extraction of watermark from watermarked image we do not need to have the original host image. This technique of watermarking where the host image is not available for watermark extraction is referred to as blind watermarking. It is known that in DCT, most of the energy of natural images is concentrated in the lower frequency range. Therefore, most lossy compression methods quantize and discard the information hidden in the higher frequency components. However, the human eye is more sensitive to noise in lower frequency components than in higher frequency ones.

DEPARTMENT OF ECE

12

ANURAG ENGINEERING COLLEGE

In order to invisibly embed the watermark that can survive lossy data compressions, a reasonable trade-off is to embed the watermark as low energy pseudorandom noise sequences into the low-frequency range of the image. We assume the host image is of size 512x512. Blocked based DCT is applied on it. Then to embed the watermark, for each 8x8 image block, only the DC coefficient is selected out of the 64 DCT coefficients. Those selected coefficients are then mapped into a reduced image which is called low-resolution approximation image (LRAI); that is formed from the DC coefficients of all transformed blocks of host image . Then according to the value of watermark bit which is going to be embedded in each block, a pseudo random noise sequence is added to the high frequencies of DCT transform of each 8x8 block of LRAI. There are different definitions for high frequencies in a DCT block, but our experiments shows that the definition. Many different watermarking methods for images and video have been proposed. Most of them are based on ideas known from spread spectrum radio communications namely additive embedding of a (signal adaptive or non-adaptive) pseudo-noise watermark pattern, and watermark recovery by correlation. Even techniques that are not presented as spread spectrum methods often build on these principles. {Fig. 1 illustrates a simple, straightforward example of spread spectrum watermarking. The watermark bits to be embedded are each repeated N=4 times, where N is the number of pixels in the image to be watermarked. The spread information bits are then modulated with a crypto logically secure pseudo noise signal, scaled according to visibility criteria, and added to the image or video pixels.

DEPARTMENT OF ECE

13

ANURAG ENGINEERING COLLEGE

Fig.2.2: Spread spectrum watermark embedding.

Fig. 2.2 illustrates the corresponding watermark detector based on the principle of a correlation receiver (or matched _filter). In order to reduce cross-talk between the image and the watermark, a prelter is applied in order to remove low frequencies from the signal, especially in order to remove the local mean. If the original, un-watermarked data are available to the watermark detector, it is advantageous to replace the filtering by subtraction of the original (yielding exactly the embedded watermark). The filtered watermarked image (or the watermark, if the original is available) is then demodulated using exactly the same pseudo-noise signal previously used for watermark embedding. The samples of the correlation signal, shown on the right-hand side, are summed for each embedded watermark bit, and a threshold decision yields the output bits. Thus, the result of the watermark decoder is the same watermark information bits that have been embedded.

DEPARTMENT OF ECE

14

ANURAG ENGINEERING COLLEGE

Fig.2.3: Spread spectrum watermark retrieval.

Fig 2.3 illustrates that the watermarked data is sent to the receiver through a channel. We refer to the channel as the watermarking channel to distinguish it from a broadcast channel. Specific for the watermarking channel is that it includes attacks on the watermarks. Robustness of the watermarks against attacks is a key requirement. While most proposed methods are supported with results showing the robustness against simple signal processing manipulations like linear filtering, cropping or JPEG compression (which are the least effective attacks), very few results are given proving robustness against sophisticated malicious attacks. Some of the few exceptions are results for watermarking methods specifically designed to be robust against certain attacks like spatial shift, zoom, or rotation. In contrast, several different watermark attacks have been proposed that seem to prove that the known watermarking methods are in fact vulnerable to attacks and do not satisfy the robustness and security requirements. Some of the authors claim that their software defeats all or almost all commercial watermark products. In the next sections, attacks on watermarks are classified and analyzed. Furthermore, remedies and counterattacks are explained that help making spread-spectrum watermarking more resistant against attacks. It transmits a narrowband signal over a much larger bandwidth sat. The signal energy present in any single frequency is un-detectable. The watermark is spread over many frequency bins so that the energy in any one bin is very small and certainly undetectable.

DEPARTMENT OF ECE

15

ANURAG ENGINEERING COLLEGE

Because the watermark verification process knows the location and content of the watermark, it is possible to concentrate these many weak signals into a single output with high SNR. To destroy such a watermark would require noise of high amplitude to be added to all frequency bins.

3.2.3 Blind water marking

Digital forgeries and unauthorized sharing of digital media have emerged as a growing concern over the last decade. The widespread use of multimedia information is aided by factors such as the growth of the Internet, the proliferation of low-cost and reliable storage devices, the deployment of seamless broadband networks, the availability of state-of-the-art digital media production and editing technologies, and the development of efficient multimedia compression algorithms. Multimedia piracy has subjected the entertainment industry to enormous annual revenue losses. For example, music industry alone claims multi-million illegal music downloads on the Internet every week. It is therefore imperative to have robust technologies to protect copyrighted digital media from illegal sharing and tampering. Traditional digital data protection techniques, such as encryption and scrambling, alone cannot provide adequate protection as these technologies are unable to protect digital content once they are decrypted or unscrambled. Digital watermarking technology complements cryptography for protecting digital content even after it is deciphered. Digital watermarking refers to the process of imperceptible embedding information (watermark) into the digital object (or the host objects). Existing watermarking schemes based on the watermark embedding method used can be classified into two major categories: 1. Blind embedding, in which the watermark embedded does not exploit the host signal information during watermark embedding process. Watermarking schemes based on spread-spectrum (SS) fall into this category. 2. Informed embedding, in which the watermark embedded exploits knowledge of the host signal during watermark embedding process. Watermarking schemes based on quantization index modulation belong to this category.

DEPARTMENT OF ECE

16

ANURAG ENGINEERING COLLEGE

Similarity, existing watermarking schemes based on the detection method used cab be classified into two major categories: 1. Informed detector, which assume that the host signal is available at the detector during watermark detection process.

2. Blind detector, which assumes that the host signal, is not available at the detector for watermark detection. Although the performance expected from a given watermarking system depends on the target application area, but robustness of the embedded watermark and efficient detection are desirable features of a give watermarking scheme. In addition, fidelity (or imperceptions) of the embedded watermark is additional requirement of perception based watermarking schemes. To meet fidelity requirement, the power of the embedded watermark (watermark strength) is generally kept much lower than the host signal power. We consider additive watermark embedding model, e.g. SS-based watermarking, where the watermark signal is added to the host signal in the marking space to obtain the watermarked signal. Existing watermark detection schemes for SS-based watermarking generally employ statistical characterization of the host signal to develop an optimal or suboptimal watermark detector. It is important to mention that blind watermark detectors for Sybase watermarking perform poorly as the host-signal acts as interference at the blind decoder. Therefore, nonzero decoding error probability at the blind watermark decoder even in the absence of attack-channel distortion is one of the limitations of existing blind watermark detectors for SS-based watermarking schemes. A blind watermark detection method for the blind additive watermark embedding schemes. To design a blind detector for SS-based watermarking schemes capable of suppressing host-signal interference (or improving watermark-to-host ratio) at the detector, hence improving decoding as well as detection performance. Towards this end, the proposed detector uses ICA framework by posing watermark detection problem as a blind source separation (BSS) problem. The proposed detector models the received watermarked signal as a linear mixture of underlying independent components (the host signal and the watermark). It also assumes non-gaussianity of the host signal. Recently, the watermark estimation problem for SS-based watermarking can be modeled as that of BSS of underdetermined mixture of independent sources.
DEPARTMENT OF ECE 17

ANURAG ENGINEERING COLLEGE

Therefore, the ICA framework could be used to estimate the watermark from the watermarked signals obtained using additive embedding model. The proposed ICA-based detector first estimates the hidden independent components (i.e., the watermark and the host signal) from the received watermarked signal using the ICA framework, and then these estimated components are used to detect the embedded watermark. We present theoretical analysis to show that the proposed ICA-based detector performs significantly better than the existing watermark detectors operating without canceling the host signal interference at the watermark detector for watermark detection. Simulation results also show that the proposed detector in estimation-correlation based detection settings also outperforms the normalized correlation based detector (commonly used for watermark detection in SS-based watermarking community operating without host interference suppression. Simulation results are evaluated against variety of signal manipulations and degradations applied to the watermarked media. These signal degradations include addition of colored and white noise, re-sampling, re-quantization, lossy compression, filtering, time- and frequency-scaling, and StirMark for audio benchmark attacks. The proposed ICA-based watermark detector is applicable to SS-based watermarking of all media types, i.e. audio, video and images. However, the proposed detector is tested for digital audio (which includes music and voiced speech signals only) as the host media for watermark embedding, detection, and performance analysis. In the past ICA-based framework has been used for multimedia watermarking. However, Existing ICA-based data-hiding schemes are either not applicable to SS-based watermarking or use an informed detection framework for watermark extraction therefore is not discussed in this manuscript. For example, Yu et al in have proposed ICA-based watermark detector that can be used for SSbased watermarking but their detector uses the embedded watermark and a private data during watermark extraction process. Similarly, Sener et als proposed ICA based watermark detector in is also applicable to SS-based watermark detection, but their proposed detector also also requires the original watermark during watermark detection process; therefore, cannot be used for blind watermark detection extraction applications. Rest of the paper is organized as follow: basics of SS based watermarking are discussed.

DEPARTMENT OF ECE

18

ANURAG ENGINEERING COLLEGE

A brief overview of the independent component analysis theory is provided. The proposed ICA-based watermark detector along with its decoding, detection, and maximum watermarking-rate performance analysis are described. Simulation results for decoding bit error probability performance of the proposed ICAbased watermark detector and a correlation-based detector against different attacks and signal degradations are described. Finally the concluding remarks along with future research directions are presented.

3.3 DISCRETE COSINE TRANSFORM


A discrete cosine transform (DCT) expresses a sequence of finitely many data points in terms of a sum of cosine functions oscillating at different frequencies. DCTs are important to numerous applications in science and engineering, from lossy compression of audio and images (where small high-frequency components can be discarded), to spectral methods for the numerical solution of partial differential equations on, it turns out that cosine functions are much more efficient (as explained below, fewer are needed to approximate a typical signal, whereas for Differential equations the cosines express a particular choice of boundary conditions. In particular, a DCT is a Fourier-related transform similar to the discrete Fourier transform (DFT), but using only real numbers.

DCTs are equivalent to DFTs of roughly twice the length, operating on real data with even symmetry (since the Fourier transform of a real and even function is real and even), where in some variants the input and/or output data are shifted by half a sample. There are eight standard DCT variants, of which four are common. The most common variant of discrete cosine transform is the type-II DCT, which is often called simply "the DCT"; its inverse, the type-III DCT, is correspondingly often called simply "the inverse DCT" or "the IDCT". Two related transforms are the discrete sine transforms (DST), which is equivalent to a DFT of real and odd functions, and the modified discrete cosine transforms (MDCT), which is based on a DCT of overlapping data.

DEPARTMENT OF ECE

19

ANURAG ENGINEERING COLLEGE

Types of duct:
DCT-I: ( ( ) ) , (3.1) The DCT-I is exactly equivalent (up to an overall scale factor of 2), to a DFT of 2N 2 real Numbers with even symmetry. For example, a DCT-I of N=5 real numbers abcde is exactly equivalent to a DFT of eight real numbers abcdedcb (even symmetry), divided by two. (In contrast, DCT types II-IV involve a half-sample shift in the equivalent DFT).

Note, however, that the DCT-I is not defined for N less than 2. (All other DCT types are defined for any positive N.) Thus, the DCT-I corresponds to the boundary conditions: xn is even around n=0 and even around n=N-1; similarly for Xk , ( ) (3.2) Some authors further multiply the x0 and xN-1 terms by 2, and correspondingly multiply the X0 and XN-1 terms by 1/2. The DCT-I is exactly equivalent (up to an overall scale factor of 2), to a DFT of 2N 2 real numbers with even symmetry. For example, a DCT-I of N=5 real numbers abcde is exactly equivalent to a DFT of eight real numbers abcdedcb (even symmetry), divided by two. (In contrast, DCT types II-IV involve a half-sample shift in the equivalent DFT.) Note, however, that the DCT-I is not defined for N less than 2. (All other DCT types are defined for any positive N.) Thus, the DCT-I corresponds to the boundary conditions: xn is even around n=0 and even around n=N-1; similarly for Xk.

DCT-II: [ ( ) ]

DEPARTMENT OF ECE

20

ANURAG ENGINEERING COLLEGE

(3.3) The DCT-II is probably the most commonly used form, and is often simply referred to as "the DCT". This transform is exactly equivalent (up to an overall scale factor of 2) to a DFT of 4N real inputs of even symmetry where the even-indexed elements are zero. That is, it is half of the DFT of the 4N inputs yn, where y2n = 0, y2n + 1 = xn for, and y4N n = yn for 0 < n < 2N. Some authors further multiply the X0 term by 1/2.For the corresponding change in DCT-III). This makes the DCTII matrix orthogonal, but breaks the direct correspondence with a real-even DFT of half-shifted input. The DCT-II implies the boundary conditions: xn is even around n=-1/2 and even around n=N-1/2. Xk is even around k=0 and odd around k=N.

DCT-III: [ ( )] (3.4) Because it is the inverse of DCT-II (up to a scale factor, see below), this form is sometimes simply referred to as "the inverse DCT" ("IDCT"). Some authors further multiply the x0 term by 2. So that the DCT-II and DCT-III are transposes of one another. This makes the DCT-III matrix orthogonal, but breaks the direct correspondence with a real-even DFT of halfshifted output. The DCT-III implies the boundary conditions: xn is even around n=0 and odd around n=N; Xk is even around k=-1/2 and even around k=N-1/2.

DCT-IV: [ ( )( )] (3.5) The DCT-IV matrix becomes orthogonal (and thus, being clearly symmetric, its own inverse) .A variant of the DCT-IV, where data from different transforms are overlapped, is called

DEPARTMENT OF ECE

21

ANURAG ENGINEERING COLLEGE

the modified discrete cosine transform (MDCT) .The DCT-IV implies the boundary conditions: xn is even around n=-1/2 and odd around n=N-1/2.similarly for Xk.

DCT V-VIII: DCT types I-IV are equivalent to real-even DFTs of even order (regardless of whether N is even or odd), since the corresponding DFT is of length 2(N1) (for DCT-I) or 4N (for DCTII/III) or 8N (for DCT-VIII).

In principle, there are actually four additional types of discrete cosine transform, corresponding essentially to real-even DFTs of logically odd order, which have factors of N in the denominators of the cosine arguments. Equivalently, DCTs of types I-IV imply boundaries that are even/odd around either a data point for both boundaries or halfway between two data points for both boundaries. DCTs of types V-VIII imply boundaries that even/odd around a data point for one boundary and halfway between two data points for the other boundary. However, these variants seem to be rarely used in practice. One reason, perhaps, is that FFT algorithms for odd-length DFTs are generally more complicated than FFT algorithms for even length DFTs (e.g. the simplest radix-2 algorithms are only for even lengths), and this increased intricacy carries over to the DCTs as described below. (The trivial real-even array, a length-one DFT (odd length) of a single number a, corresponds to a DCT-V of length N=1.)

Advantages: 1. DCT transform is a pretty good technique for image compression. Correctly use the advantage that provide by DCT is the key to achieve good result while keep a good compression ratio. 2. The small size DCT is suitable for mobile applications using low power devices as fast Computation speed is required for real time applications. 3. Low complexity and high fidelity image compression using fixed threshold method.

DEPARTMENT OF ECE

22

ANURAG ENGINEERING COLLEGE

4. DCT is real-valued and provides a better approximation of a signal with fewer coefficients. 5. DCT namely simplicity, satisfactory performance, and availability of special purpose hardware for implementation. 6. The DCT is a widely used transformation in transformation for data compression. It is an orthogonal transform, which has a fixed set of (image independent) basis functions, an efficient algorithm for computation, and good energy compaction and correlation reduction properties. 7. The DCT is fast. It can be quickly calculated and is best for images with smooth edges like Photos with human subjects. 8. DCT algorithms are capable of achieving a high degree of compression with only minimal loss of data. This scheme is effective only for compressing continuous-tone images in which the differences between adjacent pixels are usually small.

Properties of DCT:

Some properties of the DCT which are of particular value to image processing applications: a) De-correlation: The principle advantage of image transformation is the removal of redundancy between neighboring pixels. This leads to uncorrelated transform coefficients which can be encoded independently. It can be inferred that DCT exhibits excellent de-correlation properties. b) Energy Compaction: Efficacy of a transformation scheme can be directly gauged by its ability to pack input data into as few coefficients as possible. This allows the quantizer to discard coefficients with relatively small amplitudes without introducing visual distortion in the reconstructed image. DCT exhibits excellent energy compaction for highly correlated images. The discrete cosine transforms is a technique for converting a signal into elementary frequency components. It represents an image as a sum of sinusoids of varying magnitudes and frequencies. With an input image, x, the DCT coefficients for the transformed output image, are computed according to Equation.1 shown below. In the equation, x, is the input image having N

DEPARTMENT OF ECE

23

ANURAG ENGINEERING COLLEGE

x M pixels, x (m, n) is the intensity of the pixel in row m and column n of the image, and y (u, v) is the DCT coefficient in row u and column v of the DCT matrix.

* (

(3.6)

where; {

(3.7)

The image is reconstructed by applying inverse DCT operation according to Equation. 2

(3.8) The popular block-based DCT transform segments image non-overlapping blocks and applies DCT to each block. This results in giving three frequency coefficient sets: low frequency sub-band, mid-frequency-sub-band and high frequency sub-band. DCT-based watermarking is based on two facts. The Robust Digital Image Watermarking Based DCT first fact is that much of the signal energy lies at low-frequencies sub-band which contains the most important visual parts of the image. The second fact is that high frequency components of the image are usually removed through compression and noise attacks. The watermark is therefore embedded by modifying the coefficients of the middle frequency sub-band so that the visibility of the image will not be affected and the watermark will not be removed by compression.

DEPARTMENT OF ECE

24

ANURAG ENGINEERING COLLEGE

Like other transforms, the Discrete Cosine Transform (DCT) attempts to de-correlate the image data. After de-correlation each transform coefficient can be encoded independently without losing compression efficiency. The DCT represents an image as a sum of sinusoids of varying magnitudes and frequencies .The DCT has the property that, for a typical image, most of the visually significant information about the image is concentrated in just a few coefficients of the DCT .The DCT is at the heart of the international standard lossy image compression algorithm known as JPEG .Place the watermark in perceptually significant spectrum (for robustness).

3.4 TWO-DIMENSIONAL DCT


The Discrete Cosine Transform (DCT) is one of many transforms that takes its input and transforms it into a linear combination of weighted basis functions. These basis functions are commonly the frequency. The 2-D Discrete Cosine Transform is just a one dimensional DCT applied twice, once in the x direction, and again in the y direction. One can imagine the computational complexity of doing so for a large image. Thus, many algorithms, such as the Fast Fourier Transform (FFT), have been created to speed the computation.

The DCT equation (Eq.1) computes the i, jth entry of the DCT of an image. ( ) ( ) ( ) ( ) ( [ ) ] [ ( ) ]

(3.9) ( ) { (3.10) p (x, y) is the x,yth element of the image represented by the matrix p. N is the size of the block that the DCT is done on. The equation calculates one entry (i, j th) of the transformed image from the pixel values of the original image matrix. For the standard 8x8 block that JPEG

DEPARTMENT OF ECE

25

ANURAG ENGINEERING COLLEGE

compression uses, N equals 8 and x and y range from 0 to 7. Therefore D (i, j ) would be as in Equation (3). ( ) ( ) ( ) ( ) [ ( ) ] ( [ ) ] (3.11) Because the DCT uses cosine functions, the resulting matrix depends on the horizontal and vertical frequencies. Therefore an image black with a lot of change in frequency has a very random looking resulting matrix, while an image matrix of just one color, has a resulting matrix of a large value for the first element and zeroes for the other elements.

3.5 SUB BAND DCT


Sub band DCT has been introduced by Jung and Mitra back in 1996 [6]. It is a combination of both wavelets and the Discrete Cosine Transform (DCT). The original image is filtered and sub sampled by means of a set of high pass and low pass filters called QMF (Quadrature Mirror Filters). Each filter is independently applied in each direction of the image. There can be four combinations of filtering thus leading to four bands for each decomposition level. For each LL band (low pass filtered in directions, vertical and horizontal) we may add another level of decomposition. Finally each of the resulting bands is transformed by using the well known DCT transform.

Two issues rise almost immediately in such a coding scheme; the number of decomposition levels and the kind of wavelet to be used. To deal with the first issue, we tried different numbers of decomposition levels, namely 1, 2 and 3. Our results didnt reveal any significant improvement in detection for more than one decomposition levels, while at the same time; the image degradation was becoming noticeable. After making the decision of decomposing in one level with four bands, we also decided to use the Haar wavelet because of its simplicity. Of course that does not exclude other families of wavelets (e.g. Daubechies) which can be used as well. Next we have to perform the DCT in each of the resulting frequency bands.

DEPARTMENT OF ECE

26

ANURAG ENGINEERING COLLEGE

3.6 DIGITAL WATER MARKING BASED ON TWO LEVELS DCT


In recent years, many digital watermarking techniques have been proposed to protect the copyright of digital multimedia data. Watermark embedding is performed in many domains such as spatial, Fourier transform, and discrete cosine transform (DCT) and Wavelet. One of the commonly used domains for embedding a watermark in an image is the (DCT). DCT splits up the image into the frequency bands, so the watermark can be embedded in the most important frequencies. Furthermore, the sensitivity of human visual system to DCT frequencies has been extensively studied; which resulted in the recommended JPEG. These results can be used for predicting and minimizing the visual impact of distortion caused by the watermark. Further more, the block-based DCT is widely used for image and video compression. If we know the image compression domain, for example DCT, then it is better to embed watermark in those DCT coefficients which are unlikely to be discarded. Since we are able to anticipate which DCT coefficients will be quantized by the compression scheme, we can choose not to embed the watermark in those coefficients. This approach can be extended to compression methods in other domains. Furthermore, it is a common practice to use additive noise for watermark embedding and the correlation techniques for detection. In a watermarking technique is provided in which a watermark is embedded as pseudo-random noise sequences into middle-frequency range of the image. The goal of this paper is to develop a watermarking algorithm based on DCT and spread spectrum communications in such a way that it is highly robust with respect to JPEG compression and also additive Gaussian noise. Compared with similar works, our method provided the highest robustness for extracted watermark especially when JPEG compression was applied to the watermarked image. In addition, this high level of robustness did not decrease its PSNR. The rest of paper is structured as follows. The spread spectrum communications watermarking is introduced. Then a new watermarking method is proposed. The performance of the proposed watermarking method is evaluated by applying various attacks including JPEG compression and adding Gaussian noise on the watermarked images. we conclude our method.

DEPARTMENT OF ECE

27

ANURAG ENGINEERING COLLEGE

3.7 DISCRETE WAVELET TRANSFORM


The Wavelet Transform (WT) is a technique for analyzing signals. It was developed as an alternative to the short time Fourier Transform (STFT) to overcome problems related to its frequency and time resolution properties. More specifically, unlike the STFT that provides uniform time resolution for all frequencies the DWT provides high time resolution and low frequency resolution for high frequencies and high frequency resolution and low time resolution for low frequencies. In that respect it is similar to the human ear which exhibits similar timefrequency resolution characteristics. The Discrete Wavelet Transform (DWT) is a special case of the WT that provides a compact representation of a signal in time and frequency that can be computed efficiently. The DWT is defined by the following equation:

( )

) (3.12)

where is a time function with finite energy and fast decay called the mother wavelet. The DWT analysis can be performed using a fast, pyramidal algorithm related to multi rate filter banks. As a multi rate filter bank the DWT can be viewed as a constant Q filter bank with octave spacing between the centers of the filters. Each sub band contains half the samples of the neighboring higher frequency sub band. In the pyramidal algorithm the signal is analyzed at different frequency bands with different resolution by decomposing the signal into a coarse approximation and detail information. The coarse approximation is then further decomposed using the same wavelet decomposition step. This is achieved by successive high pass and low pass filtering of the time domain signal and is defined by the following equations: , , - , (3.13)

DEPARTMENT OF ECE

28

ANURAG ENGINEERING COLLEGE

, - ,

(3.14)

Where

[k],

[k] are the outputs of the high pass (g) and low pass (h) filters,

respectively after sub sampling by 2. Because of the down sampling the number of resulting wavelet coefficients is exactly the same as the number of input points. A variety of different wavelet families have been proposed in the literature. In our implementation, the 4 coefficient wavelet family (DAUB4) proposed by Daubechies is used.

JPEG Compression
The image is divided in 16x16 pixel boxes each is subdivided in 8x8 boxes

The Luminance Y is calculated for each 8x8 box, but the chrominance Cb, Cr is taken from each second row and each second column only, in fact by averaging four values for one result. This is already a compression ratio of two.

Y = 0.299 R + 0.587 G + 0.114 B Cb = - 0.169 R - 0.331 G + 0.500 B Cr = 0.500 R - 0.419 G - 0.081 B (3.15)
DEPARTMENT OF ECE 29

ANURAG ENGINEERING COLLEGE

Y is a substitute for the Luminance (based on inverse gamma-encoded data), but the residual colors Cb and Cr do not have any physical meaning. Then the content of each 8x8 box, which we call here Cxy, altogether 64 values C00 to C77, is treated by the same mathematical algorithm, the Discrete Cosine Transformation DCT. On the next page we see a subset of 64 functions Fmn. F00 is a constant function, F10 has a half-cosine slope in x-direction and F01 in y-direction. F77 is the most complex function, 4 cosine periods in each direction.

Then it has to be calculated how much each function contributes to the discrete landscape Cxy. Result is a set of 64 coefficients Kmn.K00 is the DC- or mean value. K77 the highest frequency content. The DCT is lossless and reversible, besides some minor round-off errors because the coefficients Kmn are stored ShortInt -128 to +127.In any continuous tone image the high frequencies are rare, with a few exceptions here and there. Denoising: Wavelet bases capture efficiently transient parts of signals and images. In particular, orthogonal wavelet bases are optimal for the approximation and denoising of piecewise smooth signals and images with bounded variations. Natural images contain complex structures such as regular edges and oscillating textures. In the image setting, wavelets are sub-optimal to represent both textures and edges. Elongated oriented atoms such as curvelets should be used to capture efficiently cartoon edges. Locally oscillating atoms such as local DCT, brushlets or waveatoms should be preferred to process oscillating oriented textures, best basis denoising. Each of these fixed bases are well suited to process a specific kind of structures in images. A best basis algorithm computes an adapted orthogonal basis within a structured dictionary. This best basis selection is applied to a noisy image to perform an adaptive denoising. This adaptive processing can alleviate some of the difficulties that faces a fixed representation. For instance, a best wavelet 1This work is supported by ANR grant NatImages ANR-08-EMER-009. packet denoising is useful to denoise oscillating textures such as fingerprints by performing an adapted segmentation of the frequency domain.
DEPARTMENT OF ECE 30

ANURAG ENGINEERING COLLEGE

4. IMPLEMENTATION
4.1 EMBEDDED ALGORITHM
In this project, we propose a novel watermarking scheme which is based on low frequencies of DCT transform and spread spectrum watermarking. In this method all the DC components of the block DCT transform of the original image are grouped together to form a pseudo image called DC image. Then each bit of the watermark is scattered through the high frequencies of DCT transform of this DC image.

Fig. 4.1: Water marking Embedding Procedure In other word, each bit is scattered in 64 blocks of the original image. Therefore, we obtain the robustness because of embedding the watermark in low frequency and gain the imperceptibility by scattering the watermark's bit in different block. We then compute the NC4 and PSNR to judge the robustness and the invisibility of the watermarking algorithm (NC and

DEPARTMENT OF ECE

31

ANURAG ENGINEERING COLLEGE

PSNR are defined).The PSNR values for watermarked images are all greater than 38 dB, which is the empirical value for the image without any perceivable degradation.

Without loss of generality, we assume the host image is of size 512x512. BDCT5 is applied on 8x8 non overlapping blocks. Then to embed the watermark, for each 8x8 transformed block of host image, only its DC coefficient is selected out of the 64 DCT coefficients. In each block, DCT coefficient is the most important coefficient which has the largest value. Embedding watermark in DC coefficient makes the watermark robust against any attacks. Those selected coefficients are then mapped into a reduced image which is called low-resolution approximation image (LRAI). Therefore, the size of extracted LRAI is always 1 64 of the host image. For example for 512x512 host images, the size of extracted LRAI is always 64x64 pixels (Fig.1). After extracting LRAI from host image, the extracted LRAI is divided into 8x8 non-overlapping blocks and BDCT of each block is calculated. Then according to the value of watermark bit which is going to be embedded in each block, a pseudo random noise sequence is added to the high frequencies of DCT transform of each 8x8 block of LRAI using equation (1). There are different definitions for high frequencies in a DCT block, but our experiments shows that the definition which is shown in Fig. 1 has low visual impact on watermarked image and also provides more accurate watermark detection. Coefficients in the low and middle frequencies that are copied over to the watermarked LRAI remain unaffected. ( ( ) ) ( ) (4.1)

In (1), L denotes DCT transform of LRAI,

the high band frequencies, k the gain factor,

(x,y) the location of an 8x8 block 5 Block based DCT of LRAI, (u,v) the DCT coefficient in the corresponding 8x8 block of L, and the pseudo random noise sequence according to the value

of i. We should note here that two separate pseudo random noise sequences are used to represent the bit values of 0 and 1.

DEPARTMENT OF ECE

32

ANURAG ENGINEERING COLLEGE

Furthermore, by choosing these two pseudo random noise sequences to be as uncorrelated as possible, we can significantly reduce the rate of false detection. Then each block is inverse-transformed to give us watermarked LRAI. The final step to construct the watermarked image is to replace the DC coefficients of LRAI with their corresponding watermarked ones, and then compute the IDCT transform of each 8x8 block of watermarked LRAI. Since in each block of LRAI only one bit of watermark is embedded, so for a host image of size 512x512, watermark size is limited to 8x8 pixels. In other words, assume the size of host image is 2n 2n , so the size of extracted LRAI will be 2n 3 2n 3 and maximum size of watermark will be 2n 6 2n 6 . Regarding to the watermark size we should note that practically a character string of length 10, or seventy bits, is enough for generation of an identification code and the authentication purpose.

Algorithm: 1. Compute BDCT of host image, 2. Create LRAI, 3. Compute BDCT of LRAI, 4. Embed each bit of Watermark, as a pseudo-random noise sequence into FH coefficients of each 8x8 block of transformed LRAI using (1), 5. Compute IBDCT of watermarked LRAI, 6. Replace the watermarked DC coefficients with the original ones in LRAI, 7. Compute IBDCT of LRAI.

4.2 EXTRACTION ALGORITHM


To detect the watermark, the same pseudo-random noise generator algorithm is seeded with the same key. It is known that using a different key as seed of pseudo-random noise generator will produce a different sequence of random numbers. In this case the extraction algorithm will not detect the watermark pattern. As it was explained in the embedding algorithm, for embedding the watermark we benefit from spread spectrum watermarking technique. In a way that each bit of watermark is encoded as a pseudo-random noise sequence and then it is added to the coefficients of the host

DEPARTMENT OF ECE

33

ANURAG ENGINEERING COLLEGE

image. By using this technique, similar to the proposed method. We use wavelet packets denoising method to extract the noise distortion that was added to the host image in watermark embedding stage. In order to do this, first the watermarked image must be denoised and then by subtracting the denoised image from watermarked image, a new image will be created. This new image indicates the noise that was added to the host image by embedding the watermark. By performing the same actions as explained in embedding algorithm in previous section, the transformed LRAI of difference image is constructed. Then the correlation between blocks of transformed LRAI with both noise patterns related to bit values 0 and 1 are computed. If the higher correlation was obtained with noise pattern 0, then a watermark bit of 0 is detected. A watermark bit of 1 is detected in a similar way. The presence of watermark is detected by comparing the average correlation coefficient of detected watermark with a pre-defined threshold. The watermark is considered to be present if the average correlation is greater than this threshold . The extraction algorithm is given as follows: Algorithm: 1.Denoise watermarked image, 2.Calculate difference image by subtracting denoised image from watermarked image, 3.Do steps 1 through 3 from the Embedding algorithm for difference image, 4.Compute the correlation between each block of transformed LRAI, and both noise patterns for one and zero bits, 5.Choose the noise pattern with higher correlation related to the extracted watermark bit, 6.Compute the average correlation coefficient over all extracted watermark bits, and then compare it with a pre-defined threshold. The Watermark is considered to be present if the average correlation coefficient is greater than the threshold.

DEPARTMENT OF ECE

34

ANURAG ENGINEERING COLLEGE

Fig. 4.2: Watermark extraction procedure 4.3 APPLICATIONS Copyright watermarking Fingerprint watermarking Broadcast watermarking Annotation watermarking Integrity watermarking Data hiding watermarking

4.4 ADVANTAGES Robustness: The watermark should be able to withstand after normal signal processing operations such as image cropping,transformations,compression etc. Imperceptibility: The watermarked image should look like same as the original image to the normal eye.The viewer cannot detect the watermark is embedded in it. Security: An unauthorized person cannot detect ,retrieve or modify the embedded water mark. 4.5 DISADVANTAGES The main disadvantage is hackers cannot know the information but they can destroy the information by cropping the image or scanning etc.
DEPARTMENT OF ECE 35

ANURAG ENGINEERING COLLEGE

5.RESULT ANALYSIS
The input given is an image that is to be watermarked. Along with this image the message that is to be watermarked on that image is given. Once the embedding algorithm is executed the message is watermarked. This watermark is invisible. The message can be retrieved when the watermarked image is decrypted the message and image can be separated.
Embedding

Fig 5.1 Cover image This is the cover image in which the data is to be embedded and then the image is transmitted.

DEPARTMENT OF ECE

36

ANURAG ENGINEERING COLLEGE

Fig 5.2 Watermark to be embedded This the actual data supposed to transmit or the data which is to be embedded into an image.

DEPARTMENT OF ECE

37

ANURAG ENGINEERING COLLEGE

Fig 5.3 Watermarked Image After embedding the original information above image is obtained and this is supposed to be transmitted

DEPARTMENT OF ECE

38

ANURAG ENGINEERING COLLEGE

Recovery

Fig 5.4 Input Watermarked Image This is the watermarked image received and now from this image the actual information is to be recovered.

DEPARTMENT OF ECE

39

ANURAG ENGINEERING COLLEGE

Fig 5.5 Denoised image This is the denoised image that means noise is removed from the image after receiving the watermarked image.

DEPARTMENT OF ECE

40

ANURAG ENGINEERING COLLEGE

Fig 5.6 Difference image This is the difference image we obtain this by subtracting watermarked image and denoised image.

DEPARTMENT OF ECE

41

ANURAG ENGINEERING COLLEGE

Fig 5.7 Extracted Watermark This is the watermark recovered from the watermarked image.

DEPARTMENT OF ECE

42

ANURAG ENGINEERING COLLEGE

6.CONCLUSION
In this project, we conclude that a DCT-based blind watermarking scheme based on spread spectrum communications. The low frequency nature of the proposed algorithm makes the embedded watermark very robust to common image manipulations such as filtering, scaling, compression and malicious attacking. By anticipating which coefficients would be modified by the subsequent transform and quantization, we were able to produce a watermarking technique which to the best of our knowledge has the highest resistance to JPEG compression compared with well known similar works.

DEPARTMENT OF ECE

43

ANURAG ENGINEERING COLLEGE

7.FUTURE SCOPE
This image watermarking technique can be further applied for videos in order to obtain robustness and security as well as copyright protection for videos.

DEPARTMENT OF ECE

44

ANURAG ENGINEERING COLLEGE

8.REFERENCES
1. Lu C.-S., "Multimedia Security: Steganography and Digital Watermarking Techniques for Protection of Intellectual Property", Idea Group Publishing, 2005, ISBN: 1-59140-192-5. 2. Katzenbeisser S. and Petitcolas A.-P., "Information Hiding Techniques for Steganography and Digital Watermarking," Artech House, January 2000, ISBN: 1580530354. 3. Voloshynovskiy S. and Deguillaume F., "Information-Theoretic Data-Hiding: Recent Achievements And Open Problems", International Journal of Image and Graphics, Vol. 5, No.1,p.536, 2005 4. P. Meerwald, A. Uhl, A Survey of Wavelet-Domain Watermarking Algorithms, EI San Jose, CA, USA, 2001 5. Cox I. J., Miller M. L., "The First 50 years of Electronic Watermarking", Journal of Applied Signal Processing, vol.2, Issue 2, p. 126, 2002. 6. Fei C., Kundur D. and Kwong R., "Analysis and Design of Watermarking Algorithms for Improved Resistance to Compression", IEEE Trans. on Image Processing, Vol. 13, No.2, p.760771, 2004. 7.Langelaar G., Setyawan I. and Lagendijk R., "Watermarking digital image and video data: A state-of-the-art overview," IEEE Signal Processing Magazine, vol. 17, no. 5, p. 20-46, September 2000 8. Cox I.J., Kilian J., Leighton T., Shamoon T., "Secure spread spectrum watermarking for multimedia", IEEE Trans. on image processing, vol. 6, no. 12, p. 1673, 1997. 9. Ashourian, M., Enteshari, R., Jeon , J., "Digital Watermarking of Three-dimensional Polygonal Models in the Spherical Coordinate System", Proc. of the IEEE Computer Graphics International (CGI'04), 2004 10. Pan Z., Li L., Zhang M. and Zhang D., "Watermark Extraction by Magnifying Noise and Applying Global Minimum Decoder", IEEE Proceedings of the 3rd International Conference on Image and Graphics (ICIG04), p. 349 - 352, 2004. 11. Taherinia A.H., Jamzad M., "Two level DCT based digital watermarking", Proc. of 13th International Conference on Systems, Signals & Image Processing (IWSSIP'06), September
DEPARTMENT OF ECE 45

ANURAG ENGINEERING COLLEGE

2006, Budapest, Hungary

12. Peticolas A.-P., Anderson R.-J., and Kuhn M.-G., "Attacks on copyright marking systems", In 2nd Workshop on Information Hiding, Portland, Oregon, April 1998 13. Pereira S., Voloshynovsky S., Madueo M., Marchand-Maillet S.and Pun T., Second generation benchmarking and application oriented evaluation, Information Hiding Workshop, April 2001,PA, USA. 14. Meerwald P., "Digital image watermarking in the wavelet transform domain", Master's Thesis, Salzburg University,Salzburg, Austria, January 2001 15. Taherinia A.H., "Improving Watermarking Robustness against Different Types of Noise and Compression", Master's Thesis (inPersian), Sharif University of Technology, Tehran, Iran, September 2006. 16. Simoncelli E. and Adelson E. H., "Subband image coding with three-tap pyramids [EPIC]", Picture Coding Symposium, p.143-192,Cambridge, MA. Mar, 1990.

DEPARTMENT OF ECE

46

ANURAG ENGINEERING COLLEGE

APPENDIX
A: Introduction to MATLAB MATLAB is a high performance language for technical computing. It integrates computation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation. Typical uses include Math and computation Algorithm development Data acquisition Modeling, simulation, and prototyping Data analysis, exploration, and visualization Scientific and engineering graphics Application development, including graphical user interface building

MATLAB is an interactive system whose basic data element is an array that does not require dimensioning. This allows you to solve many technical computing problems, especially those with matrix and vector formulations, in a fraction of the time it would take to write a program in a scalar non interactive language such as C or Fortran. The name MATLAB stands for matrix laboratory. MATLAB was originally written to provide easy access to matrix software developed by the LINPACK and EISPACK projects. Today, MATLAB engines incorporate the LAPACK and BLAS libraries, embedding the state of the art in software for matrix computation. MATLAB has evolved over a period of years with input from many users. In university environments, it is the standard instructional tool for introductory and advanced courses in mathematics, engineering, and science. In industry, MATLAB is the tool of choice for highproductivity research, development, and analysis. MATLAB features a family of add-on application-specific solutions called toolboxes. Very important to most users of MATLAB, toolboxes allow you to learn and apply specialized

DEPARTMENT OF ECE

47

ANURAG ENGINEERING COLLEGE

technology. Toolboxes are comprehensive collections of MATLAB functions (M-files) that extend the MATLAB environment to solve particular classes of problems. Areas in which toolboxes are available include signal processing, control systems, neural networks, fuzzy logic, wavelets, simulation and many others. The MATLAB system: The MATLAB system consists of five main parts: Development Environment: This is the set of tools and facilities that help you use

MATLAB functions and files. Many of these tools are graphical user interfaces. It includes the MATLAB desktop and Command Window, a command history, an editor and debugger, and browsers for viewing help, the workspace, files, and the search path. The MATLAB Mathematical Function Library: This is a vast collection of

computational algorithms ranging from elementary functions, like sum, sine, cosine, and complex arithmetic, to more sophisticated functions like matrix inverse, matrix Eigen values, Bessel functions, and fast Fourier transforms. The MATLAB Language. This is a high-level matrix/array language with control flow statements, functions, data structures, input/output, and object-oriented programming features. It allows both "programming in the small" to rapidly create quick and dirty throw-away programs, and "programming in the large" to create large and complex application programs. Graphics: MATLAB has extensive facilities for displaying vectors and matrices as

graphs, as well as annotating and printing these graphs. It includes high-level functions for two-dimensional and three-dimensional data visualization, image processing, animation, and presentation graphics. It also includes low-level functions that allow you to fully customize the appearance of graphics as well as to build complete graphical user interfaces on your MATLAB applications. The MATLAB Application Program Interface (API): This is a library that allows

you to write C and FORTRAN programs that interact with MATLAB. It includes facilities for calling routines from MATLAB (dynamic linking), calling MATLAB as a computational engine, and for reading and writing MAT files.

DEPARTMENT OF ECE

48

ANURAG ENGINEERING COLLEGE

The diagram below shows the main features and capabilities of MATLAB. MATLABs built in functions provide excellent tools for various applications as already stated. But however, the user is not limited to the built in functions; he can write his own functions in the functions. MATLABs language is ver y easy to learn and to use. There are several optional toolboxes available from the developers of MATLAB. These toolboxes are collections of functions written for special applications such as symbolic computation, Image processing, Statistics, Control system design and Neural Networks. The basic building block of MATLAB is the matrix. The fundamental data type is the array, vectors, scalars, real matrices and complex matrices area ll automatically handled the dimensions of a matrix. MATLAB simply loves matrices and matrix operations. The built-in functions are optimized for vector operations. Consequently, vectorized commands or code run much faster in MATLAB. MATLAB Simulation Platform: What is MATLAB? MATLAB is a high performance language for technical computing. It integrates computation, visualization and programming in an easy to use environment where problems and solutions are expressed in a familiar mathematical notation. Typical uses of MATLAB include: Math and computation Algorithm development Data Acquisition Modeling, Simulation and prototyping Data analysis, exploration and visualization Scientific and Engineering graphics Application development, including graphical user interface building MATLAB features a family of add-on application specific solutions called toolboxes. Very important to most users of MATLAB, toolboxes allow one to learn and apply specialized technology. Toolboxes are comprehensive collection of MATLAB functions(m-files) that extend the MATLAB environment to solve particular classes of problems. Areas in which

DEPARTMENT OF ECE

49

ANURAG ENGINEERING COLLEGE

toolboxes are available include signal processing, control systems, neural networks, fuzzy logic, wavelets, simulation and many others. Desktop tools and development environment: This is the set of tools and facilities that help us to use MATLAB functions and files. Many of these tools are graphical user interfaces. It includes the MATLAB desktop and command window, a command history, an editor and debugger, a code analyzer and other reports, browsers for viewing help, the workspace, files and the search path. The MATLAB mathematical function library: This is a vast collection of computational algorithms ranging from elementary functions like sum, sine, cosine &complex arithmetic, to more sophisticated functions like matrix inverse, matrix Eigen values, Bessel functions and fast Fourier transforms. The MATLAB language: This is a high level matrix language with control flow statements, functions data structures, input-output, and object oriented programming features. It allows both programming in the small to rapidly create quick and dirty throw-away programs, and programming in the large to create large and complex application programs. Starting MATLAB: On Windows platforms, start MATLAB by double clicking the MATLAB shortcut icon on the windows desktop. On UNIX platforms, start MATLAB by typing matlab at the operating system prompt MATLAB desktop: When we start MATLAB, the MATLAB desktop appears, containing tools for managing files, variables and applications associated with MATLAB. The typical schematic of the MATLAB desktop is as follows: Command Window: We use this part of the Desktop to write the executable code of the program. Any program no matter wherever it is written it is executed in the command window. Current Directory: It holds the list of variables, files and folders which are used in the execution of the current program.

DEPARTMENT OF ECE

50

ANURAG ENGINEERING COLLEGE

Workspace: Whenever any executable code is written the files are saved and the default location for saving the files is the workspace of the MATLAB. It holds the files that are saved in the current execution. Quitting MAT LAB: To end the MATLAB session, select File>Exit MATLAB in the desktop or type quit in the command window. We can run a script file named finish.m each time MATLAB quits that for example, executes functions to save the workspace.
Workspace
Command window View or change the current directory

Command history

Fig.1: MAT LAB Command Window

Command History: It holds the history of all the statements that were recently executed on the command window. Figure Window: This window is used to display the figures and plots of the results in MATLAB command window. A detailed discussion on plotting functions is discussed in the further chapters.

DEPARTMENT OF ECE

51

ANURAG ENGINEERING COLLEGE

MATLAB Plotting: MATLAB provides a wide variety of techniques to display data graphically. Interactive tools enable us to manipulate graphs to achieve results that reveal the most information about the data. we can also annotate and print graphs for presentations, or export graphs to standard graphics formats for presentation in web browsers or other media. Creating a Graph: The type of graph we choose to create depends on the nature of the data and what we want to reveal about the data. MATLAB predefines many graph types such as line, bar, histogram and pie graphs. There are also 3 D graphs such as surfaces, slice planes and streamlines. There are two basic ways to create graphs in MATLAB: Use plotting tools to create graphs interactively, Use the command interface to enter commands in the command window (or) create plotting programs

Exploring the data: Once we create a graph, we can extract a specific information about the data, such as numeric value of a peak in the plot, the average value of a series of data or we can perform data fitting. Editing the graph components: Graphs are composed of objects, which have properties that we can change. These properties affect the way the various graph components look and behave. For example, the axes used to define the coordinate system of the graph has properties that define the limits of each axis, the scale, color, etc. the line used to create a line graph has properties such as color, type of marker used at each data point, line style, etc. Annotating the graphs: Annotations are the text, arrows, callouts and other labels added to graphs to help viewers see what is important about the data. We typically add the annotations to the graphs when we want to show others or we want to save them for future references.

DEPARTMENT OF ECE

52

ANURAG ENGINEERING COLLEGE

Adding and removing the figure content: By default, we can create a graph in the same figure window; its data replaces that of the graph that is currently displayed, if any. We can add new data to a graph in several ways. We can manually remove all data, graphics and annotations from the current figure by typing clf in the command window or by selecting clear figure from the figures Edit menu.

Fig. 2: Variables in work space A simple line graph is a suitable way to display x as the independent variable and y as the dependent variable. To do this, select both variables (click to select, and then Shift+click (or) Ctrl+click if variables are not contiguous to select again), and then right-click to display the context menu.

DEPARTMENT OF ECE

53

ANURAG ENGINEERING COLLEGE

Fig. 3: Selecting the plots Select plot(x, y) from the menu. The line graph plots in the figure area. The black squares indicate that the line is selected and you can edit its properties with the Property Editor. Changing the appearance of lines and markers: Change the line properties so that the graph displays only the data point. Use the Property Editor to set following properties: Line to no line Marker to o (circle) Marker size to 4.0 Marker fill color to red

DEPARTMENT OF ECE

54

ANURAG ENGINEERING COLLEGE

Fig. 4 : Changing the appearance of Lines and Markers Modifying the graph data source: We can link graph data to variables in your workspace. When you change the values contained in the variables, you can then update the graph to use the new data without having to create a new graph. Define 50 points between -3 and 3 and compute their sines and cosines: x = linspace(-3*pi,3*pi,50); ys = sin(x);yc = cos(x); Using the plotting tools, create a graph of ys = sin(x): Figure plot tools In the Figure Palette, alternate-click to select x and ys in the Variable pane. Right-click either selected variable or choose plot(x, ys) from the context menu, as the following figure shows.

DEPARTMENT OF ECE

55

ANURAG ENGINEERING COLLEGE

Fig. 5: Modify the above data we can use the Property Editor to change the data that this plot displays: Select the line ys vs x in the Plot Browser or by clicking it. In the Property Editor, select yc in the Y Data Source drop-down menu. Click the RefreshData button;

Fig .6: Refresh Data(a)

DEPARTMENT OF ECE

56

ANURAG ENGINEERING COLLEGE

Providing new values for the data source: Data values that define the graph are copies of variables in the base workspace (for example, x and y) to the XDataand YData properties of the plot object (for example, a lineseries). Therefore, in addition to being able to choose new data sources, you can assign new values to workspace variables in the Command Window and click theRefresh Data button to update a graph to use the new data. x = linspace(-pi,pi,50); % Define 50 points between - and y = sin(x); area(x,y) % Make an area plot of x and y

Fig. 7: Refersh Data(b)

Now, recalculate y at the command line: y = cos(x) Select the blue line on the plot. Select, x as the X Data Source, y as the Y Data Source, and click Refresh Data. The graph's XData and YData are replaced, making the plot look like this.

DEPARTMENT OF ECE

57

ANURAG ENGINEERING COLLEGE

Fig. 8: Modified output Specifying the line styles and colors: It is possible to specify color, line styles, and markers (such as plus signs or circles) when you plot your data using the plot command: plot(x,y,'color_style_marker') The strings are composed of combinations of the following elements: Type Color Values 'c' 'm' 'y' 'r' 'g' 'b' 'w' 'k' Meanings cyan magenta yellow red green blue white black

DEPARTMENT OF ECE

58

ANURAG ENGINEERING COLLEGE

Line style

'-' '--' ':' '.-' no character

solid dashed dotted dash-dot no line

Table A.1: Specifications of color Type Marker type Values '+' 'o' '*' 'x' 's' 'd' '^' 'v' '>' '<' 'p' 'h' no character Meanings Plus mark unfilled circle asterisk letter x filled square filled diamond filled upward triangle filled downward triangle filled right-pointing triangle filled left-pointing triangle filled pentagram filled hexagram no marker

Table A.2: Specifications of operator.

DEPARTMENT OF ECE

59

ANURAG ENGINEERING COLLEGE

B:SAMPLE CODE Embedding Algotithm:


%A Robust Image Watermarking using Two Level DCT and Wavelet Packets Denoising_vs3 % For Colour Images clear all; close all; clc;

bs=8; COVER=imread('lena.jpg'); % nm=uigetfile({'*.jpg;*.png'},'Select an Image'); % COVER=imread(nm); figure(1); imshow(COVER); title('Cover Image'); wm=imread('wm_hi.bmp'); % wm=im2bw(imresize(wm,[8 8])); figure(2); imshow(wm); title('Watermark to be Embedded'); cover=COVER(:,:,1); s1=size(cover); s2=size(wm); msgmax=s1(1)*s1(2)/(bs^2); mes=round(reshape(wm,[s2(1)*s2(2) 1])./255); pdm=ones(1,msgmax); pdm(1:length(mes))=mes; WMI=cover;

k=22; x=1; y=1; % Embedding Process disp('Watermark Embeding Started........'); for kk = 1:length(pdm) % 1. Compute BDCT of host image blks{(y+7)/8,(x+7)/8}=cover(y:y+bs-1,x:x+bs-1); dct_block=dct2(blks{(y+7)/8,(x+7)/8}); BDCT{(y+7)/8,(x+7)/8}=dct_block; % 2. Create LRAI LRAI((y+7)/8,(x+7)/8)=dct_block(1,1);

if (x+bs) >= s1(2) x=1; y=y+bs;

DEPARTMENT OF ECE

60

ANURAG ENGINEERING COLLEGE

else x=x+bs; end end s3=size(LRAI); x1=1; y1=1;

for kk1 = 1:((s3(1)*s3(2))/(bs^2)) u=(y1+7)/8; v=(x1+7)/8; % 3. Compute BDCT of LRAI, LR_blks{u,v}=LRAI(y1:y1+bs-1,x1:x1+bs-1); LR_dct_block=dct2(LRAI(y1:y1+bs-1,x1:x1+bs-1)); LR_BDCT{u,v}=LR_dct_block; LR_dct_block_wm=zeros(size(LR_dct_block));

%4. Embed each bit of Watermark, as a % pseudo-random noise sequence into FH % coefficients of each 8x8 block of transformed LRAI using (EQ- 1) rand('state',double(mes(kk1))) Wi=randint(8,8,[-1 1]); for u1=1:bs for v1=1:bs if u1 <= 5 && v1 <= 5 LR_dct_block_wm(u1,v1)=LR_dct_block(u1,v1); else LR_dct_block_wm(u1,v1)=LR_dct_block(u1,v1)+(k*Wi(u1,v1)); end end end LR_BDCT_WM{u,v}=LR_dct_block_wm; %5. Compute IBDCT of watermarked LRAI LRAI_WM{u,v}=idct2(LR_BDCT_WM{u,v});

if (x1+bs) >= s3(2) x1=1;

DEPARTMENT OF ECE

61

ANURAG ENGINEERING COLLEGE

y1=y1+bs; else x1=x1+bs; end end LRAI_WMI=cell2mat(LRAI_WM);

for i=1:64 for j=1:64 % 6. Replace the watermarked DC coefficients with % the original ones in LRAI BDCT{i,j}(1,1)=LRAI_WMI(i,j); % 7. Compute IBDCT of LRAI IBDCT{i,j}=idct2(BDCT{i,j}); end end figure(3); wim=cell2mat(IBDCT); WIM=COVER; WIM(:,:,1)=wim; imshow(WIM,[]); title('Watermarked Image'); PSNR = psnr(cover,wim); imwrite(uint8(WIM),'wm_image.bmp'); disp('Watermark Embeding Completed.');

Extraction Algorithm:
clear all; close all; wi=im2double(imread('wm_hi.bmp')); figure(1); imshow(wi); title('Input Watermarked Image'); WI=wi(:,:,2); [thr,sorh,keepapp,crit] = ddencmp('den','wp',WI); %Default values for de-noising or compression disp('Watermark Recovery Started........'); WId = wpdencmp(WI,sorh,1,'sym4',crit,thr,keepapp); WID=wi; WID(:,:,2)=WId;

DEPARTMENT OF ECE

62

ANURAG ENGINEERING COLLEGE

figure(2); imshow(WID); title('Denosed Watermarked Image'); % Dim=imabsdiff(WI,WId); Dim=imsubtract(WI,WId); figure(3); imshow(Dim); title('Difference Image'); bs=8; %Block Size s1=size(Dim); msgmax=s1(1)*s1(2)/(bs^2); % msgmax: Maximum Possible Message Length mes=2*ones(64,1); pdm=ones(1,msgmax); % fill watermark to maximum length using 1 padding x=1; y=1; for kk = 1:length(pdm) DI_blks{(y+7)/8,(x+7)/8}=Dim(y:y+bs-1,x:x+bs-1); % transform block using DCT dct_block=dct2(DI_blks{(y+7)/8,(x+7)/8}); DI_BDCT{(y+7)/8,(x+7)/8}=dct_block; DI_LRAI((y+7)/8,(x+7)/8)=dct_block(1,1);

if (x+bs) >= s1(2) x=1; y=y+bs; else x=x+bs; end end s3=size(DI_LRAI);

x1=1; y1=1;

for kk1 = 1:((s3(1)*s3(2))/(bs^2)) u=(y1+7)/8; v=(x1+7)/8; LR_blks{u,v}=DI_LRAI(y1:y1+bs-1,x1:x1+bs-1); % transform block using DCT

DEPARTMENT OF ECE

63

ANURAG ENGINEERING COLLEGE

LR_dct_block=dct2(DI_LRAI(y1:y1+bs-1,x1:x1+bs-1)); LR_BDCT{u,v}=LR_dct_block; % LR_dct_block_wm=zeros(size(LR_dct_block)); rand('state',0) W0=randint(8,8,[-1 1]); R0=min(min(corrcoef(LR_dct_block,W0))); rand('state',1) W1=randint(8,8,[-1 1]); R1=min(min(corrcoef(LR_dct_block,W1))); if R0 > R1 mes(kk1)=0; else mes(kk1)=1; end

if (x1+bs) >= s3(2) x1=1; y1=y1+bs; else x1=x1+bs; end end omes=reshape(mes,[8 8]); figure; imshow(omes); title('Extracted Water Mark') wm=imread('wm_hi.bmp'); NC=nc(wm,omes) disp('Watermark Recovery Completed.')

DEPARTMENT OF ECE

64

Você também pode gostar