Implementation of Adaptive Unsharp Masking as a Pre-Filtering Method for Watermark Detection and Extraction

Digital watermarking has been one of the focal points of research interests in order to provide multimedia security in the last decade. Watermark data, belonging to the user, are embedded on an original work such as text, audio, image, and video and thus, product ownership can be proved. Various robust watermarking algorithms have been developed in order to extract/detect the watermark against such attacks. Although watermarking algorithms in the transform domain differ from others by different combinations of transform techniques, it is difficult to decide on an algorithm for a specific application. Therefore, instead of developing a new watermarking algorithm with different combinations of transform techniques, we propose a novel and effective watermark extraction and detection method by pre-filtering, namely Adaptive Unsharp Masking (AUM). In spite of the fact that Unsharp Masking (UM) based pre-filtering is used for watermark extraction/detection in the literature by causing the details of the watermarked image become more manifest, effectiveness of UM may decrease in some cases of attacks. In this study, AUM has been proposed for prefiltering as a solution to the disadvantages of UM. Experimental results show that AUM performs better up to 11% in objective quality metrics than that of the results when pre-filtering is not used. Moreover; AUM proposed for pre-filtering in the transform domain image watermarking is as effective as that of used in image enhancement and can be applied in an algorithmindependent way for pre-filtering in transform domain image watermarking.


Introduction
Because of the widespread use of the internet, multimedia security has been one of the research subjects for a long time in order to prevent copying and sharing unauthorized contents such as text, audio, image, and video.Therefore, data hiding methods as steganography, cryptography, and watermarking have been developed.
Unlike steganography and cryptography, watermarking is a process that watermark data are embedded into a multimedia content such as text, audio, image, and video in spatial or transform domain so that any attack on that content can be examined by extracted/detected watermark [1].Moreover, in spite of various attacks on watermarked content, ownership can be proven by extracting/detecting by means of minimum degenerated watermark.
Robustness, invisibility, and security are the most important properties expected in any watermarking algorithm.Watermark embedding algorithm (that provides watermark invisibility and security) and watermark extracting/detecting algorithm (that provides robustness against various attacks) complements each other.Therefore, any watermarking algorithm is considered as a whole with its embedding and extracting/detecting steps.
Although watermarking algorithms in the transform domain differ from others by different combinations of transform techniques, it is difficult to decide on an algorithm for a specific application.Embedding any kind of watermark data [Pseudo Random Sequence (PRS), binary sequence, etc.] into any kind of content (gray scale image, RGB image, etc.) can vary from one algorithm to another.Moreover, it is not well under-stood which technique can extract/detect the watermark data in a more efficient way than the others since objective quality metrics [Similarity Ratio (SR), Normalized Correlation (NC), etc.] can differ for different applications.Therefore, instead of developing a new watermarking algorithm with different transform techniques and comparing the performance to other algorithms reported in the literature, our motivation is to propose an algorithm-independent pre-filtering method for all existing and future proposed algorithms to enhance their performance.For this purpose, Adaptive Unsharp Masking (AUM) is used in order to extract/detect the watermark in a more effective way.
The rest of this paper includes the following sections.Section 2. gives the principles of Unsharp Masking (UM) and AUM in detail.Section 3. explains how to use UM and AUM in watermark extraction/detection.In Section 4. , experimental results of the MATLAB R implementation of UM and AUM for other techniques mentioned in the literature are presented in a comparative way.Finally, Section 5. concludes this work.

Principles of Adaptive Unsharp Masking
By the UM technique as seen in Fig. 1, the input image x(n, m) can be enhanced by adding scaled linear high pass filter output [z(n, m)] to the input and thus, the enhanced image can be obtained as y(n, m) [2]. x(n,m) As seen in Eq. ( 1), UM technique has a simple structure and is useful for many applications.
However, there are mainly two disadvantages of UM: First one is that UM technique causes distortion in the uniform areas on the images and that it increases noise sensitivity [3].The other one is that UM technique enhances the areas with high contrast level much more than the areas with other contrast levels (e.g.medium and high).Thus, the resulting image obtained can be too artificial [3].AUM technique overcomes the noise sensitivity and artificiality problems in UM.
The differences between the UM and the AUM techniques are the selection of updated coefficients λ and the filter characteristics.Thus, UM technique represented in Eq. ( 1) is obtained for AUM technique as given in Eq. ( 2) [2].
Threshold Levels The scaling vector is updated by using the feedback structure with Gauss Newton algorithm [5] as shown in Fig. 2 and in Eq. ( 6), where µ is the convergence rate of adaptive filter; e(n, m) is the error, R is the estimation of autocorrelation matrix of the input vector to adaptive filter and G is the input vector to the adaptive filter [2].

