A reversible image hiding scheme using novel linear...

6
A reversible image hiding scheme using novel linear prediction coding and histogram shifting Dae-Soo Kim 1 , Gil-Je Lee 2 , and Kee-Young Yoo 3 1 Department of Information Security, Kyungpook National Univ., Daegu, South Korea 1 Graduate School of Electrical Engineering and Computer Science, Kyungpook National Univ., Daegu, South Korea 3 School of Computer Science and Engineering, Kyungpook National Univ., Daegu, South Korea (Corresponding author : Kee-Young Yoo) AbstractIn 2009, Tsai et al. proposed reversible image hiding scheme using linear prediction coding and histogram shifting. Tsai et al.’s scheme improved the hiding capacity of Ni et al.’s scheme using the linear prediction coding and two histograms. In the linear prediction coding, however, the basic pixel is not used. If a value of basic pixel is the largest or the smallest in a block, only one histogram is generated and the hiding capacity is decreased. To solve the problems, this paper proposes the novel linear prediction coding with the inverse S-order and one histogram using two peak points. In experimental results, the hiding capacity of the proposed scheme is superior to Tsai et al.’s scheme. Keywords: Reversible data hiding, Steganography, Histogram shifting, Inverse S-order 1. Introduction Data hiding is a technique that embeds data into digital media to convey secret data by slightly altering the contents of the media, so that the embedded data is imperceptible [1], [2]. In image data hiding, during data embedding, distortion of image occurs since the pixel values in the cover image will be inevitably changed. The sensitive images, such as military images, medical images, or artwork preservation, are intolerable about the embedding distortion. For medical images, even slight changes are caused of the potential risk of the misdiagnosis. Nowadays, reversible data hiding research has become quite important. Reversible data hiding techniques are de- signed to solve the problem of sensitive images. After the embedded secret data is extracted, the image can be completely restored to its original state before embedding occurred. Several reversible data hiding schemes have been proposed [4], [5], [6], [7]. In 2006, Ni et al. proposed a very different reversible data hiding technique based on the histogram shifting technique [8]. Ni et al.’s scheme adjusts pixel values between peak point and zero point to conceal data and to achieve reversibility. However, the capacity is limited by the most frequent pixel values in the cover image. After proposed Ni et al.’s scheme, to improve the reversible data hiding based histogram shifting had researched [3], [9], [10], [11], [12], [13], [14], [15]. In 2009, Tai et al. proposed a pixel difference based reversible data hiding scheme [3]. Tsai et al. proposed a block-based reversible data hiding scheme using prediction coding [11]. However, Tsai et al.’s scheme had problems in prediction coding and dividing histogram into two sets. This problems cause a decrease of the hiding capacity. In this paper, the novel linear prediction coding with the inverse S-order and generating one histogram using two peak points are proposed to solve the problems of Tsai et al.’s scheme. The rest of this paper is organized as follows: In Section 2, the reversible data hiding schemes proposed by Tai et al. and Tsai et al. are introduced. In Section 3, the embedding, extraction and recovery procedures of the proposed method are presented. Experimental results are given in Section 4, and ending with conclusions in Section 5. 2. Related works 2.1 The pixel differences in an inverse S-order Tai et al. is proposed to a similar method in which the differences of two consecutive pixels are calculated. Data embedding is done by modifying the histogram of the absolute value of the differences using a proposed binary tree [3]. In Tai et al.’s scheme, scans the pixel value c i of cover image C in an inverse S-order as shown in Fig. 1. The pixel difference e i calculates between pixels c i-1 and c i as follows e i = c i , if i=0 |c i-1 - c i |, otherwise (1) 2.2 The histogram shifting Ni et al. proposed a histogram-based reversible data hiding scheme [8]. In their scheme, all pixel values in the cover image are calculated to generate the image histogram for secret data embedding. The peak point and the zero

Transcript of A reversible image hiding scheme using novel linear...

Page 1: A reversible image hiding scheme using novel linear ...worldcomp-proceedings.com/proc/p2011/SAM4116.pdfA reversible image hiding scheme using novel linear prediction coding and histogram

