Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
CHAPTER 5
REVERSIBLE DATA HIDING BASED ON
HISTOGRAM SHIFTING
98
99
HISTOGRAM PROCESSING
The histogram of a digital image with gray levels in the range
(0, L-1) is a discrete function p(rk) = nk/n, where rk is the kth gray level, nk is
the number of pixels in the image with that gray level, n is the total number of
pixels in the image, and k = 0,1,2 L-1 (Gonzalez 2008).
An estimate of the probability of occurrence of gray level rk is
given by p(rk). A plot of this function for all the values of k provides a global
description of the appearance of the image. The gray levels are concentrated
toward the dark end of the gray scale range. Thus the histogram corresponds
to an image with overall dark characteristics. The opposite is that the
histogram which has a narrow shape indicates little dynamic range and thus
corresponds to an image having low contrast. As all gray levels occur toward
the middle of the gray scale, the image would appear a murkey gray. A
histogram with a significant spread, corresponds to an image with high
contrast.
The properties described are global description say nothing specific
about image content, the shape of the histogram of an image give us useful
information about the possibility for contrast enhancement. The following
100
101
Number of occurrences
Number of occurrences
(a)
Figure 5.1
(b)
5.4
PROPOSED METHOD
5.4.1
Embedding Method
For the wavelet transformed image sub bands histogram is taken.
Now we can start embedding using the following steps. For the selected sub
band, set P = Peak of the histogram coefficients.
102
Create a zero point at P+1 so that no point in the histogram has the
value P+1.To create the zero point shift all coefficients with value P+1 and
above to one position right. This makes P+1 as P+2, and the original P+2 to
P+3 and so on.
1.
2.
3.
4.
5.
6.
7.
While to- be- embedded watermark bits are still remaining, set
P=P+2 and go to step1.Otherwise stop.
watermark
Original Image
Preprocessing &Integer
Wavelet transform
High frequency
sub bands
Unmarked
Approximate
Coefficients
Watermarked
Image
Marked LH, HL
&HH
Coefficients
Inverse IWT
103
Figure 5.2 Shows the original image is decomposed into its sub
bands using integer wavelet transform After preprocessing IWT is used to
ensure complete reversibility. The high frequency sub bands (horizontal,
Vertical and Diagonal) are used for data embedding. Each sub band is used
one after the other to meet the required embedding capacity. Watermark bits
that forms the payload is embedded into these sub bands using the embedding
algorithm. The low frequency unmarked approximate coefficients are then
used along with the marked sub bands and Inverse IWT is taken to get the
watermarked image.
5.4.2
Extraction Method
Watermarked
Image
Integer Wavelet
transform
Attack
identification
Histogram
Shifting & data
Recovery Algorithm
Approximate Low
frequency LL subband
Recovered original
Image
Inverse
IWT
Watermark
stream
High frequency
Subbands
104
P=Peak.
Read
the
coefficients
with
value
and
Shift all the coefficients with value P+2 and above one
position to the left.
3.
4.
Set P = P+1.
5.
5.5
105
conducted and the results are tabulated. Tables 5.1 and 5.2 shows the peak
signal to noise ratio between the original image and the watermarked image
after embedding text of various sizes.
Table 5.1 shows Image Quality tested with gradual increase in
payload using Text Input of Different sizes on Cameraman Image.
Table 5.1
Number of Characters
Embedded
PSNR (dB)
2486
48.7259
2974
48.6684
5027
48.4209
9126
47.6446
11291
47.3461
Table 5.2
Comparison of performance of various wavelet families on a given image for different payload size
Cameraman
Pay
cdf2.2
load bpp PSNR MSE
db2
sym3
bior3.3
bior6.8
rbio3.3
PSNR
MSE
PSNR MSE
PSNR
MSE
PSNR
MSE
PSNR
MSE
44.63
2.308
43.05 3.296
46.86
1.374
39.937
6.806
43.507
2.992
44.628
2.311
43.05 3.299
46.82
1.386
39.934
6.811
43.498
2.998
44.609
2.321
43.02 3.318
46.76
1.403
40.010
6.813
43.478
3.011
44.567
2.344
42.94 3.357
46.62
1.450
39.945
6.846
43.468
3.019
46.55
1.472
39.862
6.926
43.368
3.132
1,00,489 48.674 0.903 insufficient insufficient 42.84 3.465 insufficient insufficient insufficient insufficient insufficient insufficient
106
107
49
47
Cdf2.2
db2
45
Sym3
bior3.3
43
bior6.8
rbio3.3
41
39
10000
30000
50000
70000
90000
110000
Payload in Bits
Figure 5.4
Image
Quality
tested
using
different
wavelets
on
Cameraman Image
Table 5.2 shows image quality tested for different payloads on the
same image using different wavelets. Cdf2.2. performs better than other
wavelets for the same payload. Image quality quickly changes when different
wavelets are used. Performance in embedding, measured using peak signal to
noise ratio shows that bior6.8 has the minimum quality. The embedding
capacity also varies when using different wavelets using different wavelets
when the image is decomposed using db2 embedding stops in about 50,000
bits whereas cdf2.2 continues to embed over one lakhs bits. The same is
illustrated in the graph of Figure 5.4.
Number of Occurrences
108
Number of Occurrences
db2 wavelet
109
Table 5.3
No of
Peaks
Used
Cameraman
Woman Dark
Hair
Lena
Sail Boat
9 peaks
8 peaks
7 peaks
6 peaks
5 peaks
4 peaks
3peaks
2 peaks
1 peak
110
Cameraman
49
47
Lena
Sail Boat
45
43
41
39
37
35
1
10 11
Figure 5.6
Table 5.4
Shifting
11 levels shifting
10 levels shifting
9 levels shifting
8 levels shifting
7 levels shifting
6 levels shifting
Capacity bits
144337
143871
143328
142610
141665
140433
PSNR
41.8595
42.1260
42.4130
42.8195
43.2402
43.7392
Payload
0.5506
0.5500
0.5468
0.5440
0.5404
0.5357
5 levels shifting
4 levels shifting
3 levels shifting
2 levels shifting
1 level shifting
139021
136991
132932
122558
91650
44.2951
45.0178
45.8634
47.0743
49.4225
0.5303
0.5226
0.5012
0.4675
0.3496
111
(a)
0.
49
54
0.
49
7
pk
28
s
0.
48
5
pk
53
s
0.
3p 464
ks
6
0.
40
1
38
pk
0.
17
91
(b)
Table 5.5
pk
s
11
Figure 5.7
PSNR
pk
0.
55
06
0.
54
7
pk
68
s
0.
54
5
pk
04
s
0.
3p 530
ks
3
0
1
pe .50
12
ak
0.
34
96
pk
s
pk
s
11
PSNR
50
48
46
44
42
40
38
50
48
46
44
42
40
38
CAMERA MAN
ns
Shifting
Capacity
PSNR
Payload
11 11 levels shifting
129870
42.2365
0.4954
10 10 levels shifting
129617
42.3553
0.4944
9 9 levels shifting
129192
42.5261
0.4928
8 8 levels shifting
128472
42.7120
0.4901
7 7 levels shifting
127215
42.9094
0.4853
6 6 levels shifting
125181
43.1588
0.4775
5 5 levels shifting
121805
43.5402
0.4646
4 4 levels shifting
116100
44.1540
0.4429
3 3 levels shifting
105852
45.0346
0.4038
2 2 levels shifting
85575
46.5519
0.3264
1 1 level shifting
46942
49.4425
0.1791
112
Table 5.4 and 5.5 illustrates how the number of watermark bits that
could be embedded in a given image for cdf 2.2 wavelet using a number of
embedding points. To embed in a peak we shift all the histogram points one
position to create a vacant point near the peak. As we increase the embedding
points the levels of shifting increase. Figure 5.7 (a) and 5.7(b) shows the
number of bits that can be embedded in the cameraman image and the woman
dark hair image respectively using one to eleven levels of shifting. Also the
signal quality of the images is shown. Also it illustrates the payload, number
of peaks used against the image quality for cameraman and woman dark hair
image respectively.
Figure 5.8
113
Wavelet
name
Lena
Boat
Cameraman
Woman dark
hair
PSNR
PSNR
PSNR
PSNR
cdf2.2
46.3435
46.5839
48.8746
47.5951
db2
44.6218
44.9846
44.6034
44.8392
db3
42.3504
42.5154
42.1412
42.4439
coif1
41.4483
(16900bitsonly)
41.6768
(15625bits)
42.4858
(14884bits)
43.1489
(17689bits)
sym2
44.6218
44.9846
44.6034
44.8392
sym3
41.1251
41.1670
43.0265
42.5173
bior3.3
45.3731
45.5399
46.7578
46.3826
bior6.8
39.8899
40.4009
39.9917
40.2478
rbio3.3
41.0944
41.3254
43.5110
42.8716
rbio5.5
38.0903 (6889bits)
37.8837
(8100bits)
39.1146
(2401bits)
39.1939
(2809bits)
rbio6.8
40.4545
40.7971
40.4842
40.6646
114
between the original image and the watermarked image varies depending on
the image when using the same wavelet for decomposition. Histogram of
images for wavelet families which could not embed given capacity, tested for
25,000 bits is shown in the following figures. Histograms of some of the
images using coif 1 wavelet is shown in Figure 5.9(a) and (b).Cameraman
image when decomposed using coif 1 wavelet has its peak near 7000 in the
wavelet histogram of the horizontal wavelet coefficients, near 12000 in the
vertical coefficients and very less in the diagonal component. So the
decomposition using coif 1 is not able to embed the desired 25,000 bits.
Similar is the case of the boat image using coif 1 wavelet. This shows all
wavelets used do not give same performance for a given algorithm.
Figure 5.9
115
transform for different payloads using cdf2.2 wavelet .The sailboat image
though has higher quality for the same payload compared to Lena image using
lower payload, the image quality quickly falls down as payload is increased.
This is because the wavelet histograms of Lena image have higher valued
peak points than sailboat image. To embed a given payload more shifting is to
be done on sailboat image compared to Lena image which degrades the
watermarked image quality.
Figure 5.11a through Figure 5.11f shows the image quality tested
on cameraman image for different payloads. It varies from 48.75 dB at 0.2
bits per pixel of the watermarked data embedded in the original image to
42.13 dB at 0.6 bits per pixel.
48
Lena
46
Cameraman
Woman dark hair
44
Sailboat
42
40
38
36
0
0.1
0.2
0.3
0.4
0.5
0.6
Payload (bpp)
Figure 5.10
116
Table 5.7
Lena
Cameraman
Woman dark
hair
Sailboat
PSNR dB
PSNR dB
PSNR dB
PSNR dB
0.1
46.3338
48.8519
47.5824
47.2015
0.15
45.9927
48.7678
47.5095
44.50572
0.2
43.6043
48.7591
47.5146
43.1822
0.25
42.1267
48.7421
47.4691
41.5522
0.3
40.1725
48.7014
47.4321
39.5865
0.35
39.3304
48.6990
45.7253
38.4327
0.4
37.8965
48.6552
45.0346
37.0477
0.45
insufficient
48.5825
43.8402
insufficient
0.5
insufficient
46.5234
42.2365
insufficient
10
0.55
insufficient
42.1261
insufficient
insufficient
117
(a)
(b)
(c)
(d)
(e)
(f)
Payload(bpp)0.6, PSNR
118
5.5.1
Number of occurrences
Number of occurrences
Number of occurrences
Number of occurrences
Number of occurrences
119
Figure
5.12(a)
shows
its
histogram
before
embedding.
120
like cameraman and woman dark hair which has higher embedding capacity
due to higher peak points in the wavelet histogram.
CONCLUDING REMARKS
Reversible image watermarking using histogram shifting method
was done and tested using different images. Embedding capacity not only
varies from image to image, it also varies for various wavelets .The wavelet
histogram is used for embedding as it has a Laplacian like distribution and
embedding can be done on both sides of the histogram to embed more data.
More image quality is achieved for the same payload compared to other
reversible watermarking methods this is a blind watermarking method.
Original image and the embedded data are extracted exactly without any loss
because this method is completely reversible. Images with more number of
points on the wavelet histogram peak can embed more data. Cameraman
image performs better than all the other test images used for this algorithm.
Some wavelet decompositions and the wavelet histograms are not able to
121
embed the desired capacity due to insufficient number of points in the wavelet
peak of the wavelet histogram.
The performance of the image watermarking algorithm using
histogram shifting is studied like the other algorithms implemented in this
work namely the reversible watermarking method using bitplane coding and
the non reversible neighbor correlation authentication method.
The performance of these algorithms will not be the same under the
influence of noise in the watermarked image. To see the behavior of all the
three algorithms implemented in such conditions, noise is introduced in the
watermarked image and the performance of the algorithms is studied and
discussed in the forthcoming chapter.