Pixel Value Adjustment for Digital Watermarking Using Uniform Color Space

In this chapter, we propose a pixel adjustment procedure for digital watermarking methods using uniform color space. Many digital watermarking methods use uniform color space due to the convenience of controlling image quality (Yoshiura & Echizen, 2006). However, there is the problem that watermarked RGB integer pixel values in such methods are not quite corresponding to the watermarked real-number pixel values in uniform color space because the color transform between RGB space and uniform color space is non-linear, where we assume that the watermarked RGB integer pixel values are obtained by rounding off the RGB real pixel values transformed from the real pixel values in uniform color space. Note that RGB space means sRGB color space in this chapter. In sRGB color space, each color component is stored as an integer value and the range of pixel values is [0, 255]. This problem often causes erroneous extraction.


Introduction
In this chapter, we propose a pixel adjustment procedure for digital watermarking methods using uniform color space. Many digital watermarking methods use uniform color space due to the convenience of controlling image quality (Yoshiura & Echizen, 2006). However, there is the problem that watermarked RGB integer pixel values in such methods are not quite corresponding to the watermarked real-number pixel values in uniform color space because the color transform between RGB space and uniform color space is non-linear, where we assume that the watermarked RGB integer pixel values are obtained by rounding off the RGB real pixel values transformed from the real pixel values in uniform color space. Note that RGB space means sRGB color space in this chapter. In sRGB color space, each color component is stored as an integer value and the range of pixel values is [0,255]. This problem often causes erroneous extraction.
We have already found that the simple rounding off procedure used in many existing watermarking methods is not enough to control robustness. Then we didn't use the simple rounding off procedure but used RGB neighboring search procedure for calculating watermarked RGB integer pixel values in our watermarking method for uniform color space (Iwata et al., 2010). In RGB neighboring search, firstly we obtain watermarked RGB real-number pixel values from the watermarked real pixel values in uniform color space. Next we obtain eight (= 2 3 ) candidates by rounding up or rounding down each pixel value in R, G and B components. Finally we select suitable one for extracting correct watermark bits. We confirmed that we could improve the robustness by using RGB neighboring search procedure. In fact, RGB neighboring search procedure is the most suitable for watermarking methods using linear color transformations such as YCbCr.
In case of watermarking methods using uniform color space, the most suitable pixel value for extracting correct watermark bits is not always in the eight candidates in RGB neighboring search because color transformation between RGB space and uniform color space is non-linear. Therefore we propose a new pixel value adjustment procedure based on a color transformation table. The color transformation table represents the relationship between RGB integer pixel values and the corresponding real pixel values in uniform color space. It is the advantage by using the color transformation table that we can select the most suitable real-number pixel values in uniform color space from the candidates which correspond to RGB integer pixel values. Note that each candidate can be extracted as the same value as 3 www.intechopen.com the original value even after transforming it into RGB space and then transforming it into uniform color space again. Therefore we can obtain the selected real-number pixel values in uniform color space from watermarked images. We adopt two approaches to use the color transformation table. One is that the color transformation table is applied to watermarked real pixel values in uniform color space after embedding. In this approach, we search the pixel value nearest to the watermarked real pixel value. The other is that the color transformation table is applied to original pixel values in uniform color space before embedding. In this approach, we select the most suitable pixel value for embedding from the set of colors near the original pixel value, where original pixel value means the pixel value of an image which is going to be watermarked but has not yet.
In experiments, we demonstrate the advantage of the proposed pixel value adjustment based on color transformation table by comparing with the simple rounding off procedure and RGB neighboring search procedure. Moreover we demonstrate the advantage of the latter approach described above.
The rest of this chapter consists of six sections. Firstly We describe color spaces in Sec. 2. Next we introduce existing pixel value adjustments and propose a new pixel value adjustment procedure based on color transformation table in Sec. 3. Then we describe two approaches utilizing pixel value adjustments in Sec. 4. Moreover we describe watermarking procedure for evaluating pixel value adjustments in Sec. 5. Then we show and discuss the performance of the proposed pixel value adjustment and the proposed approach in Sec. 6. Finally we conclude this chapter in Sec. 7.

Color spaces
In this section, we describe sRGB color space, XYZ color space and L * a * b * color space in Sec. 2.1, Sec. 2.2 and Sec. 2.3 respectively.

sRGB color space
sRGB color space is a standard RGB color space used for general monitors and so on. In sRGB, one color is composed of red, green and blue components. Each component is represented by an integer value of size 8 bits. The range of each component is [0,255]. Then one color is represented by 24 bits.

