# Digital Image Steganography Using Eight-Directional PVD against RS Analysis and PDH Analysis

Authors: Gandharba Swain
Journal: Advances in Multimedia
 (2018)

---

## Abstract

The least significant bit (LSB) substitution techniques are detected by RS analysis and the traditional pixel value differencing (PVD) approaches are detected by pixel difference histogram (PDH) analysis. The PVD steganography can escape from PDH analysis by using the edges in multiple directions. This paper proposes a steganography technique by exploiting the edges in eight directions and also using LSB substitution to resist from both RS analysis and PDH analysis. For every 3×3 pixel block the central pixel is embedded with 3 or 4 bits of data by modified LSB substitution technique. Then this new value of the central pixel is utilized to calculate eight difference values with eight neighboring pixels. These eight difference values are used to hide the data. There are two types with regard to two different range tables. Type 1 uses 3 bit modified LSB substitution and range table 1. Type 2 uses 4 bit modified LSB substitution and range table 2. Type 1 and type 2 are also known as variant 1 and variant 2, respectively. Type 1 possesses higher PSNR and type 2 possesses higher hiding capacity.


---

## Body

## 1. Introduction

The LSB substitution is one of the simplest and well-known approaches for data hiding. This simplest technique is detected by RS analysis. Wu and Tsai [1] exposed the fact that the edge regions in an image can conceal more amounts of data as compared to the smooth regions. Based on this principle they proposed pixel value differencing (PVD) steganography. The image should be partitioned into different blocks, each of size 1×2 pixels. For a block the difference value between the two pixels is computed and changed to a new value by adding data to it. The PVD technique with block size of 2×2 has been proposed to improve the embedding capacity [2, 3]. In blocks of size 2×2, edges in three directions are considered. Chang and Tseng [4] considered the values of 2, 3, and 4 neighboring pixels, to calculate the pixel value differences. But they did not address the fall in error problem (FIEP). Yang et al. [5] calculated varieties of pixel value differences in 4-pixel blocks for data hiding. Hong et al. [6] used diamond encoding with pixel value differencing to achieve better PSNR. LSB substitution techniques offer higher embedding capacity, but PVD techniques offer higher imperceptibility. Thus PVD and LSB techniques have been combined to obtain larger hiding capacity and better imperceptibility [7, 8]. Chen [9] proposed a PVD steganography using two reference tables to randomize the data embedding. Khodaei and Faez [10] proposed a hybrid approach by combining LSB substitution and PVD in 1×3 pixel block. It was further extended to 2×2 size block in [11] to achieve better performance. Based on pixel value differences adaptive LSB substitution has been performed in [12, 13].The traditional PVD steganography techniques follow a static range table. Due to this some undesired steps are introduced in pixel difference histograms of the stego images. This step effects can be avoided by applying two tricks, (i) exploiting the edges in multiple directions and (ii) using adaptive range table. Luo et al. [14] also proposed an adaptive PVD steganography with three-pixel blocks, which does not suffer with the step effects. Swain [15] proposed two adaptive PVD steganography techniques using vertical, horizontal, and diagonal edges, which do not suffer from step effects. The first technique uses pixel blocks of size 2×2 and the second technique uses pixel blocks of size 3×3. In general, adaptive image steganography schemes possess lower hiding capacity. The edges can be predicted by some prediction functions and hiding capacity depends upon this prediction. If we hide in smooth regions distortion will be more. Based on the level of complexity of the edge regions, adaptive embedding can be applied [16]. In this way capacity can be increased and chance of detection can be decreased. Balasubramanian et al. [17] published PVD schemes with 3×3 size pixel blocks, to achieve higher hiding capacity. To prevent the detection from pixel difference histogram (PDH) analysis, multidirectional edges have been exploited in [18]. Darabkh et al. [19] also proposed PVD steganography using eight-directional PVD which is an extension from Wu and Tsai’s original PVD. A PVD steganography technique which is an extension of Wu and Tsai’s PVD approach should be verified by PDH analysis. Gulve and Joshi [20] used PVD with LSB in six-pixel blocks to achieve higher embedding capacity. In one of the six pixels LSB substitution was applied. Then five differences were calculated and based on these differences PVD approach was applied.Zhang and Wang [21] proposed exploiting modification direction (EMD) steganography. The main goal in it is that a group of secret bits is converted to a digit in (2n+1)-ary notational system, where n is the size of pixel block. This secret digit could be hidden in the pixel block by adding ±1 to only one pixel. In this technique the hiding capacity is not good. Kim [22] advanced the EMD technique using basis vector and (2n+x-1)-ary notational system, where n and x are user defined values. Shen and Huang [23] made the hiding capacity of a block adaptive using PVD with EMD to achieve higher hiding capacity and better PSNR. Nguyen et al. [24] used multiple bit planes and pixel block complexity measure to perform adaptive embedding. In this method more number of bits is hidden in high textured regions as compared to low textured regions. In [25] the steganography algorithm uses a public key and a private key to generate pseudo random numbers that identify the embedding locations.This paper proposes a combination of modified LSB substitution and eight-directional PVD in 3×3 pixel blocks. It is judiciously designed in such a manner that it can neither be detected by RS analysis nor be detected by PDH analysis. Furthermore Wu and Tsai’s PVD principle is not used.


