A Color Image Watermarking Scheme Based On Color Quantization
A Color Image Watermarking Scheme Based On Color Quantization
A Color Image Watermarking Scheme Based On Color Quantization
www.elsevier.com/locate/sigpro
A color image watermarking scheme based on color
quantization
Piyu Tsai
a
, Yu-Chen Hu
b;
, Chin-Chen Chang
a
a
Department of Computer Science and Information Engineering, National Chung Cheng University, Chiayi, Taiwan 62107, ROC
b
Department of Computer Science and Information Management, Providence University, Taichung, Taiwan 433, ROC
Received 1 October 2001; received in revised form 12 November 2002
Abstract
Digital watermarking has been widely applied to solve copyright protection problems of digital media relating to illegal
use or distribution. In the past few years, several gray-level image watermarking schemes have been proposed, but their
application to color image watermarking schemes is scarce and usually works on the luminance or individual color channel.
In this paper, a new color image watermarking scheme based on the color quantization technique is proposed. Experimental
results are shown to demonstrate the validity of the proposed scheme. Furthermore, the proposed scheme can be applied to
other multimedia applications that are based on the color quantization technique.
? 2003 Elsevier B.V. All rights reserved.
Keywords: Image watermarking; Color quantization; Pixel mapping; DES
1. Introduction
Due to the nature of digital media and the popularity
of the Internet, illegal operations such as duplication,
modication, forgery, etc. performed on digital media
are easy, fast, and dicult to prevent. These illegal
operations hurt the authors motivation for creative
endeavor. Therefore, the protection of digital media
intellectual property rights has become an urgent mat-
ter. Among various digital media, the image-related
data is very important because the information carried
by image data can be easily observed through human
eyes.
i=1
(h
i
c
ji
)
2
;
where k is the dimensionality of each color in the
palette and c
ji
is the ith dimension of codeword c
j
. Af-
ter nding the index of the closest color in the palette
of each pixel in the original image, the indices of the
corresponding colors in the palette are stored and used
to represent the input image.
2.2. The watermark embedding procedure based on
color quantization
In the proposed watermarking scheme, a host im-
age H is an RGB-color image with M N pixels,
where H = (h
1
; h
2
; : : : ; h
M
N
). The watermark W is
a binary image consisting of w h bits, where W =
(w
1
; w
2
; : : : ; w
w
h
) and w
i
(0; 1). The color palette,
which was generated previously by the Adobe Pho-
toShop version 5.0 with optimal palette selection, is
used in this color quantization technique.
The principal component analysis (PCA) technique
[4] is then performed to reorder the colors in the
palette. The colors in the palette are projected onto the
rst principal component of PCA and sorted with the
projected values. The goal of the PCA technique is to
rearrange the colors in the palette so that the neigh-
boring colors are very similar.
The characteristic of closest similarity benets the
enhancement of quantized image quality in the pro-
posed watermarking scheme. After the PCA technique
is executed to reorder the palette, it can be considered
as two sub-palettes. One sub-palette holds the colors
with odd indices in the palette. The other keeps the
colors with even indices. Two successive colors re-
tain the most similarity among colors and reside in the
sub-palette separately.
The proposed watermark embedding procedure is
imposed on the structure of the pixel mapping proce-
dure in color quantization. In other words, when the
pixel mapping procedure is performed, the watermark
is embedded at the same time. For security consider-
ations, the watermark bits to be embedded can be en-
crypted by the DES encryption procedure before they
are actually embedded. In addition, a pseudorandom
number generator (PRNG) is employed to determine
the positions of the pixels that will be used to embed
these watermark bits.
When the positions of the pixels used to embed the
watermark are determined, the pixel mapping proce-
dure is then performed. In the pixel mapping proce-
dure, the closest color c
min
in the palette with the min-
imum SED for each pixel h
i
is determined. The index
I
i
recording the index of the searched closest color
c
min
in the palette for pixel h
i
and is stored in the color
index table. When the predened pixel h
i
for embed-
ding a watermark bit is encountered, index I
i
of the
searched color will be further processed to embed the
watermark. Otherwise, the pixel mapping procedure
is performed to nd the closest color in the palette for
the next image pixel.
To embed a watermark bit w
i
, there are four possible
cases that can be used to process the index. Fig. 2
shows the overview of processing these four cases of
indexing. First, both the embedding watermark bit w
i
and the searched closest color index I
i
have the same
sign (odd or even). In other words, (w
i
+ I
i
) module
2 equals 0. In this case, I
i
is stored directly. Second,
there is a dierent odd or even sign between w
i
and
I
i
. In other words, (w
i
+ I
i
) module 2 equals 1. To
embed w
i
, another closest color c
next
in the palette
with corresponding index I
next
that satises (w
i
+I
next
)
module 2 equals 0 will be found.
If the distance of the SED between h
i
and
c
next
and the SED between h
i
and c
min
is less
than or equal to threshold , i.e. SED(h
i
; c
next
)
SED(h
i
; c
min
) 6, I
next
is stored. Otherwise, if
SED(h
i
; c
next
) SED(h
i
; c
min
) , a predictive tech-
nique that attempts to reduce the distortion of the
quantized image will be used. The mean value h
mean
of the encoded immediate left h
l
pixel and directly
above h
a
pixel of h
i
will be computed. In other words,
h
mean
=(h
l
+h
a
)=2. If SED(h
i
; h
mean
) SED(h
i
; c
next
),
two special indices 0 and 255 will be stored for
w
i
= 0 and 1, respectively. Otherwise, the index
I
next
of the searched closest color with the same sign
will be stored. After the pixel mapping procedure is
completed, the watermark is embedded into the host
image.
P. Tsai et al. / Signal Processing 84 (2004) 95106 99
Input h
i
,w
i
Is (w
i
+ I
i
) module 2 = 0?
Store I
i
Compute c
next
Store I
next
Calculate h
mean
Is SED(h
i
,c
next
)-SED(h
i
,c
min
) ?
Store 0 or 255 Store I
next
Is SED(h
i
,h
mean
)< SED(h
i
,c
next
)?
Y
Y
N
N
Y
Y
N
Compute c
min
Fig. 2. The ow chart of watermark embedding process.
The watermark embedding algorithm:
Step 1: Perform the DES encryption procedure to
watermark W of wh bits and choose a PRNG to pro-
duce a set of positions of w h pixels for embedding
the watermark.
Step 2: For each pixel h
i
, the closest color c
min
with
index I
i
is chosen using the pixel mapping procedure.
Step 3: When the pixel h
i
is one of the selected
pixels, if (w
i+
I
i
) module 2 equals 0, I
i
will be stored
directly. Go to Step 7.
Step 4: Find another closest color c
next
with index
I
next
in the palette, which satises (w
i+
I
next
) module
2 equals 0. If SED(h
i
; c
next
) SED(h
i
; c
min
) 6, I
next
will be stored. Go to Step 7.
Step 5: Calculate the mean value h
mean
of the en-
coded immediate left h
l
pixel and directly above h
a
pixel of h
i
. If SED(h
i
; h
mean
) SED(h
i
; c
next
), two
special indices 0 and 255 will be stored for w
i
=0 and
1, respectively. Go to Step 7.
Step 6: If SED(h
i
; h
mean
) SED(h
i
; c
next
), I
next
will
be stored
Step 7: If there is any watermark bit to be embed-
ded, go to Step 2.
The proposed watermark embedding procedure
is imposed on the processing of the pixel mapping
procedure. The major dierence is that when each
selected pixel that is encountered, additional com-
putational cost is required to adequately embed the
watermark bit. In this scheme, the watermark bits
are embedded into the color index table, which
the size of index table is not modied. In addi-
tion, the use of the DES encryption procedure and
the PRNG increases the security of the proposed
scheme. It can be easily seen that the proposed
scheme provides better security than other schemes
that employ either the PRNG technique or the cipher
function.
2.3. The proposed watermark extracting process
The proposed watermark extracting procedure is
imposed onto the structure of the image decoding
procedure in the color quantization process. First, the
PRNG determines the positions of image pixels that
were used to embed the watermark bits. In the image
decoding procedure, each entry in the color index
table will be replaced with the corresponding color in
the palette. When an entry containing the watermark
is encountered, the corresponding watermark bit is
extracted before the color replacement is performed.
If the entry value is odd, it means that the embedded
watermark bit is valued one. Otherwise, the em-
bedded watermark bit is valued zero. The extracted
watermark bits are decrypted by the DES decryption
procedure.
The watermark extracting algorithm:
Step 1: Use the PRNG to determine the positions
of entries in the color index table that contains the
watermark bits.
Step 2: If the value of the selected entry is odd,
the extracted watermark bit is set to one. Otherwise,
the extracted watermark bit is valued zero.
Step 3: Perform the DES decryption procedure to
recover the watermark.
100 P. Tsai et al. / Signal Processing 84 (2004) 95106
3. Experimental results
Several simulations were performed on an IBM
compatible Notebook with PIII-850 MHz 128 MB
main memory. Those simulations were used to verify
the validity of the proposed watermarking scheme.
A set of RGB-color images of 512 512 pixels,
Airplane, Baboon, House, Lena, Peppers,
and Sailboat, was used as host images. Two bi-
nary images, CCU and IEEE, each with 64 64
and 128 128 bits, were used as watermarks in the
simulations.
Figs. 3 and 4 show the host images and watermarks
used in the simulations, respectively. For each host im-
age, a corresponding palette was generated by Adobe
PhotoShop version 5.0 with optimal palette selection.
Each palette consisted of 256 colors and was indexed
from0 to 255. Each color in the palette contained RGB
channels.
The PCA technique was employed to sort the col-
ors in the palette that preserved the color similarity.
(a) Airplane (b) Baboon (c) House
(d) Lena (e) Peppers (f) Sailboat
Fig. 3. Six host images of 512 512 pixels.
Furthermore, the DES encryption was performed to
permute the watermark and the PRNG was used to de-
termine the positions of pixels for embedding the wa-
termark. Fig. 5 shows the DES-encrypted watermarks
of the four watermarks shown in Fig. 4. We nd that
the pixels within each encrypted image are quite dif-
ferent.
Fig. 6 shows the results of four watermarked im-
ages of test image Lena of the proposed scheme.
Here, four watermarks as shown in Fig. 5 were
used to generate the four corresponding water-
marked images. According to the results, we nd
that the visual quality of each watermarked image is
good.
To identify the ownership of the watermarked im-
age, the proposed watermark extracting procedure was
performed. Fig. 7 shows the extracted DES-encrypted
watermarks. The extracted DES-encrypted watermark
was then further processed by the DES decryption pro-
cedure. The resultant watermarks after the DES de-
cryption are shown in Fig. 8.
P. Tsai et al. / Signal Processing 84 (2004) 95106 101
Fig. 4. Four watermark images.
(a) 64 64 image (b) 128 128 image (c) 64 64 image (d) 128 128 image
Fig. 5. The DES-encrypted watermark images.
(a) Lena + CCU 64 64 (b) Lena + CCU 128 128
(c) Lena + IEEE 64 64 (d) Lena + IEEE 128 128
Fig. 6. The watermarked images of test image Lena of the
proposed scheme.
To demonstrate the validity of the proposed water-
marking scheme, another example using the test image
Baboon is shown in Fig. 9. The four watermarks as
shown in Fig. 4 were embedded into the test image
Baboon using the proposed scheme to generate the
four corresponding watermarked images. From the re-
sults, we nd that the image quality of the four water-
marked images is quite good. It is hard to distinguish
between the original test image and each of these four
images.
In order to nd out whether the watermarking em-
bedding procedure could cause image degradation,
a set of simulations that performs the basic pixel
mapping procedure was executed. The quantized
images of six host images using the pixel mapping
procedure are shown in Fig. 10. According to the
results shown in Figs. 6, 9, and 10, it is hard for
the human eye to distinguish the dierence between
them.
Furthermore, the experimental results of the image
quality (PSNR) of the color quantized images and the
proposed scheme with dierent watermarks are shown
in Table 1. From the results, it is seen that only a
slight PSNR loss is found in the proposed scheme. In
addition to the PSNR results shown in Table 1, the
results of the execution times of the proposed water-
mark embedding and extracting procedures and the
color quantization technique are shown in Table 2. It
is obvious that the proposed watermarking scheme re-
quires only a little more execution time than the color
102 P. Tsai et al. / Signal Processing 84 (2004) 95106
(a) 6464 image (b) 128128 image (c) 6464 image (d) 128128 image
Fig. 7. The extracted DES-encrypted watermarks.
Fig. 8. The resultant watermarks after the DES decryption procedure.
(a) Baboon + CCU 64 64 (b) Baboon + IEEE 64 64
(c) Baboon + CCU 128 128 (d) Baboon + IEEE 128 128
Fig. 9. The watermarked Baboon images after image decoding.
quantization technique. In other words, the proposed
watermarking scheme is ecient.
To evaluate the robustness of the proposed water-
marking scheme, several attacks including the Gaus-
sian noise addition process, the cropping process, the
JPEG compression process, and the JPEG 2000 com-
pression process have been performed. In the simula-
tions, the size of the watermark is 64 64 bits. Each
color quantized image is rst reconstructed to gener-
ate the decompressed color image. Then the specic
attack is performed on the decompressed color image.
Finally, the color quantization process is executed on
the attacked image to construct the indices.
In the Gaussian noise addition process, 3% and
5% of Gaussian noises are added, respectively. In the
cropping process, one-fourth size of the upper-left de-
coded watermarked image is cropped. In the JPEG
lossy compression process, the decoded watermarked
image is compressed by the JPEG scheme with qual-
ity factors (QF) of 8 and 9 (110 scale), separately.
In addition, the quality factor of 9 is set in the JPEG
2000 compression process. In this simulation, the en-
cryption procedure is not performed to the embedding
watermark.
P. Tsai et al. / Signal Processing 84 (2004) 95106 103
(a) Airplane (b) Baboon (c) House
(d) Lena (e) Peppers (f) Sailboat
Fig. 10. The quantized image taken directly from the original host image.
Table 1
Results of the image quality (PSNR) of the color quantized images and the proposed scheme with dierent watermarks
Watermark
Images Without 64 64 pixels 128 128 pixels 64 64 pixels 128 128 pixels
CCU CCU IEEE IEEE
Airplane 38.6624 38.5525 38.5301 38.5343 38.5364
Baboon 31.8441 31.6974 31.6973 31.6947 31.6963
House 37.4871 37.2685 37.2657 37.2661 37.2651
Lena 36.7206 36.6210 36.6203 36.6227 36.6207
Peppers 33.0681 32.9486 32.9505 32.9497 32.9491
Sailboat 33.0924 33.0501 33.0488 33.0497 33.0482
Experimental results of the error rates of the ex-
tracted watermarks of dierent attacks have been
shown in Table 3. According to the results, it is
seen that the complex images including test images
Baboon, Peppers and Sailboat are much more
robust against most attacks than the smooth images.
On the other hand, the smooth images including
Airplane, House are much fragile to the attacks.
In the proposed scheme, the color palette plays an
important role on the performance of the proposed.
The image quality of the each color quantized image is
highly dependent on the selected colors in the palette.
In addition, the robustness of the proposed scheme
also relies on the design of palette. To understand the
relationship between the robustness of the proposed
scheme and the distribution of the color palette, the
104 P. Tsai et al. / Signal Processing 84 (2004) 95106
Table 2
Results of the execution times (unit: second) of the proposed watermarking scheme and the color quantization technique
Watermark
Images Color 64 64 pixels 128 128 pixels 64 64 pixels 128 128 pixels
Quantization CCU CCU IEEE IEEE
Airplane 5.859 6.379 6.379 6.359 6.620
Baboon 6.249 6.459 6.470 6.449 6.459
House 6.169 6.409 6.410 6.409 6.409
Lena 6.019 6.309 6.310 6.309 6.309
Peppers 6.239 6.449 6.499 6.500 6.500
Sailboat 6.119 6.389 6.640 6.369 6.629
Table 3
Results of the error ratio (units: %) of the extracted watermark of dierent attacks
Attacks
Images Noise Noise Crop JPEG JPEG JPEG 2000
3% 5% 25% QF = 8 QF = 9 QF = 9
Airplane 11.82 33.28 8.18 31.76 18.21 23.78
Baboon 0.59 6.62 18.31 9.08 1.17 34.40
House 10.64 30.98 8.52 43.02 24.83 29.15
Lena 6.86 24.85 8.44 27.30 9.90 21.34
Peppers 0.22 9.64 7.98 18.29 1.86 26.78
Sailboat 0.34 10.01 8.27 14.18 1.83 27.86
distributions of color in each palette design from these
six test images are given in Fig. 11. According to
the results shown in Table 3 and Fig. 11, we nd
that a higher robustness is achieved in the proposed
scheme when the distribution of colors in the palette
is uniform. In other words, to enhance the robustness
of the proposed scheme, this property can be used to
design good color palette.
4. Conclusions
In this paper, a new color image watermarking
scheme based on color quantization is proposed. The
proposed watermark embedding procedure is imposed
on the pixel mapping process of the color quantiza-
tion process. When the pixel mapping procedure is
performed, the watermark is embedded at the same
time. Indeed, the watermark is embedded into the
color index table.
The proposed watermark extracting procedure is
also imposed on the image decoding procedure in
color quantization. It means that the watermark can
be extracted simultaneously while the image decod-
ing procedure is being executed. To increase security,
a product cipher is implemented in this scheme. First,
the DES encryption procedure is employed to permute
the watermark image. Then, the DES-encrypted wa-
termark is embedded into the host image pixels, which
were selected by a PRNG. This product cipher manip-
ulation provides better security than using only one or
the other.
In the proposed scheme, the palette plays an im-
portant role on the quality of the quantized image. In
addition, the palette aects the robustness of the pro-
posed scheme. According to the results, we nd that
the proposed scheme provides a strong robustness for
the images with uniform distribution palette.
According to the experimental results, it is shown
that the proposed scheme not only provides good im-
age quality but also requires very little computational
cost. In addition, the proposed scheme provides a
secure image watermarking approach for the color
quantization technique. In summary, this scheme
P. Tsai et al. / Signal Processing 84 (2004) 95106 105
Fig. 11. Results of the distributions of color palettes of six dierent images.
introduces an eective watermarking approach that
can be applied to other multimedia applications based
on color quantization. To enhance the robustness of
this scheme, we will exploit the global property of
color composition to enhance the robustness of the
proposed scheme.
References
[1] M. Barni, F. Bartolini, V. Cappellini, A. Piva, A DCT-domain
system for robust image watermarking, Signal Processing 66
(3) (1998) 357372.
[2] M. Barni, F. Bartolini, V. Cappellini, A. Piva, Improved
wavelet-based watermarking through pixel-wise masking,
IEEE Trans. Image Process. 10 (5) (2001) 783791.
[3] C.C. Chang, K.F. Hwang, M.S. Hwang, A Digital
watermarking scheme using human visual eects, Informatica
24 (4) (2000) 505511.
[4] C.C. Chang, D.C. Lin, T.S. Chen, An improved VQ codebook
search algorithm using principal component analysis, J. Visual
Comm. Image Representation 8 (1) (1997) 2737.
[5] S.C. Cheng, C.K. Yang, A fast and novel technique for color
quantization using reduction of color space dimensionality,
Pattern Recognition Lett. 22 (2001) 845856.
[6] P. Heckbert, Color image quantization for frame buer
display, Comput. Graph. 16 (3) (July 1982) 297307.
[7] G. Joy, Z. Xing, Center-cut for color-image quantization,
Visual Comput. 19 (1993) 6266.
[8] M. Kutter, F. Jordan, F. Bossen, Digital signature of
color image using amplitude modulation, in: I.K. Sethi, R.
Jain (Eds.), Storage and Retrieval for Image and Video
Databases V, Vol. 3022, SPIE, San Jose, CA, February 1997,
pp. 518526.
[9] W.J. Lin, J.C. Lin, Color quantization by preserving color
distribution features, Signal Processing 78 (2) (1999)
201214.
[10] Y. Linde, A. Buzo, R.M. Gray, An algorithm for
vector quantier design, IEEE Trans. Comm. 28 (1980)
8495.
[11] Z.M. Lu, J.S. Pau, S.H. Sun, VQ-based digital image
watermarking method, IEE Electronics Lett. 36 (14) (July
2000) 12011202.
[12] A. Makur, S. Sethu Selvi, Variable dimension vector
quantization based image watermarking, Signal Processing
81 (4) (April 2001) 889893.
106 P. Tsai et al. / Signal Processing 84 (2004) 95106
[13] A. Piva, F. Bartonlini, V. Cappellini, M. Barnni,
Exploiting the cross-correlation of RGB-channels for robust
watermarking of color image, Proceedings of the IEEE
International Conference on Image Processing, Vol. 1, Kobe,
Japan, October 1999, pp. 306310.
[14] T. Tasdizen, L. Akarun, C. Ersoy, Color quantization
with genetic algorithms, Signal Process.: Image Comm. 12
(January 1998) 4957.
[15] R.G. Van Schyndel, A.Z. Tirkel, N. Mee, C.F. Osborne,
A digital watermark, Proceedings of the IEEE International
Conference on Image Processing, Vol. 2, Austin, USA,
November 1994, pp. 8690.
[16] X. Wu, Color quantization by dynamic programming and
principal analysis, ACM Trans. Graphics 11 (4) (1992)
348372.
[17] X. Wu, I.H. Witten, A fast K-means type clustering
algorithm, Technical Report, Department of Computer
Science, University of Calgary, Canada, 1985.