GRAYSCALE IMAGE WATERMARK DETECTION

A Digital watermarking is a technique that provides a solution to the longstanding problems faced with copyrighting digital data. Digital watermarks are pieces of information added to digital data (audio, video, or still images) that can be detected or extracted later to make an assertion about the data. This information can be textual data about the author, its copyright, etc; or it can be an image itself. Watermarking Based on DCT Coefficient Modulation technique embeds the watermark in the DCT domain to increase the robustness of the watermarking scheme.DCT based watermarking is an example of frequency domain watermarking. The objective of this research work is to implement DCT based watermarking technique on gray scale image. The study focuses on evaluating the robustness of watermarked image after having three different attacks on watermarked image and extraction of watermark from that particular image. To compare the DCT based watermarking with LSB based watermarking and to validate the proposed work & the comparative results of watermarking using DCT and LSB are also presented. This paper recommends DCT based technique for achieving robustness in digital image watermarking.


INTRODUCTION
A large number of digital watermarking schemes have been studied to protect the intellectual property rights of the owner. All these schemes implement either visible or invisible watermarks. Digital watermarking is the process by which an image is coded with an owner's watermark using two general approaches: spatial domain and frequency domain. The spatial domain methods are to embed the watermark by directly modifying the pixel values of the original image. The second is to transform the host image in to its frequency domain representation and embed the watermark therein. Regardless of the embedding method, the embedding technique must satisfy several requirements such as the watermarked image should retain as closely as possible the quality of the original image. The watermark should be robust to various types of attacks.

Copyright protection
The objective is to embed information about the source/owner of the digital media in order to prevent other parties from claiming the ownership of the media.

Fingerprinting
The objective of fingerprinting is to convey information about the recipient of the digital media (rather than the owner) in order to identify every single distributed copy of the media. This concept is very similar to serial numbers of software products.

Copy protection
Watermarking can be used to control data copying devices and prevent them from copying the digital media in case the watermark embedded in the media indicates that media is copyprotected.

Image authentication
The objective is to check the authenticity of the digital media. This requires the detection of modifications to the data.

Classifications of watermarking
A digital watermark is called robust with respect to transformations if the embedded information may be detected reliably from the marked signal, even if degraded by any number of transformations. Typical image degradations are JPEG compression, rotation, cropping, additive noise, and quantization. For video content, temporal modifications and MPEG compression often are added to this list. A digital watermark is called imperceptible if the watermarked content is perceptually equivalent to the original, unwatermarked content. In general, it is easy to create robust watermarks-orimperceptible watermarks, but the creation of robust-andimperceptible watermarks has proven to be quite challenging. There are four factors those are commonly used to determine quality of watermarking scheme. They are robustness, imperceptibility, capacity, and blindness.

Robustness
Watermark should be difficult to remove or destroy. Robust is a measure of immunity of watermark against attempts to image modification and manipulation like compression, filtering, rotation, collision attacks, noise etc.

Imperceptibility
Means quality of host image should not be destroyed by presence of watermark. w w w . c i r w o r l d . c o m It includes techniques that make it possible to embed majority of information.

Blind Watermarking
Extraction of watermark from watermarked image without original image is preferred because sometimes it's impossible to avail original image.

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. The use of cosine rather than sine functions is critical in these applications: for compression, 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 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 transform (MDCT), which is based on a DCT of overlapping data.

Applications of DCT
The DCT, and in particular the DCT-II, is often used in signal and image processing, especially for lossy data compression, most of the signal information tends to be concentrated in a few low-frequency components of the DCT. A related transform, the modified discrete cosine transform, or MDCT is used in AAC, WMA, and MP3 audio compression. DCTs are also widely employed in solving partial differential equations by spectral methods, where the different variants of the DCT correspond to slightly different even/odd boundary conditions at the two ends of the array. The DCT is used in JPEG image compression, MJPEG, MPEG, DV, and Theora video compression. There, the two-dimensional DCT-II of NxN blocks are computed and the results are quantized and entropy coded. In this case, N is typically 8 and the DCT-II formula is applied to each row and column of the block. The result is an 8 × 8 transform coefficient array in which the (0,0) element (topleft) is the DC (zero-frequency) component and entries with increasing vertical and horizontal index values represent higher vertical and horizontal.

