Journal of Applied Mathematics

Volume 2013 (2013), Article ID 189706, 8 pages

http://dx.doi.org/10.1155/2013/189706

Research Article

A Steganographic Method Based on Pixel-Value Differencing and the Perfect Square Number

Hsien-Wen Tseng¹ and Hui-Shih Leng1,2

¹Department of Information Management, Chaoyang University of Technology, No.168, Jifeng E. Road, Wufeng District, Taichung 41349, Taiwan

²Department of Mathematics, Changhua University of Education, No.1, Jin-De Road, Changhua County 50058, Taiwan

Received 29 March 2013; Accepted 13 June 2013

Academic Editor: Carlos Conca

Copyright © 2013 Hsien-Wen Tseng and Hui-Shih Leng. 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.

Abstract.

The pixel-value differencing (PVD) scheme uses the difference value between two consecutive pixels in a block to determine how many secret bits should be embedded. There are two types of the quantization range table in Wu and Tasi's method. The first was based on selecting the range widths of [8, 8, 16, 32, 64, 128], to provide large capacity. The second was based on selecting the range widths of [2, 2, 4, 4, 4, 8, 8, 16, 16, 32, 32, 64, 64], to provide high imperceptibility. Most of the related studies focus on increasing the capacity using LSB and the readjustment process, so their approach is too conformable to the LSB approach. There are very few studies focusing on the range table design. Besides, it is intuitive to design it by using the width of the power of two. This work designs a new quantization range table based on the perfect square number to decide the payload by the difference value between the consecutive pixels. Our research provides a new viewpoint that if we choose the proper width for each range and use the proposed method, we can obtain better image quantity and higher capacity. In addition, we offer a theoretical analysis to show our method is well defined. The experiment results also show the proposed scheme has better image quantity and higher capacity.

1. Introduction

The pixel-value differencing (PVD) [1] scheme provides high imperceptibility to the stego image by selecting two consecutive pixels and designs a quantization range table to determine the payload by the difference value between the consecutive pixels. Besides, it offers the advantage of conveying a large number of payloads, while still maintaining the consistency of an image characteristic after data embedding.

In recent years, several studies have been proposed to improve the PVD method. Wu et al.’s [2] presented a method combining pixel-value differencing and the LSB replacement method. Yang and Weng [3] proposed a multipixel differencing method that uses three difference values in a four-pixel block to determine how many secret bits should be embedded, and Jung et al.’s [4] proposed an image data hiding method based on multipixel differencing and LSB substitution. Liu and Shih [5] proposed two extensions of the PVD method, the block-based approach and Haar-based approach, and Yang et al. proposed an information hiding technique based on blocked PVD. Liao et al.’s [6] proposed a four-pixel differencing and modified LSB substitution, and Yang et al.’s [7] proposed a data hiding scheme using the pixel-value differencing in multimedia images.

Some studies focused on increasing the capacity [3, 5, 8] using LSB [2, 4] or a readjusted process [6, 7] to improve the embedding capacity or image quantity. Few studies focus on the range table design. Besides, it is intuitive to design it using the width of the power of two.

In this work, we design a new quantization range table based on the perfect square number to decide the payload by the difference value between the consecutive pixels. It differs from the design of Wu and Tsai’s scheme, in which the quantization range table is based on the range width of the power of two. The perfect square number provides an elegant mathematical model to develop a new quantization range table, which divides each range into two subranges for embedding different numbers of secret bits.

The remainder of this paper is organized as follows. Section 2 briefly describes Wu and Tsai’s PVD approach. Section 3 presents our scheme on how to create a new quantization table based on the perfect square number, how the embedding procedure works, and how to extract the secret data from the stego image. Section 4 offers a theoretical analysis and shows the experiment results. Finally, Section 5 concludes this paper.

2. Review of Wu and Tsai’s PVD Approach

The gray-valued cover image is partitioned into nonoverlapping blocks of two consecutive pixels, states and . From each block, we can obtain a difference value ; then ranges from 0 to 255. If is small, then the block is located within the smooth area and will embed less secret data. Otherwise, it is located on the edge area, and it can embed a greater amount of secret data. The quantization range table is designed with contiguous ranges, and the range table ranges from 0 to 255. The number of secret bits hidden in two consecutive pixels depends on the quantization range table.

The embedding algorithm is described as follows.

Step 1. Calculate the difference for each block of two consecutive pixels and .

Step 2. Search the quantization range table for to determine how many bits will be embedded. Obtain the range in which , where and are the lower bound and the upper bound of , and is the number of embedding bits.