A reversible image hiding scheme using novel linear predictioncoding and histogram shifting

Dae-Soo Kim1, Gil-Je Lee2, and Kee-Young Yoo31Department of Information Security, Kyungpook National Univ., Daegu, South Korea

1Graduate School of Electrical Engineering and Computer Science, Kyungpook National Univ., Daegu, South Korea3School of Computer Science and Engineering, Kyungpook National Univ., Daegu, South Korea

(Corresponding author : Kee-Young Yoo)

Abstract— In 2009, Tsai et al. proposed reversible imagehiding scheme using linear prediction coding and histogramshifting. Tsai et al.’s scheme improved the hiding capacityof Ni et al.’s scheme using the linear prediction coding andtwo histograms. In the linear prediction coding, however, thebasic pixel is not used. If a value of basic pixel is the largestor the smallest in a block, only one histogram is generatedand the hiding capacity is decreased. To solve the problems,this paper proposes the novel linear prediction coding withthe inverse S-order and one histogram using two peak points.In experimental results, the hiding capacity of the proposedscheme is superior to Tsai et al.’s scheme.

Keywords: Reversible data hiding, Steganography, Histogramshifting, Inverse S-order

1. IntroductionData hiding is a technique that embeds data into digital

media to convey secret data by slightly altering the contentsof the media, so that the embedded data is imperceptible [1],[2]. In image data hiding, during data embedding, distortionof image occurs since the pixel values in the cover imagewill be inevitably changed. The sensitive images, such asmilitary images, medical images, or artwork preservation,are intolerable about the embedding distortion. For medicalimages, even slight changes are caused of the potential riskof the misdiagnosis.

Nowadays, reversible data hiding research has becomequite important. Reversible data hiding techniques are de-signed to solve the problem of sensitive images. Afterthe embedded secret data is extracted, the image can becompletely restored to its original state before embeddingoccurred. Several reversible data hiding schemes have beenproposed [4], [5], [6], [7]. In 2006, Ni et al. proposed avery different reversible data hiding technique based on thehistogram shifting technique [8]. Ni et al.’s scheme adjustspixel values between peak point and zero point to concealdata and to achieve reversibility. However, the capacity islimited by the most frequent pixel values in the cover image.After proposed Ni et al.’s scheme, to improve the reversible

data hiding based histogram shifting had researched [3], [9],[10], [11], [12], [13], [14], [15]. In 2009, Tai et al. proposed apixel difference based reversible data hiding scheme [3]. Tsaiet al. proposed a block-based reversible data hiding schemeusing prediction coding [11]. However, Tsai et al.’s schemehad problems in prediction coding and dividing histograminto two sets. This problems cause a decrease of the hidingcapacity. In this paper, the novel linear prediction codingwith the inverse S-order and generating one histogram usingtwo peak points are proposed to solve the problems of Tsaiet al.’s scheme.

The rest of this paper is organized as follows: In Section2, the reversible data hiding schemes proposed by Taiet al. and Tsai et al. are introduced. In Section 3, theembedding, extraction and recovery procedures of theproposed method are presented. Experimental results aregiven in Section 4, and ending with conclusions in Section 5.

2. Related works2.1 The pixel differences in an inverse S-order

Tai et al. is proposed to a similar method in whichthe differences of two consecutive pixels are calculated.Data embedding is done by modifying the histogram of theabsolute value of the differences using a proposed binarytree [3].

In Tai et al.’s scheme, scans the pixel value ci of coverimage C in an inverse S-order as shown in Fig. 1. The pixeldifference ei calculates between pixels ci−1 and ci as follows

ei =