Application of AUM for the Purpose of Efficient Watermark Extraction and Detection
Recent studies prove that pre-filtering process can be used to extract/detect the watermark from corrupted watermarked image in a more efficient way [9], [10], [11] and [12].Authors in [9] applied pre-filtering for possibly attacked watermarked images before extraction/detection process with correlation computation.Thus, they achieved detecting the watermark in the light of statistical communication and detection theory in a more efficient way.Authors in [10] showed that applying blurring filters to possibly attacked watermarked image before watermark detection process increases the probability of detection.Because blurring filters compress high-frequency components, experimental results in [10] show that watermark is extracted/detected efficiently in case the original image has dominant low-frequency content and watermark is embedded in those components.Thus, higher peak signal-to-noise ratio values can be obtained.Authors in [11] also explained that pre-filtering can be applied before obtaining correlation value in order to increase watermark extraction/detection performance detection.Hence, this action decreases the possibility of the error as minimum as possible.Adding white Gaussian noise [13] and Gauss-tailed nonlinear zeromemory DCT-based approach [14] are other studies about the application of pre-filtering for watermarking applications.Authors in reference [12] applied UM technique before watermark extraction/detection step.Thus, high-frequency components can be emphasized, and the difference between watermarked and unwatermarked areas become more manifest [12].
As an image enhancement technique, UM already sharpens possibly attacked and distorted the image and thus, this technique gives less satisfactory results for the images which have high-frequency components watermarked.Therefore, in this study, AUM is proposed as an alternative and successful solution against UM for the first time in the literature.Unlike UM, AUM technique uses an adaptive technique by Gauss-Newton algorithm.For the areas with low contrast level (uniform areas), there is no sharpening.For the areas with medium contrast level, there is an enhancement close to the areas with high contrast levels.In AUM, high contrast level are partially enhanced [8].
The pre-filtering block is placed between "watermark embedding block" and "watermark extraction/detecting block" as seen in Fig. 3. Figure 3 shows that AUM is applied in an algorithm-independent fashion.

Watermark Extracting/ Detecting
Extracted/Detected Watermark Key Fig. 3: Block diagram of pre-filtering process for a watermarking algorithm.