XYZ color space
XYZ color space is a color space established by CIE (Commission Internationale de l'Eclairage) in 1931. The transformation of sRGB color space into XYZ color space is as follows (JSA, 2007):

sRGB to XYZ
First we obtain gamma-transformed sRGB color space by the following equations.
where R γ , G γ and B γ are the values in gamma-transformed sRGB color space, and R, G and B are the values in sRGB color space.
Then we obtain XYZ color space from gamma-transformed sRGB color space by the following equations.
where X, Y, Z represents the value of X component, Y component and Z component respectively.

XYZ to sRGB as real-number
The pixel value (X, Y, Z) in XYZ color space can be transformed into the corresponding pixel value (R, G, B) in sRGB color space by the following equations. Note that R, G and B in Eqs.(9) ∼ (11) are not integers but real-numbers. 2.3 L * a * b * color space L * a * b * color space is one of uniform color spaces established by CIE in 1976 (Lab color space, n.d.). In a uniform color space, the distances between colors are fixed based on the perceptual differences between the colors (JSA, 2007;Oyama, 2000).

XYZ to L
The pixel value (X, Y, Z) in XYZ color space can be transformed into the corresponding pixel value (L * , a * , b * ) in L * a * b * color space by the following equations. where where X n , Y n and Z n are coefficients which depend upon the illuminant (for daylight illuminant D65, X n = 95.045, Y n = 100 and Z n = 108.892).

L
The reverse transformation is as follows: where

Pixel value adjustment
In this section, we use L * a * b * color space and RGB color space as pre-transform color space and transformed color space respectively. Let (L * , a * , b * ) be a pixel value in L * a * b * color space and let (R, G, B) be the corresponding pixel value in RGB color space, where the pixel values of pre-transformed color space are real numbers and those of transformed color space are integers. Pixel value adjustments transform (L * , a * , b * ) to (R, G, B) in each manner described in the following sections.

Simple adjustment
where R ′ , G ′ and B ′ are real numbers calculated by the equations. Then R, G and B are obtained by rounding R ′ , G ′ and B ′ off to integers respectively.

Adjustment by RGB neighboring search
by the equations described in Sec. 2 as same as simple adjustment. Next the candidates ξ i (0 ≤ i < 8) are calculated as the following: where ⌊R ′ ⌋ represents the maximum integer which is less than R ′ ,a n d⌈R ′ ⌉ represents the minimum integer which is larger than R ′ . Finally one of the above eight candidates is selected as (R, G, B). The general criterion of this selection is the Euclidean distance between (L * , a * , b * ) and (L

Color transformation table
Color transformation table represents the relationship between RGB integer pixel values and the corresponding real pixel values in uniform color space. In this chapter, we use color transformation table to transform real-number pixel values in uniform color space into the corresponding integer pixel values in RGB color space. The output of color transformation table is the set of real-number pixel values in uniform color space which are near to the input pixel value. Note that all pixels in the set can be transformed without loss into RGB color space because they have the integer pixel values corresponding to themselves in RGB color space.

Adjustment procedure
w h e r eζ i represents a color in uniform color space near to the input (L * , a * , b * ).I nt h es e tZ, the nearest color to the input is ζ 0 , followed in order by ζ 1 , ζ 2 , . . . . Then one of the colors in the set is selected, and is transformed without loss into the corresponding (R, G, B).

Approximate search
Exhaustive search to obtain Z requires extraordinary computational cost. Thus we use the approximate search to obtain Z as follows: The parameters δ and n are fixed, where δ represents the range of approximate search around the input, and T Z represents the minimum number of |Z|.
step6 Sort ζ i in Z so that the Euclidean distance between the input (L * , a * , b * ) and ζ 0 is the shortest, followed in order by ζ 1 , ζ 2 ,....
Finally we obtain the set Z of colors which are near to the input (L * , a * , b * ). All colors ζ i in Z calculated by this approximate search satisfy |L

Approaches to use pixel value adjustment procedures
We adopt two approaches to use the color transformation table. One is that the color transformation table is applied to watermarked real-number pixel values in uniform color In this approach, we search the pixel value nearest to the watermarked real-number pixel value. Generally, simple adjustment and adjustment by RGB neighboring search are also adopt this approach. The other is that the color transformation table is applied to original pixel values in uniform color space before embedding. In this approach, we select the most suitable pixel value for embedding from the set of colors near the original pixel value, where original pixel value means the pixel value of an image which is going to be watermarked but has not yet. The former approach is existing one, and the latter approach is new one we proposed. Figure 1 shows the flow of the former approach described here. This approach is generally used for many existing methods using a uniform color space.

Adjustment after embedding
step1 Original pixels in sRGB color space are transformed into the corresponding original pixels in L * a * b * color space by using the equations in Sec. 2.
step2 Watermarks are embedded into the original pixels in L * a * b * color space. Then the watermarked pixels in L * a * b * color space are obtained.
step3 The watermarked pixels in L * a * b * color space are transformed into the real-number watermarked pixels in sRGB color space by using the equations in Sec. 2.
step4 The real-number watermarked pixels in sRGB color space are adjusted to integers by using the adjustment procedure described in Sec. 3.
Note that the pixel value adjustment used in step4 is irreversible because the real-number watermarked pixels in sRGB color space have difference of maximum size 0.5 from integers. This fact sometimes causes erroneous extraction. The origin of this problem is that the watermarked pixels in L * a * b * color space are calculated without consideration of the existence of the corresponding integer pixels in sRGB color space. Moreover the influence of adjustments from real-number sRGB pixels to integer sRGB pixels on the corresponding pixel values in L * a * b * is not constant because the transformation between L * a * b * and sRGB is non-linear. Figure 2 shows the flow of the latter approach described here. It is a new approach we describe in this chapter.

Fusion of adjustment and embedding
step1 Original pixels in sRGB color space are transformed into the corresponding original pixels in L * a * b * color space by using the equations in Sec. 2. step3 Each watermarked pixel in L * a * b * color space is selected from the set of colors near to the corresponding original pixel in L * a * b * color space so that the watermarked pixel satisfies the watermarking condition according to the watermark. step4 The watermarked pixels obtained in step3 are transformed without loss into the watermarked pixels in sRGB color space.
Note that the transformation in step4 is reversible because the watermarked pixel selected from the set in step3 has the corresponding pixel in integer sRGB color space. This fact causes correct extraction because extractors can obtain the very same watermarked pixel values as embedders produce in L * a * b * color space although the pixels have been transformed into integer sRGB color space.

Watermarking procedure for evaluation
We use the watermarking method proposed by Chou and Wu (Chou & Wu, 2003) to evaluate each pixel value adjustment procedure. In this section, we briefly describe the method. The method proposed by Chou and Wu embeds 3 bits into a pixel in L * a * b * color space.

Embedding procedure
We describe how to embed the i-th watermark vector W i =( w L i , w a i , w b i ) into the i-th pixel value P i =( L i , a i , b i ) in the following, where w L i ∈{ 0, 1} and w a i ∈{ 0, 1} and w b i ∈{ 0, 1} and L i , a i and b i represent the pixel values of L * , a * and b * components respectively. step1 The quantization index q i is calculated from P i by the following equation.
where Q L , Q a and Q b represent the quantizer stepsizes of L * , a * and b * components respectively. Note that this quantization adopts rounding off.
step2 The watermarked quantization index q W i is obtained by the following equation. Here is calculated from q W i by inverse quantization as follows:

Extracting procedure
We describe how to extract the i-th watermark vector W ′ i from the i-th watermarked pixel value P ′ i as follows: step1 The quantization index q ′ i is calculated from P ′ i with the same quantizer stepsizes used for embedding by the following equation.
The i-th watermark vector is extracted by the following equation.

Watermarking condition for latter approach
At step3 in Sec. 4.2, the watermarking condition to select watermarked pixels from the set of colors is arbitrarily decided. Then we decide the watermarking condition based on the watermarking procedure for evaluation as the following equation.
Here ζ i represents the i-th color in the set of colors near to the original pixel in L * a * b * color space, and L * (ζ i ), a * (ζ i ) and b * (ζ i ) represent the pixel values of ζ i in L * , a * and b * components respectively.
We select ζ i which has minimum index i and satisfy Eq.(34) as the watermarked pixel.

Environments
Firstly we investigated the image quality of watermarked images for each pixel value adjustment, that is, simple adjustment, adjustment by using RGB neighboring search, adjustment based on color transformation table after embedding and fusion of adjustment and embedding. In this section, adjustment by using RGB neighboring search, adjustment based on color transformation table after embedding and adjustment based on color transformation with fusion of adjustment and embedding are represented by "RGB neighboring search," "former approach" and "latter approach." Then we confirmed the number of error bits in each pixel value adjustment. Finally we investigated the computational time for former approach and latter approach.
In watermarking procedure, we used Q L = 1.5, Q a = 2andQ b = 2 as the quantizer stepsizes. The watermark is pseudo-random vector sequence of length 65536 (= 256 × 256), where the element of the watermark is 3-dimensional vector as described in Sec. 5. Thus the length of watermark bits is 196608 (= 65536 × 3) bits.
In the proposed adjustment based on color transformation table, we used δ = 2.25, T Z = 1000 and dδ = 0.25. In ideal manner, δ gradually increases for the appropriately fixed T Z and then the appropriate δ is fixed. However this manner requires great computational cost. Thus we fixed δ so that the computational cost is convenient.
We used PSNR for the metric of the amount of change of pixel values in RGB space. PSNR was calculated by the following equation. PSNR = 10 log 10 255 2 MSE (36) where img i and oimg i represent the pixels in one image and the other image respectively.
The CPUs of the personal computer used for this experiment are two Xeon E5520(2.27GHz). We used Java for implementation. The size of the memory of Java Virtual Machine is 4.0GB.

Image quality
Figures 4∼6 show the watermarked images by using RGB neighboring search, former approach and latter approach. We omitted the watermarked images by simple adjustment because they are similar to those by RGB neighboring search. This fact can be confirmed by   Table 2 shows the number of error bits from the watermarked images in each pixel adjustment. The number of error bits of latter approach is the least for all original images, followed in order by that of former approach, RGB neighboring search and simple adjustment.

Number of error bits
The number of error bits of latter approach is theoretically zero. However, there are some cases that there is no color satisfying the watermarking condition in the set of colors near to original pixels in "Aerial," "Airplane," "Parrots" and "Pepper" when δ = 2.25. In such cases, δ should be larger so that there is a color satisfying the watermarking condition in the set for all original pixels, although the computational cost becomes greater. Table 3 shows the computational time [ms] for pixel value adjustment in former approach and latter approach when δ = 2.25. The computational time for simple adjustment and RGB neighboring search is omitted because it is extremely fast compared with that for former approach and latter approach.

Computational time
Compared the computational time of former approach with that of latter approach, former approach is slightly faster than latter approach. However the performance of former approach is almost same as that of simple adjustment and RGB neighboring search. Then it is desirable that the pixel value adjustment based on color transformation table is used by latter approach.  Table 3. Computational time in the pixel value adjustment based on color transformation table of former approach and latter approach when δ = 2.25.

Discussion
Shown in Tab. 1, the PSNRs of latter approach are the highest in all PSNRs. The PSNRs of other three pixel adjustments are similar to each other because they modify pixel values only around the corresponding watermarked pixel values (real-number). From this fact, we guess that the original pixel values in L * a * b * color space are often modified to the watermarked pixel values far from the pixel values which have the corresponding integer pixel values in sRGB color space. Moreover latter approach is more suitable than other pixel value adjustments from viewpoint of less change in L * a * b * color space because the modification of latter approach for watermarking in L * a * b * color space is the least under condition of satisfying the watermarking condition. Then Human Visual System is hard to perceive the degradation by watermarking method adopting latter approach.
Shown in Tab. 2, the number of error bits of latter approach is the least in all pixel value adjustments. In case of "Aerial," "Airplane," "Parrots" and "Pepper," the number of error bits is not zero. Even in such cases, the number of error bits must be zero by increasing δ although the computational time also increases. This result confirms the contribution of fusion of pixel value adjustment and watermarking toward the reduction of erroneous extraction.
Shown in Tab. 3, the computational time for the pixel value adjustment based on color transformation table is very long. Thus the proposed adjustment of latter approach reduces error bits and improves image quality at a computational cost. Note that the computational time for extraction is independent from the pixel value adjustment for watermarking. The computational time for extraction is usual even if the proposed adjustment of latter approach is used for watermarking.
The discussion demonstrates that the proposed adjustment of latter approach contributes to both of few error bits and high PSNRs although the long computational time for watermarking is required.

Conclusion
We have proposed a new pixel value adjustment based on color transformation table for watermarking methods using a uniform color space. The proposed adjustment fuses a pixel value adjustment into a watermarking procedure. This fusion produces both of few erroneous extraction from watermarked images and high PSNRs. We have investigated the image quality of watermarked images and the number of error bits from watermarked images for all pixel value adjustments. Moreover we have investigated the computational time of the pixel value adjustment based on color transformation table. We have confirmed the contribution of the fusion of a pixel value adjustment and a watermarking procedure toward the property of watermarking method using a uniform color space through the experiments and the discussion.
Our future works should be to reduce the computational cost of using color transformation table and to expand color transformation table so as to be able to apply watermarking method using frequency transform. This collection of books brings some of the latest developments in the field of watermarking. Researchers from varied background and expertise propose a remarkable collection of chapters to render this work an important piece of scientific research. The chapters deal with a gamut of fields where watermarking can be used to encode copyright information. The work also presents a wide array of algorithms ranging from intelligent bit replacement to more traditional methods like ICA. The current work is split into two books. Book one is more traditional in its approach dealing mostly with image watermarking applications. Book two deals with audio watermarking and describes an array of chapters on performance analysis of algorithms.