## 2. Proposed Eight-Directional PVD Technique

The embedding algorithm operates on 3×3 pixel blocks. The blocks are formed in a nonoverlapping manner. Let us denote a typical block as in Figure1(a). The central pixel is Pc and its surrounding pixels are P1, P2, P3, P4, P5, P6, P7, and P8. In central pixel t bit LSB substitution is performed. For type 1, the t value is 3 and range table is Table 1. For type 2, the t value is 4 and the range table is Table 2.Table 1
Range table 1 (for type 1).
Range R 1=[0,7] R 2=[8,15] R 3=[16,31] R 4=[32,63] R 5=[64,127] R 6=[128,255] capacity 3 3 3 3 4 4Table 2
Range Table 2 ( for type 2).
Range R 1=[0,7] R 2=[8,15] R 3=[16,31] R 4=[32,63] R 5=[64,127] R 6=[128,255] capacity 3 3 4 5 6 6Figure 1
(a) Original block; (b) stego block.
(a) (b)After performing t bit LSB substitution inPc, the stego value is Pc′. Suppose the integer (decimal) value of t LSB bits in Pc is decold and the integer (decimal) value of t LSB bits in Pc′ is decnew. Now find the deviation, dev = decold - decnew. Furthermore calculate a modified value of Pc′ as in (1)Pc′=Pc′+2t,ifdev>2t-1and0≤Pc′+2t≤255Pc′-2t,ifdev<-2t-1and0≤Pc′-2t≤255Pc′,otherwiseUsing this modified value Pc′, calculate eight difference values di, for i= 1 to 8 as in (2)di=Pc′-PiThe difference value d1 belongs to one of the six ranges. Suppose the lower bound is denoted as L1 and hiding capacity as t1 for the range of d1. Similarly L2, L3, L4, L5, L6, L7, and L8 are the lower bounds and t2, t3, t4, t5, t6, t7, and t8 are the hiding capacities of the ranges of d2, d3, d4, d5, d6, d7, and d8, respectively.Now taket1, t2, t3, t4, t5, t6, t7, and t8 bits of data separately and convert to their decimal values S1, S2, S3, S4, S5, S6, S7, and S8, respectively.Now for i=1 to 8, calculate new difference valuesdi′ using (3)di′=Li+SiFor i = 1 to 8 a pair of new values for each Pi is calculated as in (4)Pi′′=Pc′-di′(5)Pi′′′=Pc′+di′Now out of two new values Pi′′ and Pi′′′, one value is chosen for Pi′ using (6)Pi′=Pi′′,ifPi-Pi′′<Pi-Pi′′′and0≤Pi′′≤255Pi′′′,otherwiseThus the stego pixel block after hiding t, t1, t2, t3, t4, t5, t6, t7, and t8 bits of data in pixels Pc, P1, P2, P3, P4, P5, P6, P7, and P8, respectively, is as shown in Figure 1(b).The extraction algorithm operates on 3×3 pixel blocks as in embedding algorithm. The blocks are formed in a nonoverlapping manner. A typical stego block is represented in Figure1(b). Retrieve the t LSBs from Pc′. For i=1 to 8, find eight difference values as in (7)di′=Pc′-Pi′Each di′ belongs to a range whose embedding capacity is ti and lower bound is Li. For i=1 to 8, find the decimal values of the embedded secret bit streams using (8)Si=di′-LiNow convert S1, S2, S3, S4, S5, S6, S7, and S8 into t1, t2, t3, t4, t5, t6, t7, and t8 binary bits, respectively.The correctness of the extraction procedure is justified by the following mathematical discussions. That means how (8) is derived from (7) is described below.As per (7), di′=|Pc′-Pi′|.From (6), Pi′ is Pi′′, if Pi-Pi′′<Pi-Pi′′′and0≤Pi′′≤255. Otherwise Pi′ is Pi′′′. So, di′ can be defined as in (9)di′=Pc′-Pi′′,ifPi-Pi′′<Pi-Pi′′′and0≤Pi′′≤255Pc′-Pi′′′,otherwiseFrom (4) and (5), Pi′′ = (Pc′ - di′) and Pi′′′ = (Pc′ + di′), respectively. Substituting these values of Pi′′ and Pi′′′ in (9), (10) is obtained.(10)di′=Pc′-Pc′-di′,ifPi-Pi′′<Pi-Pi′′′and0≤Pi′′≤255Pc′-Pc′+di′,otherwiseEquation (10) can be simplified as (11)di′=di′,ifPi-Pi′′<Pi-Pi′′′and0≤Pi′′≤255-di′,otherwiseFrom (3), di′=Li+ Si. Substituting di′ on right hand side of (11), (12) is obtained. (12)di′=Li+Si,ifPi-Pi′′<Pi-Pi′′′and0≤Pi′′≤255Li+Si,otherwiseFrom (12), it can be concluded that di′=Li+ Si or Si= di′-Li. This is nothing but (8) used in extraction procedure. Thus correctness of (8) is justified.


