Journal of Electrical and Computer Engineering

Journal of Electrical and Computer Engineering / 2010 / Article

Research Article | Open Access

Volume 2010 |Article ID 348321 |

Young-Ho Seo, Hyun-Jun Choi, Ji-Sang Yoo, Dong-Wook Kim, "Adaptive Watermarking Scheme Using Biased Shift of Quantization Index", Journal of Electrical and Computer Engineering, vol. 2010, Article ID 348321, 6 pages, 2010.

Adaptive Watermarking Scheme Using Biased Shift of Quantization Index

Academic Editor: Liang-Gee Chen
Received19 Oct 2009
Revised08 Feb 2010
Accepted13 Feb 2010
Published05 May 2010


We propose a watermark embedding and extracting method for blind watermarking. It uses the characteristics of a scalar quantizer to comply with the recommendation in JPEG, MPEG series, or JPEG2000. Our method performs embedding of a watermark bit by shifting the corresponding frequency transform coefficient (the watermark position) to a quantization index according to the value of the watermark bit, which prevents from losing the watermark information during the data compression process. The watermark can be embedded simultaneously to the quantization process without an additional process for watermarking, which means it can be performed at the same speed to the compression process. In the embedding process, a Linear Feedback Shift Register (LFSR) is used to hide the watermark informations and the watermark positions. The experimental results showed that the proposed method satisfies enough robustness and imperceptibility that are the major requirements for watermarking.

1. Introduction

As digital data, especially the image/video data that is the most information-rich, has been used as a commercial media very popularly, the ownership of the digital contents has been major issue to be solved. Digital watermarking has been known as the best solution as the ownership protection technique.

A watermarking scheme mainly consists of two processes: () deciding target data to embed the watermark in (watermark positions) and () embedding watermark data. Both affect the watermarking performance, robustness and imperceptibility. In this paper, we only concern with the embedding method itself, not proposing the watermark positioning method.

The target data to embed watermark in has been transferred from the ones in spatial domain to frequency domain as the watermarking techniques have been developed. A watermark embedded in a frequency domain data has been known to show better robustness against attacks than the spatial domain data. Thus, recent research has focused on the frequency domainwatermarking.Cox et al.[1] proposed watermarking schemes embedding the watermark into the frequency domain based on the Discrete Cosine Transform (DCT).Hsieh et al.[2] used the multiresolution property of the Discrete Wavelet Transform (DWT). The adoption of JPEG2000 [3] as a standard for still image compression technique has speeded up these researches [2, 4].Yasein and Agathoklisproposed a JPEG2000-based watermarking technique that embeds watermark into the lowest subband using error correction code [5]. As 3D (3-dimensional) image and graphics are widely researched recently, watermarking schemes for 3D mesh object have been also proposed [6].

This paper is to propose a watermark embedding method that uses characteristics of a scalar quantization which is commonly used in a data compression technique for 2D images such as JPEG [3], MPEG series [7], and JPEG2000 [3]. That is, the proposed method can be applied to any watermark positioning method complying with such a compression technique. Thus, we do not include a specific watermark positioning scheme here. The purpose of our method is to embed the watermark during the quantization process without additional process for watermarking itself. Quantization is generally used for a lossy compression in JPEG, MPEGs, or JPEG2000 standard. Thus, the speed to perform the watermarking scheme with our method is exactly the same as to perform the data compression process. Another intention of our method is to lose as small as possible watermarked data by quantization robustness. One more purpose of it is to minimize the quality degradation due to watermarking (imperceptibility) by limiting the variance of a coefficient within a half of a quantization step size. Since the watermarking is executed without a special calculation process during quantization, it is possible to minimize the delay time to embed/extract watermark in a realtime.

2. Proposed Watermarking Scheme

Since an image/video is mostly used in a compressed form, one must consider the information loss during the compression process. The main reason is to quantize coefficients, which corresponds to an essential tool for lossy compression. Therefore our research deeply considers the relationship between quantization and watermarking to propose an adaptive watermark embedding scheme.

The quantization in the JPEG, MPEGs, and JPEG2000, the international standards for the still image or motion picture, is a lossy compression process which is executed by dividing a coefficient by a predefined value that is called quantization step size. Equations (1) or (2) shows the quantization process for JPEG/MPEGs and JPEG2000, respectively. where, and are the pixel values at before and after quantization, respectively, with the quantization step size of . Here, the subscript represents a subband or a region resulting from a transformation from a space domain into a frequency domain. Also, round() means the function is to round up to integer, which is the same function to in (2), in which means the largest integer not greater than . is the sign of .