Step 3. Readsecret bits from the secret bit stream, and transform it into decimal value.

Step 4. Calculate the new difference. Ensure bothandare in the same range.

Step 5. Average to and. The new pixel valuesandare obtained by the following formula:

Repeat Steps 1–5 until all secret bits are embedded and the stego image is produced.

In the extracting phase, the same Steps 1 and 2 in the embedding algorithm are used. The differenceis computed for each two consecutive pixels in the stego image, and then the same quantization range table is searched to find. Compute, and transform into the binary stream. Repeat until all secret data is completely extracted.

3. Proposed Scheme

In this section, the proposed scheme is described in three parts: the new quantization range table is based on the perfect square number, embedding procedure, and extraction procedure.

3.1. The New Quantization Range Table Based on Perfect Square Number

We design a new quantization range table based on the perfect square number in Table 1. For each pixel value , choose the nearest perfect square number (we will define the nearest perfect square number later), then we have range for . The width of this range is , and the embedding bit length is . For each range , if the width of this range is larger than , then we divide this range into two subranges: and .

Table 1: The quantization range table based on the perfect square number.

Range
Sub-ranges

1

1

2

2

3

3

2

4

3

5

4

3

6

4

3

7

4

3

8

4

9

5

4

10

5

4

11

5

4

12

5

4

13

5

4

14

5

4

15

5

4

16

4

is the perfect square number; is the length of embedding bits.

For example, if the pixel value is 34, the nearest perfect square number is 36; then we have range: . The width of this range is 12, and the embedding bit length is. Since 12 > 2³, divide this range into two subrangesand.

By the definition of subranges, if the to-be-embedded secret bits equal one of the LSB bits in the first subrange, then we claim it can embed secret bits. Otherwise, the second subrange’s width is always , and it can embed secret bits. Therefore, we can guarantee one of the continuous series numbers equals the bits secret data which we want to embed.

There are two important concepts we want to emphasize here. First, if the difference value is located in the first subrange, there is no modification needed, so this design does not violate the basic concept of PVD and HVS (Human Visual System). Second, we notice almost the difference values belonging to rangeare used to embed the same size of data, 4 bits of secret data. Our design in Table 1 still coincides with the basic concept of PVD—embedding a lower amount of secret data in the smooth area and a greater amount of secret data in the edge area.

3.2. Embedding Procedure

Before embedding secret data, the function Nearest_PerfectSquare() is defined to find the nearest perfect square number for difference value , where is the difference value of two consecutive pixels.

The function Nearest_PerfectSquare() returns the nearest perfect square number , and is the range number of. According to range number , the secret data is embedded into the cover image by the embedding procedure. The embedding procedure of proposed method is summarized as follows.

The proposed embedding procedure is as follows.

Input. The grayscale cover image pixel value , whereis a pixel index. LSB() isbits LSB binary stream for pixel value. Secret() represents bits binary secret data.

Output. The grayscale stego image pixel value .

Step 1. For each pair of two consecutive pixels, compute the difference value.

Step 2. Find the nearest perfect square number by function Nearest_PerfectSquare(), and is the range number of in Table 1.

Step 3. If , set new pixel-value difference value . According to PVD embedding scheme (Step 5), average to and . The new pixel values and are obtained by the following formula:

Step 4. If, compute the length of embedding bits. There are two cases. Search the first subrange [] and find a value in the subrange such that LSB() = Secret(), and then set . Otherwise, search the second subrange [] and find a value in the subrange such that LSB() = Secret(), and then set . Finally, average to and as Step 3 does, and then we obtain and .

We illustrate the embedding procedure in Figure 1.

Figure 1: The embedding procedure.

For example, we choose a pair of two consecutive pixels (47,81) from the cover image; then,. The following two conditions are discussed.

Case 1. Secret data is “1110” or “1111” or “0000” or “0001.”

In the first subrange, the 4 LSBs are the same as the secret data (30 = 00011110 ₂, 31 = 00011111 ₂, 32 = 00100000 ₂, 33 = 00100001 ₂), so we can embed 4 bits of secret data. Suppose the to-be-embedded bits are “0000”; then the new difference value(32 = 00100000 ₂). Finally, we modify (47,81) to (48,80).

Case 2. Otherwise, the second subrangeis used to embed 3 secret bits ranging from “000” to “111”. Suppose the to-be-embedded bits are “001”; then the new difference value(41 = 00101001 ₂). Finally, we modify (47,81) to (43,84).

We illustrated the embedding examples in Figure 2.

Figure 2: The embedding examples of two consecutive pixels (47,81) and two cases of secret data “0000” and “001”.