## 3. Examples for Embedding and Extraction

Figure2 represents an example of embedding for type 1 with t=3 of the proposed technique. It is self-explanatory. To understand this example it can be traversed from left to right and top to bottom.Figure 2
Example of embedding.Figure3 represents an example of extraction for type 1 with t=3 of the proposed technique. It is self-explanatory. To understand this example it can be traversed from left to right and top to bottom.Figure 3
Example of extraction.


## 4. Results and Discussion

The embedding and extraction algorithms are simulated in MATLAB. Standard RGB color images from SIPI image data base are used for testing. The R, G, and B components (each 8 bits) of a pixel are treated as a single unit. For eight sample images the results are discussed and averaged. Figure4 shows the original images, Figure 5 shows the stego images of type 1, and Figure 6 shows the stego images of type 2. In each of these stego images seven lakhs (700,000) bits of data is hidden. The evaluation parameters are (i) hiding capacity; (ii) bit rate (BPB); (iii) PSNR and quality index (Q). The hiding capacity is the total number of bits that an image can conceal. The bits per byte (BPB) indicate the average hiding capacity per a byte of the original image. Equation (13) is used to calculate BPB. (13)BPB=hidingcapacityimagesizeinbytesDistortion in stego image is measured in terms of PSNR. Equation (14) is used to calculate it. (14)PSNR=10×log10255×255MSEwhere MSE denotes the mean square error and can be computed using (15)MSE=1m×n∑i=1m∑j=1npij-qij2where pij is a pixel of cover image and qij is the corresponding stego pixel.Figure 4
Original images.
(a)
Pot (b)
House (c)
Boat (d)
Jet (e)
Peppers (f)
Tiffany (g)
Baboon (h)
LenaFigure 5
Stego images of proposed type 1 (t=3, range table 1).
(a) (b) (c) (d) (e) (f) (g) (h)Figure 6
Stego images of proposed type 2 (t=4, range table 2).
(a) (b) (c) (d) (e) (f) (g) (h)The quality index (Q) is another parameter to measure the structural similarity between original image and stego image. Equation (16) is used to compute it. The maximum value of Q can be 1, if original image, p, and stego image, q, are the same.(16)Q=4σxyp-q-σx2+σy2p-2+q-2where p- stands for the mean pixel value of the original image, q- stands for the mean pixel value of the stego image, σx2 stands for the standard deviation of pixel values of original image, σy2 stands for the standard deviation of pixel values of stego image, and σxy is the covariance between original image and stego image. Equations (17), (18), (19), (20), and (21) are used to calculate these values. (17)p-=1m×n∑i=1m∑j=1npij(18)q-=1m×n∑i=1m∑j=1nqij(19)σx2=1m×n-1∑i=1m∑j=1npij-p-2(20)σy2=1m×n-1∑i=1m∑j=1nqij-q-2(21)σxy=1m×n-1∑i=1m∑j=1npij-p-qij-q-Table3 notes the results of seven-way PVD [18] which is an extension of Wu and Tsai’s [1] technique. Table 4 notes the results of Khodaei and Faez’s technique [10] and Table 5 notes the results of the proposed technique. The PSNR and capacity of the proposed technique (both type 1 and type 2) are better than seven-way PVD. The bit rate and Q are also better. Although as compared to Khodaei and Faez’s technique the PSNR is not improved, but the hiding capacity is improved. The major advantage over Khodaei and Faez’s technique is that the proposed technique is resistant to PDH analysis, but Khodaei and Faez’s technique is detectable by PDH analysis. This is made possible by exploiting the edges in eight directions.Table 3
Results of Pradhan et al.’s seven-way PVD technique [18].
Images 512×512×3 Seven-way PVD [18] Seven-way+ one-way PVD [18] PSNR Capacity Q BPB PSNR Capacity Q BPB Pot 42.37 1795551 0.9996 2.28 42.40 1803635 0.9996 2.29 House 38.97 1972223 0.9986 2.50 38.98 1977403 0.9986 2.51 Boat 37.89 1972086 0.9988 2.50 37.91 1991005 0.9988 2.53 Jet 42.09 1906254 0.9989 2.42 41.98 1909595 0.9989 2.42 Peppers 40.42 1778072 0.9993 2.26 40.20 1806166 0.9992 2.29 Tiffany 41.23 1400756 0.9986 1.78 41.30 1450799 0.9986 1.84 Baboon 33.79 2226806 0.9957 2.83 33.77 2243218 0.9957 2.85 Lena 41.73 1896662 0.9993 2.41 41.73 1901149 0.9993 2.41 Average 39.81 1868551 0.9986 2.37 39.78 1885371 0.9985 2.39Table 4
Results of Khodaei and Faez’s technique.
Images 512×512×3 Khodaei and Faez, type 1 [10] Khodaei and Faez, type 2 [10] PSNR Capacity Q BPB PSNR Capacity Q BPB Pot 41.21 2366001 0.9995 3.00 37.83 2387494 0.9990 3.03 House 39.16 2387183 0.9986 3.03 38.75 2470824 0.9985 3.14 Boat 40.05 2391994 0.9993 3.04 37.49 2504613 0.9987 3.18 Jet 40.89 2374048 0.9986 3.01 40.64 2418419 0.9985 3.07 Peppers 39.32 2372858 0.9991 3.01 37.91 2435223 0.9987 3.09 Tiffany 39.73 2372396 0.9980 3.01 40.25 2416944 0.9982 3.07 Baboon 37.77 2443361 0.9982 3.10 34.49 2662080 0.9963 3.38 Lena 42.78 2375248 0.9995 3.02 41.25 2434603 0.9993 3.09 Average 40.11 2385386 0.9988 3.03 38.57 2466275 0.9984 3.13Table 5
Results of proposed eight-directional PVD technique.
Images 512×512×3 Proposed, type 1 (t=3, Range Table 1) Proposed, type 2 (t=4, Range Table 2) PSNR Capacity Q BPB PSNR Capacity Q BPB Pot 41.15 2354240 0.9996 2.99 37.11 2475977 0.9988 3.15 House 39.69 2358575 0.9988 3.00 38.39 2625804 0.9984 3.34 Boat 37.25 2364685 0.9987 3.01 34.08 2659795 0.9973 3.38 Jet 42.21 2356828 0.9989 3.00 40.38 2538801 0.9985 3.23 Peppers 37.81 2356645 0.9988 3.00 34.69 2544392 0.9975 3.24 Tiffany 41.46 2353505 0.9987 2.99 40.53 2511139 0.9984 3.19 Baboon 34.26 2392573 0.9961 3.04 32.09 2939376 0.9937 3.74 Lena 42.62 2353892 0.9995 2.99 40.48 2533551 0.9992 3.22 Average 39.55 2361368 0.9986 3.00 37.22 2603604 0.9977 3.31Now let us observe the results of proposed technique and compare type 1 and type 2. We can observe that the capacity is higher in type 2 as compared to type 1. This is because of the 4 LSBs substitution in type 2 at the central pixel; i.e., the t value is 4. On the other hand the PSNR of type 1 is better than that of type 2.Table6 represents the comparison of the proposed technique with the adaptive PVD technique in [26] and hybrid techniques in [27, 28]. The comparison parameters are average PSNR and average hiding capacity values. The two variants of adaptive PVD technique possess lesser hiding capacity as compared to the proposed eight-directional PVD. As the hiding capacity of adaptive PVD [26] is very little, so PSNR is larger. The hybrid technique proposed in [27] is a combination of PVD, LSB and EMD. The hiding capacity of proposed technique is greater than all the four variants of the hybrid technique proposed in [27]. The technique in [28] uses PVD with modified LSB (MLSB) substitution. The results of this technique (type 1) are as good as the results of the proposed technique (type 1). Similarly, the results of this technique (type 2) are as good as the results of the proposed technique (type 2).Table 6
Comparison of the proposed technique with techniques in [26–28].
Technique PSNR Capacity Amount of hidden data in stego image to compute PSNR 2×3 adaptive PVD [26] 50.93 1445645 One lakh and forty thousand (140,000) bits 3×2 adaptive PVD [26] 50.93 1435623  3 PVD +3 LSB +EMD, type 1 [27] 41.07 1686041 Seven lakhs (700,000) bits 3 PVD +3 LSB +EMD, type 2 [27] 38.95 1798834 7 PVD +3 LSB +EMD, type 1 [27] 40.28 1710888 7 PVD +3 LSB +EMD, type 2 [27] 37.26 1823282  Proposed eight-directional PVD, type 1 39.55 2361368 Seven lakhs (700,000) bits Proposed eight-directional PVD, type 2 37.22 2603604  Five-directional PVD+MLSB, type 1 [28] 37.62 2399853 Eight lakhs and forty thousand (840,000) bits Five-directional PVD+MLSB, type 2 [28] 36.23 2514038 Eight-directional PVD+MLSB, type 1 [28] 37.49 2394086 Eight-directional PVD+MLSB, type 2 [28] 35.60 2603604