Experimental Results
In order to show the effectiveness of AUM in watermark detection (PRS watermark data) and extraction (binary and visible logo), we picked the studies in [15] and [16] respectively.The study in [15] has been chosen because it has received more than 2.000 citations and it is the fundamental DCT-based watermarking algorithm serving as a benchmark in the light of spread spectrum approach with PRS.On the other hand, the study in [16] is one of the latest and most contemporary studies in the concept of embedding a binary and visible logo.
Our novel approach postulates the fact that AUM enhances medium contrast levels much more than high contrast levels.Since transform domain techniques, especially DCT based robust watermarking algorithms often use medium frequency coefficients to embed watermark data; AUM should extract/detect watermark more efficiently due to the fact that the watermark becomes more manifested.(b) Watermarked Peppers image after the algorithm in [15] is applied.
Fig. 7: Peppers images before and after the algorithm in [15] is applied.
Cox et.al. in [15] proposed a secure spread spectrum algorithm based on DCT.In this algorithm, firstly, DCT is applied to the original image.Then, PRS watermark data (mean 0 and variance 1) are embedded into n largest (magnitude) AC coefficients (except DC value).Thus, medium frequency coefficients are partially watermarked.The objective quality metric for watermark embedding in this study is Peak Signal-to-Noise Ratio (PSNR).PSNR is most commonly used as  (c) Watermarked Baboon image after the algorithm in [16] is applied.
Fig. 5: Baboon images nefore and after the algorithm in [16] is applied by using a binary watermark logo.
a measure of quality of reconstruction in image watermarking [17].It is a ratio between the maximum value of a signal and the magnitude of background noise [18].It is most easily defined for an 8-bit gray scale image as shown in Eq. ( 7): where I and IW are gray scale original and watermarked images having M × N pixels respectively.Objective quality metric used for watermark detection in this study is called Similarity (SIM) as shown in Eq. ( 8): where W is the watermark data and W is the extracted one.Figure 7(a) shows original Peppers image and Fig. 7(b) illustrates watermarked image after applying the algorithm in [15] to Fig. 7(a).
After following attacks are applied to watermarked image in Fig. 7(b), distorted and attacked images are obtained as shown in Fig. 4: Filtering (each pixel and its eight neighbours of watermarked image are multiplied by 1/9 and added together, low-pass filter), scaling (resolution is down-scaled by 0.5: 512 × 512 −→  The other algorithm, used to show the efficiency of AUM and to prove its effectiveness in this study, is the algorithm used in [16] based on DCT and inter-block coefficient correlation approach.In this algorithm, firstly, the original image is split into its 8 × 8 subblocks and then DCT is applied to those sub-blocks.Then selected AC coefficient of a sub-block B x,y (i, j) is subtracted from B x+1,y (i, j) which is the AC coefficient placed in the same position of its neighbour B x,y (i, j).This differential value is used to determine the relationship among neighbouring sub-blocks, and thus, is used for binary watermark data embedding.However, subblocks having sharp edges may have greater difference values; therefore updating AC coefficients according to watermark bit is defined depending on a pre-defined threshold value and related region after the coefficient update.Consequently, extracted watermark bit is determined from the difference value and its corresponding region.
In this study, objective quality metric for watermark extraction used in [16] is determined as Similarity Ratio (SR) shown in Eq. ( 9): where S and D represent the number of the same and different pixel values in the compared images respectively.
Figure 5(a) and Fig. 5(b) show original Baboon image (gray level image, 512 × 512) and binary watermark (64 × 64) respectively.Figure 5(c) illustrates watermarked Baboon image after applying the algorithm in [16] to Fig. 5(a).Distorted images are obtained after the attacks applied to watermarked image in Fig. 5(c), as shown in Fig. 6: Filtering (each pixel and its eight neighbours of watermarked image are multiplied by 1/9 and added together, low-pass filter), scaling (resolution is up-scaled by 2: 512×512 −→ 1024 × 1024 −→ 512 × 512), Gaussian noise (adding 0 mean and 0.001 variance noise), histogram equalization (splitting the histogram into equally 128 discrete gray levels), Gamma correction (Gamma coefficient is 2.5, becoming the watermarked image darker), JPEG compression (quality factor is 35 %), contrast adjustment (mapping the intensity normalized values between 0 and 0.73 to the values between 0 and 1 in order to obtain saturated low and high intensities) and salt and pepper noise (noise density is 0.01).All simulations and tests were carried out in MATLAB R .
Before Pre-filtering [16] After UM is applied After AUM is applied Before Pre-filtering [16] After UM is applied Histogram Equalization Salt and Pepper Noise Table 2 summarizes PSNR values for the Peppers image before and after related attacks.Moreover, the table compares SIM values before pre-filtering and after UM or AUM is applied.It is interesting to note that SIM values obtained after applying AUM are higher than that of values obtained without pre-filtering and UM without an exception.These results prove our postulation that AUM enhances medium contrast levels much more than high contrast levels.SR values in Tab. 3 and corresponding extracted watermarks in Fig. 1 show that SR values closer to 1.0 prove that extracted watermark is similar to the original one.This can be achieved by pre-filtering, AUM.For instance, while SR value after filtering is 0.7710, that value increase to 0.8394 by UM and thanks to AUM, SR increases more up to 0.8464 which is closer to 1.0.Moreover, because of the adaptive structure of AUM, results can also be slightly better against disruptive attacks.As a result, AUM provides more suc-cessful and effective way for watermark extraction than the algorithms without pre-filtering and with UM.

Conclusion
Against some kind of attacks, various robust watermarking algorithms have been developed in order to extract/detect the watermark clearly Although UM based pre-filtering is used for watermark extraction/detection, effectiveness of UM may decrease in some attacks since UM uses only one scaling coefficient, and this causes noise sensitivity and extreme artificiality.This study points out that AUM, which is based on variance distribution of the image and update of the scaling coefficient in an adaptively way, can be used for pre-filtering as a solution to the above mentioned disadvantages of UM.After AUM is applied to an image by Gauss-Newton algorithm, there is no enhancement for the areas with low contrast level (uniform areas).For the areas with medium contrast level, there is an enhancement close to the areas with high contrast levels.In AUM, high contrast level are partially enhanced [8].Therefore, especially for the attacks affecting medium frequency coefficients, AUM causes that the watermark becomes more manifest by updating the coefficients recursively using Gauss-Newton algorithm.In addition to the fact that AUM has not been used for the purpose of pre-filtering in watermarking algorithms in the literature yet; comparative experimental results for [15] and [16] show that AUM performs better up to 11 % in objective quality metrics than the results before prefiltering.Experiments also prove that AUM will work for both detection [PRS watermark data as in [15]] and extraction [binary and visible logo as in [16]] processes.Moreover; results show that AUM, which is primarily used for image enhancement, can also be used for prefiltering in transform domain image watermarking in an algorithm-independent way.

Table 3 compares
SR values before pre-filtering and after UM or AUM is applied.Figure2represents extracted watermarks after related attacks corresponding SR values in Tab. 3.
[16] 2: Comparative study on SIM values before pre-filtering and after UM or AUM is applied for the algorithm in[15].Comparative study on SR values before pre-filtering and after UM or AUM is applied for the algorithm in[16].