{ci, if i= 0|ci−1 − ci|, otherwise

(1)

2.2 The histogram shiftingNi et al. proposed a histogram-based reversible data

hiding scheme [8]. In their scheme, all pixel values in thecover image are calculated to generate the image histogramfor secret data embedding. The peak point and the zero

Page 2: A reversible image hiding scheme using novel linear ...worldcomp-proceedings.com/proc/p2011/SAM4116.pdfA reversible image hiding scheme using novel linear prediction coding and histogram

Fig. 1: Inverse S-order

point are selected as shown in Fig. 2. The peak point is thelargest frequency in the histogram and the zero point is 0or the least frequency in the histogram. The peak point ismodified to embed the secret data by 1. Pixels with rangingfrom the peak point to zero point are modified, and pixelswith outside range of values are no changed. The modifiedpixel values can be recovered when the embedded data isextracted.

2.3 Review of Tsai et al.’s scheme

In 2009, Tsai et al.’s scheme is proposed to improvethe hiding capacity of the Ni et al.’s scheme using theneighboring similarity of pixels in an image. The cover-image is divided into blocks of m × m pixels and theprediction error value is calculated the prediction coding.It is performed using the basic pixel that is a center pixel ofblock shown in Fig. 3.

The prediction error values are modified based on his-togram shifting technique to embed secret data. There aredivided into two sets by basic pixel: non-negative histogram(NNH) and negative histogram (NH). Each set has its onepeak point and zero point. Three cases are considered. If theprediction error value is peak point of NNH and NH, andsecret bit is 1, no changed. Otherwise, the prediction errorvalue is adjusted by 1 to a value closer to the zero point.Final, the prediction error value is between the peak pointand zero point that is shifted by 1 closer to the zero point. Inthis case, no secret data is embedded in the prediction errorvalue. After the secret data is embedded the stego-image isobtained to perform the reverse prediction coding using themodified prediction error value.

However, the basic pixel is not used the embeddingprocedure. If value of basic pixel is the largest or thesmallest in a block, the one histogram is generated and onepeak point is used. The capacity is limited by the frequencyof peak point in the histogram [16]. For that reason, thecapacity is decreased.

(a)

(b)

Fig. 2: Example of the peak point and zero point: (a) coverimage and (b) image histogram

Fig. 3: The location of basic pixel in block with 3×3 pixels

3. The proposed schemeThe proposed scheme is solved to the problems of Tsai

et al.’s scheme [16]. The goal of the proposed scheme isprovided to the higher hiding capacity than Tsai et al.’sscheme while keeping the good quality of the stego-image.

3.1 The main conceptsThe proposed scheme is exploited to histogram shifting

method and the novel linear prediction coding (NLPC) basedon the inverse S-order. First, NLPC is solved to the problemof linear prediction coding of Tsai et al.’s scheme. The basicpixel is selected in the previous block and is excepted for thefirst block. Fig. 4 is shown that basic pixel r(n) is selectedto a center pixel of the nearest column or row of a previousblock B(n−1) by inverse S-order by cover-image, where nis sequence number of block B(n).

Page 3: A reversible image hiding scheme using novel linear ...worldcomp-proceedings.com/proc/p2011/SAM4116.pdfA reversible image hiding scheme using novel linear prediction coding and histogram

Fig. 4: The location of basic pixels

Fig. 5: The peak points and zero points

Second, the one histogram is generated. It has two peakpoints and two zero points. The peak points are the largestfrequency and the second largest frequency are selected.Fig. 5 shows that two peak points and two zero points aresearched. One of peak point P

(n)1 is the largest frequency

of e(n)(i,j) where e(n)(i,j) is the prediction error values. Another

peak point P(n)2 is the second largest frequency of e

(n)(i,j)

Two of zero point Z(n)1 and Z

(n)2 are located beyond the

range of both P(n)1 and P

(n)2 .

3.2 The embedding procedureInput: N ×N pixels cover-image C, secret data dl

Output: N × N pixels stego-image S, Block size m,peak and zero points pair (P (n)

1 , Z(n)1 ), (P (n)

2 ,Z

(n)2 ) of each block

Step 1: Divide C into blocks of m×m pixels.

Step 2: Calculate prediction error values (equation (2)) ofeach block that is difference between pixel c

(n)(i,j)

and basic pixel r(n) while the block scans aninverse S-order.

e(n)(i,j) = c

(n)(i,j) − r(n), (2)

Fig. 6: Flowchart of embedding procedure

where n ≥ 1, 0 ≤ i, j ≤ m− 1

Step 3: Generate the histogram of the prediction errorvalue e

(n)(i,j) in each block B(n).

Step 4: Search two peak and zero points pair in thegenerated histogram.

Step 5: Embed secret data dl in peak points by thefollowing conditions.If e(n)(i,j)=P

(n)t , secret data are embeded by follow-

ing equation (3)

e′(n)(i,j) =

{e(n)(i,j) + dl, if P

(n)t < Z

(n)t

e(n)(i,j) − dl, if P

(n)t > Z

(n)t

, (3)

where e′(n)(i,j) is a modified prediction error value

and t is 1 or 2.

If P(n)t < e

(n)(i,j) < Z

(n)t or P

(n)t > e

(n)(i,j) > Z

(n)t ,

e(n)(i,j) is modified by following equation (4)

e′(n)(i,j) =

{e(n)(i,j) + 1, if P

(n)t < Z

(n)t

e(n)(i,j) − 1, if P

(n)t > Z

(n)t

, (4)

otherwise, no modification

Step 6: Perform the reverse prediction coding. The stego-image S is obtained by following equation (5)

s(n)(i,j) = e′

(n)(i,j) − r(n), (5)

Page 4: A reversible image hiding scheme using novel linear ...worldcomp-proceedings.com/proc/p2011/SAM4116.pdfA reversible image hiding scheme using novel linear prediction coding and histogram

Fig. 7: Flowchart of extraction and recovery procedure

where n ≥ 1, 0 ≤ i, j ≤ m− 1

3.3 The extraction and recovery procedureInput: N × N pixels stego-image S, Block size m,

peak and zero points pair (P (n)1 , Z

(n)1 ), (P (n)

2 ,Z

(n)2 ) of each block

output: N × N pixels recovered cover-image C, secretdata dl

Step 1: Divide S into blocks of m×m pixels.

Step 2: Calculate prediction error values equation (6)of each block that is difference between pixelss(n)(i,j) and basic pixel r(n) while the block scans

an inverse S-order

e′(n)(i,j) = s

(n)(i,j) − r(n), (6)

where n ≥ 1, 0 ≤ i, j ≤ m− 1. The basic pixelr(n) is selected by the recovered pixel s(n)(i,j) in theblock B(n).

Step 3: Extract the secret data (equation (7, 9)) andrecover the prediction error values (equation (8,10)).

If P (n)t ≥ e′

(n)(i,j) ≥ Z

(n)t ,

dl =

{0, if e′

(n)(i,j) = P

(n)t

1, if e′(n)(i,j) = P

(n)t − 1

(7)

(a) (b) (c)

(d) (e) (f)

Fig. 8: Six 512 × 512 size gray-scale images: (a) Lena, (b)Airplane, (c) Baboon, (d) Boat, (e) Pepper and (f) Toy

e(n)(i,j) =

{e′

(n)(i,j), if e′

(n)(i,j) = P

(n)t

e′(n)(i,j) + 1, otherwise.

(8)

If P (n)t ≤ e′

(n)(i,j) ≤ Z

(n)t ,

dl =

{0, if e′

(n)(i,j) = P

(n)t

1, if e′(n)(i,j) = P

(n)t + 1

(9)

e(n)(i,j) =

{e′

(n)(i,j), if e′

(n)(i,j) = P

(n)t

e′(n)(i,j) − 1, otherwise.

(10)

otherwise, no modification

Step 4: Recover the cover-image by following equation(11).

c(n)(i,j) = e

(n)(i,j) − r(n), (11)

where n ≥ 1, 0 ≤ i, j ≤ m− 1

Step 5: Repeat Step 2, Step 3, Step 4 until the final block.

The proposed scheme can be prevented to underflow andoverflow by simple pre-processing work. In pre-processingstage, when the pixel value is 255, it is shifting to 254.Likewise, when the pixel values is 0, it is shifting to 1.

4. Experimental resultsIn this section, the proposed scheme is compared with

Tsai et al.’s scheme in terms of capacity (bpp) and image

Page 5: A reversible image hiding scheme using novel linear ...worldcomp-proceedings.com/proc/p2011/SAM4116.pdfA reversible image hiding scheme using novel linear prediction coding and histogram

Table 1: The result of hiding capacity and image distortion

Testimage

Tsai et al.’s scheme The proposed schemeCapacity (bit) PSNR (dB) Capacity (bit) PSNR (dB)

Lena 93,044 54.14 114,824 53.17Airplane 97,977 53.70 120,587 52.87Baboon 82,995 56.31 100,655 55.49Boat 70,470 55.14 82,371 54.11Peppers 88,756 54.51 109,572 53.42Toy 101,693 53.20 129,150 52.34Average 89,156 54.55 109,527 53.57

Table 2: The result of hiding capacity (bit) and imagedistortion (PSNR) with several block size of Tsai et al.’sscheme

Testimage

3×3 4×4 5×5Capacity PSNR Capacity PSNR Capacity PSNR

Lena 93,044 54.13 78,310 53.63 68,155 53.11Airplane 97,977 53.70 83,175 53.25 73,058 52.80Baboon 82,995 56.29 54,184 56.81 44,478 56.83Boat 70,470 55.14 67,714 55.04 57,903 54.53Peppers 88,756 54.50 74,155 53.97 64,500 53.31Toy 101,693 53.20 90,495 52.50 82,522 52.10Average 89,156 54.50 74,672 54.20 65,103 53.78

Table 3: The result of hiding capacity (bit) and imagedistortion (PSNR) with several block size of the proposedscheme

Testimage

3×3 4×4 5×5Capacity PSNR Capacity PSNR Capacity PSNR

Lena 114,824 53.17 94,768 52.74 80,569 52.35Airplane 120,587 52.87 100,723 52.47 87,267 52.11Baboon 100,655 55.49 64,007 55.68 52,193 55.70Boat 82,371 54.11 81,283 53.90 68,360 53.48Peppers 109,572 53.42 89,824 52.97 76,461 52.45Toy 129,150 52.34 111,572 51.78 99,605 51.47Average 109,527 53.57 90,363 53.26 77,409 52.93

distortion (PSNR). The test images are the 512× 512 gray-scale image, as shown in Figure 8. The secret data usedto generate the random number. When the size of block is3×3, Table 1 shows the result of hiding capacity and imagedistortion between Tsai et al’s and the proposed scheme.In table 1, the hiding capacity of Tsai et al.’s scheme andthe proposed cheme were 93,044-bit and 114,824-bit in Lenaimage, respectively. The hiding capacity of proposed schemewas increased by 23%. The image distortion of proposedscheme is similar to Tsai et al.’s scheme. The image distor-tion is measured in PSNR [17], which is definesd as follows

PSNR=

(10 · log10(

2552

MSE)

), (12)

where MSE is the meansquareerrorbetween the origi-nal image and stego-image, and can be calculated by usingthe following equation (13).

MSE=

1

MN

m−1∑i=0

n−1∑j=0

(I(i,j) − I ′(i,j))2

, (13)

where I(i,j) and I ′(i,j) indicate the pixel values of the originalimage and stego-image of size M ×N .

Table 2 and 3 show the result of hiding capacity andimage distortion about several block sizes. It is noted thatthe larger block size, the lower neighboring similarity andthe less the hiding capacity is even though the number ofbasic blocks is smaller [11]. The capacity of the 3 × 3block of Tsai et al.’s scheme and the 4 × 4 block of theproposed scheme is similar. Although the block size islarger than Tsai et al.’s scheme, the hiding capacity is asimilar result using the and modified histogram shiftingmethod in proposed scheme.

5. ConclusionIn this paper, the problems of Tsai et al.’s scheme was

solved by the novel linear prediction coding (NLPC) andmodified histogram shifting technique. The NLPC that basedon the invers S-order of pixel differences and modifiedhistogram shifting technique that search two peak points inone histogram were proposed to provide the hiding capacity.

In experimental results, the hiding capacity of theproposed scheme is superior to Tsai et al.’s schemeand the image quality is similar. When the extractionand recovery procedure, two peak and zero point fairare required in each block. Although the block size ofthe proposed scheme is larger than that of Tsai et al.’sscheme, the hiding capacity is similar. It is shown thatthe communication data, peak and zero points are decreased.

AcknowledgmentsThis Research was supported by Kyungpook National

University Research Fund, 2010. And this work is supportedby the 2nd Brain Korea 21 Project in 2011.

References[1] F.A.P. Petitcolas, R.J. Anderson, M.G. Kuhn, "Information hidingâATa

survey", in: Proceedings of IEEE special issue on protection of multi-media content, Vol. 87, No. 7, pp. 1062-1078, 1999.

[2] H. Wang and S. Wang, "Cyber warfareâASsteganography vs. steganal-ysis", Communications of the ACM, Vol. 47, No. 10, pp. 76-82, 2004.

[3] W.L. Tai, C.M Yeh, and C.C chang, "Reversible data hiding basedon histogram modification of pixel differences", IEEE Transactions onCircuits and Systems for Video Technology, Vol. 19, No. 6, pp. 906-910, 2009.

[4] J. Fridrich, M. Goljan, and D. Rui, "Lossless Data Embedding - NewParadigm in Digital Watermarking", In Special Issue on EmergingApplications of Multimedia Data Hiding, No. 2, pp. 185-196, 2002

Page 6: A reversible image hiding scheme using novel linear ...worldcomp-proceedings.com/proc/p2011/SAM4116.pdfA reversible image hiding scheme using novel linear prediction coding and histogram

[5] M.U. Celik, G. Sharma, A.M. Tekalp, "Reversible data hiding", in:Proceedings of IEEE International Conference on Image Processing,Rochester, NY, pp. 157-160, 2002.

[6] J. Tian, "Reversible data embedding using a difference expansion",IEEE Transactions on Circuits and Systems for Video Technology, Vol.13, No. 8, pp. 890-896, 2003.

[7] C.C. Chang, W.C. Wu, "A reversible information hiding scheme basedon vector quantization", Proceedings of Knowledge-Based IntelligentInformation and Engineering Systems (KES 05), pp. 1101-1107, 2005.

[8] Z. Ni, Y. Q. Shi, N. Ansari, W. Su, "Reversible data hiding", IEEETransactions on Circuits and Systems for Video Technology, Vol. 16,No. 3, pp.354-361, 2006.

[9] G. Xuan, Y.Q. Shi, Z. Ni, P. Chai, X. Cui and X. Tong, "Reversibledata hiding for jpeg images based on histogram pairs", Lecture Notesin Computer Science 4633, pp. 715-727, 2007.

[10] M. Fallahpour and M. H. Sedaaghi, "High capacity lossless data hidingbased on histogram modification", IEICE Electron. Vol. 4, No. 7, pp.205-210, 2007.

[11] P. Tsai, Y.C Hu, H.L. Yeh, "Reversible image hiding scheme usingpredictive coding and histogram shifting", Signal Processing, Vol. 89,No. 6, pp. 1129-1143, 2009.

[12] K. Kim, M. Lee, H.Y. Lee, and H.K. Lee, "Reversible data hidingexploiting spatial correlation between sub-sampled images", PatternRecognition, Vol. 42, No. 11, pp. 3083-3096, 2009.

[13] W. Hong, T.S. Chen, Y.P. Chang, C.W. Shiu, "A high capacity re-versible data hiding scheme using orthogonal projection and predictionerror modification", Signal Processing, Vol. 90, pp. 2911-2922, 2010.

[14] W. Hong, T.S. Chen, "A local variance-controlled reversible datahiding method using prediction and histogram-shifting", The Journalof Systems and Software, Vol. 83, pp. 2653-2663, 2010.

[15] S.S. Maniccam, N.G. Bourbakis, "Lossless image compression andencryption using SCAN", Pattern Recognition, Vol. 34, pp. 1229-1245,2001.

[16] M. Awrangjeb, "An overview of reversible data hiding", in: Pro-ceedings of the Sixth International Conference on Computer andInformation Technology, pp. 75-79, 2003.

[17] I. Cox, M. Miller, J. Bloom, J. Fridrich, and T. Kalker, DigitalWatermarking and steganography, volume 1. Morgan Kaufmann, 2edition, 2008.