## 5. Security Analysis

The LSB substitution techniques suffer from RS analysis and PVD techniques suffer from PDH analysis. The proposed technique uses the concepts like modified LSB substitution and PVD, so it must be analyzed by both RS analysis and PDH analysis.The PDH analysis is performed by calculating the difference value between every pair of pixels. A pair comprises two consecutive pixels. This difference values will be from -255 to +255 including 0. The frequency of each of these difference values is counted. A graph is plotted, with the pixel difference value on X-axis and frequency on Y-axis. The curve obtained is called the PDH. The PDH of original image will be a smooth curve. If the PDH of stego image is also a smooth curve then steganography is not detected. If the PDH of stego image shows step effects, then steganography is identified.Figure7 is the PDH analysis of type 1 and Figure 8 is the PDH analysis of type 2 of the proposed technique. The analysis is carried over all the eight test images. For each image the PDH of the original image is represented by solid line and the PDH of the stego image is represented by dotted line. The solid line curves will be obviously free of step effects as they are of the original images. The dotted line curves in all the sixteen cases do not show any step effects. This justifies that the proposed technique is resistant to PDH analysis.Figure 7
PDH analysis for type 1 of the proposed technique.Figure 8
PDH analysis for type 2 of the proposed technique.The RS analysis is based on statistical measures. It is done in the following manner. Define a function F1  :  2n ↔2n+1. It defines two transformations, (i) from value 2n to value 2n + 1 and (ii) from value 2n + 1 to value 2n. Similarly, define another function F−1  :  2n ↔2n -1. It defines other two transformations, (i) from value 2n to value 2n – 1 and (ii) from value 2n - 1 to value 2n. The image, say M, is divided into a number of equal size blocks. Suppose such a block is G whose pixels are X1,X2,X3,…,Xn. Then use the function f(X1,X2,X3,…,Xn)=∑i=1n-1Xi+1-Xi to measure the smoothness of G. Then apply F1 to all the blocks of M and define the two parameters Rm and Sm as in (22) and (23). Similarly, apply F-1 to all the blocks of M and define the two parameters R-m and S-m as in (24) and (25). (22)Rm=NoofblockssatisfyingtheconditionfF1G>fGTotalnumberofblocks(23)Sm=NoofblockssatisfyingtheconditionfF1G<fGTotalnumberofblocks(24)R-m=NoofblockssatisfyingtheconditionfF-1G>fGTotalnumberofblocks(25)S-m=NoofblockssatisfyingtheconditionfF-1G<fGTotalnumberofblocksRS analysis is performed by using these four parameters. If the conditionRm ≈ R-m > Sm ≈ S-m is true, then RS analysis fails to detect the steganography technique. But if the condition R-m - S-m > Rm - Sm is true, then the RS analysis succeeds in detecting the steganography technique.Figure9 represents RS analysis for the proposed technique. Figures 9(a) and 9(b) stand for RS analysis over Lena and Baboon images, respectively, of type 1. Similarly, Figures 9(c) and 9(d) stand for RS analysis over Lena and Baboon images, respectively, of type 2. In all the four cases the condition Rm ≈ R-m > Sm ≈ S-m is true, so we can conclude that RS analysis could not detect the proposed technique. Lena image has more smooth regions and Baboon image has more edge regions; all the remaining six images are in between these two in terms of smoothness. So it is sufficient to draw a conclusion based on these two images.Figure 9
RS analysis for type 1 and type 2 of the proposed technique.
(a)
Type 1, Lena (b)
Type 1, Baboon (c)
Type 2, Lena (d)
Type 2, Baboon


## 6. Conclusion

The traditional PVD steganography techniques follow a static range table. Due to this some undesired steps are introduced in pixel difference histograms of the stego images. This step effect could be avoided by exploiting edges in eight different directions. This paper proposes a steganography technique using a judicious combination of LSB substitution and eight-directional PVD. The LSB substitution is performed only in one pixel out of nine pixels in a block, so RS analysis cannot detect it. By using the edges in multiple directions the PDH analysis cannot detect it. There exist two types of the proposed technique, with regard to two different quantization tables. The type 1 provides higher PSNR and the type 2 provides higher hiding capacity. This proposed technique performs better in terms of hiding capacity and PSNR over other competing PVD techniques.



---

*Source: 4847098-2018-09-26.xml*