2.1. Watermark Embedding

The proposed scheme uses a biasedshift of a quantized coefficient (or index) according to the watermark value and the coefficient to embed the watermark in. Before embedding the watermark, we scatter the watermark itself for safety. In this paper, we use an ()-bit LFSR whose representative feedback characteristics are expressed by (3) when the watermark data is a 2D data with the size of , which is shown in Figure 1

In this equation, the coefficients () have a set of values to make the polynomial primitive. In Figure 1, each block of is a switch to connect the feedback to the corresponding XOR gate (). In the figure, is the storage element that operates by a clock and its output is one of the outputs of this LFSR. The initial value of the LFSR ( in Algorithm 1) can be arbitrary except all β€œ0” and is used as a secret key in this paper to hide the watermark to an unauthorized person.

Procedure { Watermark_Mix }
input: 2 π‘š Γ— 2 𝑛   original 2D watermark ( 𝑀 ( 𝑖 , 𝑗 ) )
    𝐿 𝐹 𝑆 𝑅 = ( 𝑧 π‘š + 𝑛 βˆ’ 1 , 𝑧 π‘š + 𝑛 βˆ’ 2 , … , 𝑧 1 , 𝑧 0 )
output: 2 π‘š Γ— 2 𝑛   rearranged 2D watermark ( 𝑀 ξ…ž ( 𝑖 , 𝑗 ) )
begin {
  π‘˜ = 1 ;
 for    𝑖 = 0   to   2 π‘š βˆ’ 1 {
  for    𝑗 = 0   to   2 𝑛 βˆ’ 1
    𝑀 ( π‘˜ + + ) = ( 𝑀 ( 𝑖 , 𝑗 ) ) ; }
 initialize LFSR with key ( k e y L F S R ) ;
  𝑀 ξ…ž ( 0 , 0 ) = 𝑀 ( 0 ) ;
 for   𝐼 = 1   to   2 π‘š + 𝑛 βˆ’ 1 {
  apply one clock to LFSR;
   π‘₯ 𝑖 = 𝑧 π‘š + 𝑛 βˆ’ 1 2 π‘š βˆ’ 1 + 𝑧 π‘š + 𝑛 βˆ’ 2 2 π‘š βˆ’ 2 + β‹― + 𝑧 𝑛 + 1 2 1 + 𝑧 𝑛 2 0 ;
   𝑦 𝑖 = 𝑧 𝑛 βˆ’ 1 2 𝑛 βˆ’ 1 + 𝑧 𝑛 βˆ’ 2 2 𝑛 βˆ’ 2 + β‹― + 𝑧 1 2 1 + 𝑧 0 2 0 ;
   𝑀 ξ…ž ( π‘₯ 𝑖 , 𝑦 𝑖 ) = 𝑀 ( 𝑖 ) ; } }
end { Watermark_Mix }

With this LFSR, we composed a data rearrange scheme as shown in Algorithm 1. It first converts the accepted 2D watermark data into a serial data. Then, it is repositioned by the parallel outputs of LFSR such that they are partitioned into two parts to decide the and coordinates.

The proposed watermark embedding scheme directly adjusts the transformed coefficients by considering the quantization scheme and each watermark bit. The data adjustment is performed by a biased shift method shown in (4) or (5), where means the smallest integer not less than ,

If watermarking is not considered, the quantization makes the transformed coefficient the value of the nearest multiple of the quantization step as (1) or (2). Our watermarking scheme shifts this quantized coefficient (QC) or index. The amount and the direction of the shift are determined by the Least Significant Bit (LSB) of the resulting QC and the corresponding watermark bit in the manner that the LSB of the QC would be the same as the watermark bit by using (4) or (5). This process includes four cases, and the processing method for each of them is described in Algorithm 2.