RELATED WORK
Several techniques for watermarking have been purposed in the literature some of them are discussed below: In [1] An Improved and Robust DCT based Digital Image watermarking scheme‖ presents a new DCT based additive watermarking scheme which provides higher resistance to image processing attacks mainly JPEG compression. In our approach the watermark is embedded in the mid frequency band of the DCT blocks only in the sub band which is carrying low frequency components and the high frequency sub band components remain untouched.
In [2] A_New_DCT-Based Watermarking Method for Copyright Protection of Digital Audio paper proposes a new audio watermarking method based on Discrete Cosine Transformation (DCT) for copyright protection. In our proposed watermarking method, the original audio is transformed into DCT domain. The absolute values of DCT coefficients are divided into an arbitrary number of segments and the energy of each segment is calculated. Watermarks are then embedded into the selected peaks of the highest energy segment. Watermarks are extracted by performing the inverse operation of watermark embedding process.
In [3] A robust DCT-based watermarking for copyright protection presents A novel technique for embedding watermarks into a host image in the frequency domain is proposed. Unlike the traditional techniques, the method addresses that the watermark is embedded at low frequency. The weighted correction is also used to improve the imperceptibility of the watermark. Moreover the watermark is self-extractable and the algorithm is simple. Experimental results demonstrate that the watermark is robust to various attacks.
In [6] Novel DCT based watermarking scheme for digital images‖ presents There is an ever growing interest in copyright protection of multimedia content, thus digital watermarking techniques are widely practiced. Due to the internet connectivity and digital libraries the research interest of protecting digital content watermarking is extensively researched. In this paper we present a novel watermark generation scheme based on the histogram of the image and apply it to the original image in the transform (DCT) domain.
In [5] Multiple binary images watermarking in spatial and frequency domains proposes a scheme using which more data can be inserted in to an image in different domains using different techniques. This increases embedding capacity.
In [4] An overview of transform domain robust digital image watermarking algorithms is to provide complete overview of digital image watermarking, performance evaluation metrics and possible attacks. The generalized algorithms are presented for DWT, CDMA based, DCT-DWT combined approach.