3.3. Extraction Procedure

The extraction procedure of the proposed method is summarized as follows.

The proposed extraction procedure is as follows.

Input. The grayscale stego image pixel value . LSB() is a decimal number transform from bits LSB binary stream for pixel value . Secret() represents bits binary secret data.

Output. Secret data.

Step 1. For each pair of two consecutive pixels, compute the difference value.

Step 2. Find the nearest perfect square number by function Nearest_PerfectSquare(), and is the range number ofin Table 1.

Step 3. If , Secret(4) = LSB(). Otherwise, compute the length of embedding bits , search subrange from Table 1 to determine which subrange it belongs to, and extract the secret data (Secret() = LSB() for the first subrange and Secret() = LSB() for the second subrange). Finally, we extract all secret data.

We illustrate the extraction procedure in Figure 3.

Figure 3: The extraction procedure.

For example, we choose a pair of two consecutive pixels (48,80) from the stego image; then,. Sinceis located in the first subrange, we can extract the secret data “0000” from 4 LSBs of 32 = 00100000 ₂.

For another example, we choose a pair of two consecutive pixels (43,84) from the stego image; then,. Sinceis located in the second subrange, we can extract the secret data “001” from 3 LSBs of 41 = 00101001 ₂.

4. Theoretical Analysis and Experiment Results

Lena, Baboon, Peppers, Jet, SailBoat, and Tiffany from the SIPI Image Database are chosen as the cover images. First, we give a theoretical analysis to show our method is well defined, and then the experiment results show the proposed scheme has higher imperceptibility.

4.1. Theoretical Analysis

The stego image quality is measured by the peak signal-to-noise ratio (PSNR). The PSNR formula is defined as

where MSE is the mean square error between the cover and stego images. For a cover image, whose width and height are and , MSE is defined as

where and are the pixel values of the stego and cover images, respectively.

Suppose, the probability of distribution is uniform. Then we calculate the average payload and average MSE for each range () (or the perfect square number ) according to Table 1. The average payload is computed by the following formula:

where is the total number in the first subrange,is the embedding bits in the first subrange, is the total number in the second subrange, andis the embedding bits in the second subrange. The average error for each range is calculated by the following formula:

For example,, average payload is , and the average error is .

The total MSE is estimated by

where and are the width and average error for each range.

Therefore, we obtain the average payload and average MSE using the perfect square number, as illustrated in Table 2.

Table 2: Distributions of pixel-value difference, average payload, and average MSE for images using the proposed method.

Lena
Baboon
Peppers
Jet
SailBoat
Tiffany
Average payload
Average MSE

1
79276
72714
77375
90611
77179
83887
1
0.5

2
28604
14659
27386
17330
21513
28642
2
1.5

3
13861
15316
17509
11449
16168
10717
2.33
1

4
5013
11053
5467
3894
8215
3953
3
3.5

5
2275
7539
1593
2026
3787
1768
3.2
2.8

6
1128
4754
726
2049
2104
897
3.33
2.33

7
566
2841
353
1138
1127
400
3.43
2

8
224
1466
195
1259
577
535
4
7.5

9
100
561
150
586
270
170
4.11
6.67

10
21
149
109
281
58
87
4.2
6

11
4
18
57
408
19
8
4.27
5.45

12
0
2
51
41
22
7
4.33
5

13
0
0
92
0
33
0
4.38
4.62

14
0
0
9
0
0
1
4.43
4.29

15
0
0
0
0
0
0
4.47
4

16
0
0
0
0
0
0
4
7.5

The same theoretical analysis using Wu and Tsai’s method is shown in Table 3.

Table 3: The distributions of pixel-value difference, payload, and MSE for images using Wu and Tsai’s method.

Range width
Lena
Baboon
Peppers
Jet
SailBoat
Tiffany
Payload
MSE

2
79276
72714
77375
90611
77179
83887
1
0.5

2
17302
7786
15376
17330
12301
18372
1
0.5

4
18177
12904
20501
11449
16226
15669
2
1.5

4
6986
9285
9018
3894
9154
5318
2
1.5

4
3266
6437
3786
2026
5174
2556
2
1.5

8
2889
8147
2574
2049
4944
2354
3
3.5

8
1392
5010
869
1138
2378
1040
3
3.5

16
1174
5201
733
1259
2200
885
4
7.5

16
385
2288
292
586
907
386
4
7.5

32
214
1207
273
281
504
551
5
16

32
11
91
120
408
46
45
5
16

64
0
2
155
41
59
8
6
32

64
0
0
0
0
0
1
6
32