Procedure { Watermark_Embedding }
begin {
 initialize LFSR with a key ( k e y e m b e d ) ;
 for    𝑖 = 0   to   2 π‘š + 𝑛 βˆ’ 1 {
  if    ( L F S R 𝑝 ( 𝑖 ) = ξ…’ 1 ” )   then     {
   if   ( L F B ( ⌊ | π‘Ž 𝑏 ( 𝑒 , 𝑣 ) | / Ξ” 𝑏 ( 𝑒 , 𝑣 ) βŒ‹ ) = ξ…’ 0 ” )   then     {
    if  ( 𝑀 𝑖 = 0 ) then embed 𝑀 𝑖   by (4);
    else       embed 𝑀 𝑖   by (5); }
   if    ( L F B ( ⌊ | π‘Ž 𝑏 ( 𝑒 , 𝑣 ) | / Ξ” 𝑏 ( 𝑒 , 𝑣 ) βŒ‹ ) = ξ…’ 1 ” )   then     {
    if  ( 𝑀 𝑖 = 0 ) then embed 𝑀 𝑖   by (5);
    else       embed 𝑀 𝑖   by (4); } }
  apply one clock to LFSR; }
end { Watermark_Embedding }

With this watermarking process, the maximum amount of shift by watermarking is one quantization step. If the occurrence probabilities of the four cases are the same, the average amount of shift is zero. In Algorithm 2, () means the value of output by applying clocks with the LFSR initial value . Also means the LSB of .

In this paper, we consider one more scheme to hide the watermarking positions with an LFSR, which might be the same to or different from the one to scatter the watermark data. The method is to select some QCs from the mark space, the target domain of the QCs to be watermarked, according to the value from the LFSR. There can be two schemes as follows. Note that it is out of this paper's scope how to select the mark-space.(1)Use a serial output of an LFSR. The output bit stream is matched to the QCs in the mark space and only the QCs whose LFSR bits are β€œ1” are selected as the watermarking positions. This method only embeds in the half of the QCs in the mark space if β€œ0” and β€œ1” have the same occurrence probability in the LFSR output. (2)Use parallel outputs. The value with LFSR outputs is used as the value to skip the QCs in the mark space. That is, if the value is , the next watermark position would be the QC from the previously selected QC. With this method, only 2/(+1) QCs from the mark space would be selected as the watermark positions if each -bit combination by the outputs has the same occurrence probabilities.

Algorithm 2 includes this random selection scheme. Here, only the first method is included such that .

2.2. Watermark Extracting

The embedded watermark is extracted only when the watermark information is required. It should be extracted from the watermarked data without support of the original data since the scheme is blind watermarking. The extraction process of our scheme needs to decide if a watermark bit resides in a specific data and the value of the watermark bit if resides.

Existence of watermark bit is determined using the same LFSR(s) and their initial values as the one(s) used in embedding process. The procedure is exactly the same as in embedding, and it is not mentioned further here. The embedded watermark is extracted only when the watermark information is required. It should be extracted from the watermarked data. The extraction process of our scheme needs to decide if a watermark bit resides in a specific data and the value of the watermark bit if resides.

Existence of watermark bit is determined using the same LFSR(s) and their initial values as the one(s) used in embedding process. The procedure is exactly the same as the one of embedding, and it is not mentioned further, here.

The process to read out the watermark bit is depicted in Algorithm 3. If the transmitted data containing a watermark bit has the value of even (odd) step of quantization, the corresponding watermark bit is β€œ0” (β€œ1”). In a real process, the received content data is dequantized as , where is the quantization step for real compression, and the result is analyzed by (6) where and are arbitrary integer, which decides the extracted watermark bit . Note that Algorithm 3 includes the process to decide existence of a watermark bit when a serial LFSR bit is used. Also, it includes the step to reform the 2D watermark data

Procedure { Watermark_Extraction }
begin {
 initialize LFSR with a key ( k e y e m b e d ) ;
 for    𝑖 = 0   to   2 π‘š + 𝑛 βˆ’ 1 {
  if    ( L F S R 𝑝 ( 𝑖 ) = ξ…’ 1 ” )   then     {
   if ( ⌊ ( π‘Ž 𝑏 ξ…ž ξ…ž ( 𝑒 , 𝑣 ) + Ξ” 𝑏 ( 𝑒 , 𝑣 ) / 2 ) / Ξ” 𝑏 ( 𝑒 , 𝑣 ) βŒ‹ = e v e n )   then
       𝑀 ξ…ž 𝑖 = ξ…’ 0 ”   by (6);
   else     𝑀 ξ…ž 𝑖 = ξ…’ 1 ”   by (6); } }
 initialize LFSR with key ( k e y L F S R ) ;
 for   𝐼 = 1   to   2 π‘š + 𝑛 βˆ’ 1 {
   π‘₯ 𝑖 = 𝑧 π‘š + 𝑛 βˆ’ 1 2 π‘š βˆ’ 1 + 𝑧 π‘š + 𝑛 βˆ’ 2 2 π‘š βˆ’ 2 + β‹― + 𝑧 𝑛 + 1 2 1 + 𝑧 𝑛 2 0 ;
   𝑦 𝑖 = 𝑧 𝑛 βˆ’ 1 2 𝑛 βˆ’ 1 + 𝑧 𝑛 βˆ’ 2 2 𝑛 βˆ’ 2 + β‹― + 𝑧 1 2 1 + 𝑧 0 2 0 ;
   𝑀 ξ…ž ξ…ž ( π‘₯ 𝑖 , 𝑦 𝑖 ) = 𝑀 ξ…ž ( 𝑖 ) ; } }
  apply one clock to LFSR; }