PROPOSED WORK
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. The use of cosine rather than sine functions is critical in these applications: for compression, it turns out that cosine functions are much more efficient. whereas for differential equations the cosines express a particular choice of boundary conditions. The discrete cosine transform (DCT) helps separate the image into parts (or spectral sub-bands) of differing importance (with respect to the w w w . c i r w o r l d . c o m image's visual quality). The DCT is similar to the discrete Fourier transform: it transforms a signal or image from the spatial domain to the frequency domain

Discrete Cosine Transform
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, y, are computed according to Eq. 1 shown below. In the equation, x, is the input image having N 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.
where The image is reconstructed by applying inverse DCT operation according to Eq. 2: The popular block-based DCT transform segments an image non-overlapping block and applies DCT to each block. These results in giving three frequency sub-bands: low frequency subband, mid-frequency sub-ban and high frequency sub-band. DCT based watermarking is based on two facts. The 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. The basic operation of the DCT is as follows: The input image is N by M; f(i,j) is the intensity of the pixel in row i and column j; F(u,v) is the DCT coefficient in row k1 and column k2 of the DCT matrix. For most images, much of the signal energy lies at low frequencies; these appear in the upper left corner of the DCT. Compression is achieved since the lower right values represent higher frequencies, and are often smallsmall enough to be neglected with little visible distortion. The DCT input is an 8 by 8 array of integers. This array contains each pixel's gray scale level; 8 bit pixels have levels from 0 to 255.

Embedding Watermark
The information to be embedded in gray scale image is called a digital watermark. Watermark is embedded in the coefficients of DCT transformed image. The important consideration is, what locations are best for embedding watermarking in the frequency domain to avoid distortion. It is considered to be better to insert the data in the middle frequency coefficients of the host image.

Algorithm
Step1. Compute the 2-D DCT of the image to be watermarked.
Step3. Create a watermark by generating a K-element pseudorandom sequence of numbers, w1, w2… wk, taken from a Gaussian distribution with µ = 0 and variance is 1.
Step4. Embed the watermark step 3 in to the K largest DCT coefficients from step 2 using the following equation c i ' = c i * (1 + αw i ) 1< I <K for a specified constant α > 0. Replace the original c i with the computed c i ‗from equation as above.
Step5. Compute the inverse DCT of the result from step 4.

Salt & Pepper Noise
Salt and pepper noise is a form of noise typically seen on images. It represents itself as randomly occurring white and black pixels. An effective noise reduction method for this type of noise involves the usage of a median filter, morphological filter or a contra harmonic mean filter. Salt and pepper noise creeps into images in situations where quick transients, such as faulty switching, take place.

Speckle noise
Speckle noise is a granular noise that inherently exists in and degrades the quality of the active radar and synthetic aperture radar (SAR) images. Speckle noise in conventional radar results from random fluctuations in the return signal from an object that is no bigger than a single image-processing element. It increases the mean grey level of a local area. w w w . c i r w o r l d . c o m

Poisson noise
Poisson noise or shot noise is a type of electronic noise that occurs when the finite number of particles that carry energy, such as electrons in an electronic circuit or photons in an optical device, is small enough to give rise to detectable statistical fluctuations in a measurement. It is important in electronics, telecommunications, and fundamental physics. The parameter λ is not only the mean number of occurrences E [K], but also its variance σ k 2 = E [K 2 ]-E[k] 2 . Thus, the number of observed occurrences fluctuates about its mean λ with a standard deviation σ k is root of mean. These fluctuations are denoted as poisson noise or (particularly in electronics) as shot noise.

Extraction of watermark
Step1. Compute the 2-D DCT of the attacked watermarked image.
Step2. Extract the K DCT coefficients and denote the coefficients c 1 ˶ , c 2 ˶ ,……… c k. Step3.Compute the watermark using w i' = c i ˶ -c i for 1<i<K.
Step4 .Measure the similarity of w i' and w i using a metric such as the correlation coefficient.
Step5.Compare the measured similarity, λ, to a predefined threshold, T, and make a binary detection decision D=1 indicates that watermark is present with respect to the specified threshold; D=0 indicates it was not present.

Experimental Results
To verify the effectiveness of the proposed method, a series of experiments were conducted. In these experiments, a set of original images of size 512 x 512 are used. It has been validated by applying algorithm on synthetic image. The following figures show the input image, DCT based watermarked image and watermarked images after applying Salt&pepper attack, Speckle attack and the poisson attack.        From the results shown above, the performance of DCT based watermarking can be compared with the LSB based watermarking technique. Watermarks extracted from the proposed algorithm are comparatively better than the watermarks extracted from the LSB based watermarking technique.

CONCLUSIONS AND FUTURE WORK
In this paper we have presented DCT based watermarking technique for authentication of grayscale image. Watermarks are also extracted after passing through salt & pepper, speckle & poisson attack. Based on the results in the previous chapter, I conclude that DCT based watermarking give best quality extracted watermarks after passing through salt & pepper, speckle & poisson attack. It shows that DCT based watermarking is robust technique. Proposed algorithm is also compared with the existing watermarking technique. Proposed algorithm can be applied on color images & the watermarking image can also color image.

ACKNOWLEDMENT
I am extremely grateful to Assistant Professor Akshay Girdhar, Head of the Department I.T.,GNDEC, LUDHIANA helping in carrying the present work and is acknowledged with reverential thanks. I am extremely grateful to Ms. Kamaljeet Kaur Assistant Professor GNDEC, LUDHIANA. Without the wise counsel and able guidance, it would have been impossible to complete this work in this manner.