From Tables 2 and 3, we calculate the payload and PNSR for Lena, Baboon, Peppers, Jet, SailBoat, and Tiffany and compare Wu and Tsai’s method and the proposed method by theoretical analysis in Table 4.

Table 4: Comparison between Wu and Tsai’s method and the proposed method by theoretical analysis.

Cover images
Wu and Tsai’s method with the range widths of 2, 2, 4, 4, 4, 8, 8, 16, 16, 32, 32, 64, and 64
Proposed method

Capacity
Payload
PSNR
Capacity
Payload
PSNR

Lana
173640
0.66
47.75
198209
0.76
49.23

Baboon
213681
0.82
42.31
229459
0.88
46.17

Peppers
176685
0.67
45.71
200831
0.77
49.10

Jet
163312
0.62
46.01
191383
0.73
47.96

SailBoat
188086
0.72
44.86
209494
0.80
47.87

Tiffany
167645
0.64
46.83
191290
0.73
49.18

Our method clearly has greater capacity and higher PSNR than Wu and Tsai’s method, which proves the proposed method is well defined.

4.2. Experiment Results

We also use the same test images as the real test shown in Figure 4, and the experiment results are shown in Table 5.

Table 5: The experiment results use Figure 4 as the cover image.

Cover images
Capacity (bits)
Payload

(bpp)
PSNR

(dB)

Lena
215740
0.82
50.70

Baboon
241719
0.92
48.57

Peppers
217290
0.83
50.57

Jet
204682
0.78
50.89

SailBoat
224915
0.86
49.86

Tiffany
210935
0.80
50.86

(a)

(b)

(c)

(d)

(e)

(f)

Figure 4: Six test images: (a) Lena, (b) Baboon, (c) Peppers, (d) Jet, (e) SailBoat, and (f) Tiffany.

From Table 5, we found the experiment results have larger capacity and better PSNR than those of the theoretical analysis. The capacity and PSNR seem to be affected by the secret data, with more pixel-value difference falling in the first subranges and matching the secret data; we can obtain more capacities and less distortion.

5. Conclusions

This work designs a new quantization range table based on the perfect square number. In particular, we propose a new technology to design the range table. The width of the range is no longer a power of two, and if the difference value is located in the first subrange, there is no modification needed. Therefore, this design has not violated the basic concept of PVD and HVS (Human Visual System). If we choose a proper width for each range and use the proposed method as mentioned above, we can obtain better image quantity and higher capacity. The theoretical analysis shows the proposed scheme is well defined and has larger capacity and higher PSNR than those of Wu and Tsai’s second type range table design. The experiment results also show the proposed scheme provides large capacity and high imperceptibility. In addition, our study ingeniously uses the perfect square number to achieve the goal.

References

D.-C. Wu and W.-H. Tsai, “A steganographic method for images by pixel-value differencing,” Pattern Recognition Letters, vol. 24, no. 9-10, pp. 1613–1626, 2003.

H. C. Wu, N. I. Wu, C. S. Tsai, and M. S. Huang, “Image steganographic scheme based on pixel-value differencing and LSB replacement methods,” IEE Proceedings Vision Image and Signal Processing, vol. 152, no. 5, pp. 611–615, 2005.

C. H. Yang and C. Y. Weng, “A steganographic method for digital images by multi-pixel differencing,” in Proceedings of International Computer Symposium, pp. 831–836, Taipei, Taiwan, 2006.

K.-H. Jung, K.-J. Ha, and K.-Y. Yoo, “Image data hiding method based on multi-pixel differencing and LSB substitution methods,” in Proceedings of International Conference on Convergence and Hybrid Information Technology (ICHIT '08), pp. 355–358, kor, August 2008.

J.-C. Liu and M.-H. Shih, “Generalizations of pixel-value differencing steganography for data hiding in images,” Fundamenta Informaticae, vol. 83, no. 3, pp. 319–335, 2008.

X. Liao, Q.-Y. Wen, and J. Zhang, “A steganographic method for digital images with four-pixel differencing and modified LSB substitution,” Journal of Visual Communication and Image Representation, vol. 22, no. 1, pp. 1–8, 2011.

C.-H. Yang, C.-Y. Weng, H.-K. Tso, and S.-J. Wang, “A data hiding scheme using the varieties of pixel-value differencing in multimedia images,” Journal of Systems and Software, vol. 84, no. 4, pp. 669–678, 2011.

C. H. Yang, S. J. Wang, C. Y. Weng, and H. M. Sun, “Information hiding technique based on blocked PVD,” Journal of Information Management, vol. 15, no. 3, pp. 29–48, 2008.