end { Watermark_Extraction }

The extraction process needs only a few decision tasks so that its speed degradation on the decoding time is negligible, even though the watermark is not necessarily extracted in each decoding process.

3. Applying the Proposed Watermarking Scheme

Since the proposed scheme uses the properties of the coefficients in the frequency domain resulting from DCT or DWT and accomplishes the watermarking during scalar quantization, it can be applied into the JPEG/MPEGs or JPEG2000 standards without any modification. It also has inherently an adaptability property for image and video application because it is applicable to a predefined quantizer with any quantizaton step size.

All of JPEG and MPEGs use DCT and scalar quantization for intra- or interframes. Thus our scheme is applicable to any of them because ours concerns only with DCT and quantization. To obtain higher robustness in watermarking on a DCT domain, a DC coefficient which is less sensitive to a frequency change is a good candidate for watermarking [8]. Also watermarking in DC coefficients would degrade less image quality than AC coefficients, which was approved by a quantitative analysis [8]. Thus, we apply the proposed watermarking scheme into the DC coefficients after DCT for experimental purpose, without suggesting a new scheme to find the watermarking positions.

Each of the resulting sub-bands from DWT in JPEG2000 has the spatial information of the original image as well as the corresponding frequency band information. Thus, differently from DCT, one or a few subbands are usually selected to position the watermark. With considering the human visual system and difference in the quantization step in each subband, we predecided the four lowest sub-bands as the mark space candidates. Then, we performed pre-experiments with about 500 test images to see which sub-band is the robust for attacks. In the experiments, 4-level DWT has been performed and JPEG compressions in various strengths were applied as the attack processes. The experimental results are summarized in Table 1. In the table, means a particular sub-band after -level DWT, where () and () are the horizontal and vertical tranformation, respectively, with meaning the result from low- (high-) pass filtering. It shows that the lowest DC subband () is most robust, but usually it does not quantized. Thus, we chose the next robust subband, , as the watermarking sub-band.

JPEG Quality Error ratio (%)
𝐿 𝐿 4 𝐿 𝐻 4 𝐻 𝐿 4 𝐻 𝐻 4

12 0.0 0.0 0.0 0.0
10 0.0 0.0 0.0 0.5
8 0.0 0.3 0.3 20.9
6 0.0 3.6 3.3 34.3
4 2.9 23.8 24.7 55.5
2 1.6 43.0 48.8 69.2
0 36.7 58.2 65.4 76.1

4. Experimental Result

The proposed embedding/extracting schemes and the arbitrarily assumed positioning schemes were implemented in C++ language on Pentium IV 2.0 GHz CPU. For the test, we used about 500 gray-scale images of pixels in size. Among them, we chose Lena image for demonstration because it contains both low and high frequency components. As the watermark, we used a binary image of pixels in size which has a special logo for visual confirmation after extracting it. For visibility information we estimated Peak Signal to Noise Ratio (PSNR). For robustness against attacks to an image the error ratios of the extracted watermarks to the original ones were estimated for various malicious and nonmalicious attacks such as JPEG and JPEG2000 compression in different compression ratios, Gaussian noise addition, sharpening, blurring, and various amounts of cropping.

Figure 2 shows the resulting Lena image example before (31.54 dB in PSNR) and after (31.50 dB) watermarking for JPEG2000, in which the quality degradation (0.04 dB) by watermark is quite negligible. In Table 2, the error ratios of the extracted watermarks after each attack to the images compressed by JPEG or JPEG2000 (J2K) are summarized, where all the ratios are the average values for the 500 test images. It shows that the proposed scheme has an excellent property on robustness for all the considered attacks such that even for the 5 Gaussian noise addition, the error ratio was only 5.5 for JPEG watermarking and 4.7 for JPEG2000 watermarking. In Figure 3, various examples of the extracted watermarks according to their error ratios are shown. As can be seen in the figures, an watermark with error ratio bigger than 15 is hard to recognize.

Attack Error ratio(%)

40 60 0 0
20 40 0 0
0 20 0 0.8

JPEG2000 (bpp) 1 0.3 0
0.5 0.3 0
0.25 0.7 0

Gaussian Noise (%) 3 3.5 1.7
5 5.5 4.3

Sharpening 2.2 0.7

Blurring 2.7 1.3

Cropping (%)10 1.5 1.5
15 3.2 3.8
20 5.7 5.0

To show the excellence of our scheme, we compared the robustness with the algorithm previously proposed by Seo et al. [4] which is the most similar to ours. The results are shown in Table 3, which includes the JPEG attacks and JPEG2000 attacks. This table shows that for all the attacks ours show 45 times better in performance than Yasein's.

AttackError ratio (%)
Yasein's Ours

JPEG quality (%) 60 0 0
40 1 0
20 4 0.8

JPEG2000 (bpp) 0.5 0.5 0
0.4 0.7 0
0.2 14 3.5

5. Conclusion

In this paper, we proposed an adaptive blind watermark embedding/extracting scheme which is applicable for both JPEG/MPEGs and JPEG2000 standard compression technologies. It uses the properties of the scalar quantization to comply the compression technologies such that a watermark bit is embedded by a value-shift method for the frequency transformed coefficients. Also it includes a scheme to select coefficients in the mark space randomly with a LFSR.

Experimental results with about 500 test images showed that the proposed scheme has enough robustness less than the error ratio of 5 and very low visibility of the embedded watermark. Even in comparison with the most similar previous method, ours showed much better performance.

Consequently, we expect the proposed scheme to be used as a good watermarking scheme with an appropriate watermark positioning scheme in the application areas that need high invisibility and robustness against various attacks of the embedded watermark.


This work was supported by the IT R&D program of KEIT. [KI002058, Signal Processing Elements and their SoC Developments to Realize the Integrated Service System for Interactive Digital Holograms.]


  1. I. J. Cox, J. Kilian, F. T. Leighton, and T. Shamoon, β€œSecure spread spectrum watermarking for multimedia,” IEEE Transactions on Image Processing, vol. 6, no. 12, pp. 1673–1687, 1997. View at: Google Scholar
  2. M.-S. Hsieh, D.-C. Tseng, and Y.-H. Huang, β€œHiding digital watermarks using multiresolution wavelet transform,” IEEE Transactions on Industrial Electronics, vol. 48, no. 5, pp. 875–882, 2001. View at: Publisher Site | Google Scholar
  4. Y.-H. Seo, S.-Y. Choi, S.-H. Park, and D.-W. Kim, β€œA digital watermarking algorithm using correlation of the tree structure of DWT coefficients,” IEICE Transactions on Fundamentals of Electronics, Communications and Computer Sciences, vol. E87-A, no. 6, pp. 1347–1354, 2004. View at: Google Scholar
  5. M. S. Yasein and P. Agathoklis, β€œA wavelet-based blind and readable image watermarking algorithm,” in Proceedings of the 36th Asilomar Conference on Signals Systems and Computers, vol. 2, pp. 1215–1219, Pacific Groove, Calif, USA, November 2002. View at: Google Scholar
  6. S. Zafeiriou, A. Tefas, and I. Pitas, β€œBlind robust watermarking schemes for copyright protection of 3D mesh objects,” IEEE Transactions on Visualization and Computer Graphics, vol. 11, no. 5, pp. 596–607, 2005. View at: Publisher Site | Google Scholar
  8. J. Huang, Y. Q. Shi, and Y. Shi, β€œEmbedding image watermarks in DC components,” IEEE Transactions on Circuits and Systems for Video Technology, vol. 10, no. 6, pp. 974–979, 2000. View at: Publisher Site | Google Scholar

Copyright © 2010 Young-Ho Seo et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

More related articles

 PDF Download Citation Citation
 Download other formatsMore
 Order printed copiesOrder

Related articles

We are committed to sharing findings related to COVID-19 as quickly as possible. We will be providing unlimited waivers of publication charges for accepted research articles as well as case reports and case series related to COVID-19. Review articles are excluded from this waiver policy. Sign up here as a reviewer to help fast-track new submissions.