# High Capacity Image Steganography Using Modified LSB Substitution and PVD against Pixel Difference Histogram Analysis

Authors: Gandharba Swain
Journal: Security and Communication Networks
 (2018)

---

## Abstract

The combination of pixel value differencing (PVD) and least significant bit (LSB) substitution gives higher capacity and lesser distortion. However, there are three issues to be taken into account: (i) fall off boundary problem (FOBP), (ii) pixel difference histogram (PDH) analysis, and (iii) RS analysis. This paper proposes a steganography technique in two variants using combination of modified LSB substitution and PVD by taking care of these three issues. The first variant operates on 2 × 3 pixel blocks and the second technique operates on 3 × 3 pixel blocks. In one of the pixels of a block, embedding is performed using modified LSB substitution. Based on the new value of this pixel, difference values with other neighboring pixels are calculated. Using these differences, PVD approach is applied. The edges in multiple directions are exploited, so PDH analysis cannot detect this steganography. The LSB substitution is performed in only one pixel of the block, so RS analysis also cannot detect this steganography. To address the FOBP, suitable equations are used during embedding procedure. The experimental results such as bit rate and distortion measure are satisfactory.


---

## Body

## 1. Introduction

Least significant bit (LSB) substitution is a very old image steganography approach, wherein the LSB bits (one, two, three, or four) of the pixels are substituted by secret data bits. 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 hiding data in it. The PVD technique with block size 2 × 2 has been proposed to enhance 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. However, 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 peak signal-to-noise ratio (PSNR). LSB substitution techniques offer higher embedding capacity, but PVD techniques offer higher imperceptibility. Thus PVD and LSB substitution 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. Based on pixel value differences, adaptive LSB substitution has been performed in [10]. Khodaei and Faez [11] proposed a hybrid approach by combining LSB substitution and PVD in 1 × 3 pixel block. It is extended to 2 × 2 size block in [12] and 2 × 3 size block in [13] to improve the performance.The traditional PVD steganography techniques follow a static range table. Due to this, the pixel difference histogram of the stego-image becomes zig-zag in nature. This is called step effect. This step effect can be avoided by applying two tricks: (i) exploiting the edges in multiple directions and (ii) introducing adaptive range table. Luo et al. [14] also proposed an adaptive PVD steganography with three pixel blocks, which does not suffer with the step effect. Swain [15] proposed two adaptive PVD steganography techniques using vertical, horizontal, and diagonal edges, which does not suffer with step effect. 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 embedding capacity. Anita et al. [16] optimized the performance of adaptive PVD by using 6 pixel blocks. The edges can be predicted by some prediction functions, and hiding capacity depends upon this prediction. If we hide bits of data in smooth regions, distortion will be more. Based on the level of complexity of the edge regions, adaptive embedding can be applied [17]. In this way capacity can be increased and chance of detection can be decreased. Balasubramanian et al. [18] proposed a PVD scheme 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 [19]. Darabkh et al. [20] also proposed PVD steganography using eight directional PVD which is an extension in principle from Wu and Tsai’s original PVD. Any PVD technique which is an extension of Wu and Tsai’s approach should qualify through PDH analysis.Exploiting modification direction (EMD) steganography was initiated by Zhang and Wang [21], wherein the main idea was to convert a group of bits to a digit in (2n + 1)-ary notational system and hide it in a pixel of the block. The hiding capacity of this technique is very poor. It has been improved by Kim [22] using (2n+x-1)-ary notational system, where n and x are user defined values. Shen and Huang [23] combined PVD with EMD to achieve higher hiding capacity and better PSNR.This paper proposes a combination of modified LSB substitution (M-LSB) and PVD. It is judiciously designed in such a manner that the fall off boundary problem (FOBP) does not arise and neither PDH analysis nor RS analysis can detect it. There are two main contributions in this paper: (i) discovering the FOBP that exists in Khodaei and Faez’s [11] technique (ii) and addressing it by proposing an improved technique with larger block size.


## 2. Related Work

Khodaei and Faez [11] in 2012 proposed a steganography method using both PVD and LSB substitution. The embedding procedure of this technique is as described below. The image is divided into nonoverlapping blocks of size 1 × 3; i.e., a block comprises 3 pixels from one row and three adjacent columns of the image, as shown in Figure 1(a). Image is viewed as a two-dimensional matrix of pixels/bytes. On middle pixel gx, k bit LSB substitution is applied. The k can be chosen from 3, 4, or 5. An ideal value for k will be 3. After k bit LSB substitution, gx becomes gx′. Suppose the decimal value of k LSBs of gx is L and the decimal value of k LSBs of gx′ is S. The deviation d is equal to L-S. Now gx′ is optimized by (1).(1)gx′=gx′+2k,ifd>2k-1and0≤gx′+2k≤255gx′-2k,ifd<-2k-1and0≤gx′-2k≤255gx′,otherwiseThis gx′ value is final. Two difference values d1=|gx′-gl| and d2=|gx′-gr| are calculated. Table 1 is the range table for type 1 and Table 2 is the range table for type 2.Table 1
Range table for type 1.
Range [ 0,7 ] [ 8,15 ] [ 16,31 ] [ 32,63 ] [ 64 ,  255 ] capacity 3 3 3 4 4Table 2
Range table for type 2.
Range [ 0,7 ] [ 8,15 ] [ 16,31 ] [ 32,63 ] [ 64,255 ] capacity 3 3 4 5 6Figure 1
Original and stego-blocks of size 1 × 3.
(a) (b)The valued1 belongs to one of the ranges in range table whose lower bound is l1and embedding capacity is t1. From the secret data stream t1 bits are taken and its decimal equivalent is s1. To hide t1 bits of data in gl, the new value for d1 is d1′. Similarly, the value d2 belongs to a range in the range table whose lower bound is l2 and embedding capacity is t2. From the secret data stream t2 bits are taken and its decimal equivalent is s2. To hide t2 bits of data in g2, the new value for d2 is d2′. These new difference values, d1′ and d2′, are calculated using (2).(2)d1′=l1+s1,d2′=l2+s2Two new values of gl and two new values for gr are calculated as below using (3).(3)gl′′=gx′-d1′,gl′′′=gx′+d1′,gr′′=gx′-d2′,gr′′′=gx′+d2′Now, gl′, the final value of gl, is calculated using (4). Similarly, the final value of gr known as gr′ is calculated using (5).(4)gl′=gl′′,ifgl-gl′′<gl-gl′′′and0≤gl′′≤255gl′′′,otherwise(5)gr′=gr′′,ifgr-gr′′<gr-gr′′′and0≤gr′′≤255gr′′′,otherwiseThus the block of Figure 1(a) is converted to its stego-block as shown in Figure 1(b).The extraction of the secret embedded data is done by the procedure as described below. The image is partitioned into blocks as was done in embedding procedure. A stego-block is as shown in Figure1(b). From the middle pixel gx′, k LSBs are extracted. Two differences d1′ and d2′ are calculated using (6). (6)d1′=gl′-gx′,d2′=gr′-gx′The difference d1′ belongs to a range in the range table whose embedding capacity is t1 and lower bound is l1. Similarly, the difference d2′ belongs to a range in the range table whose embedding capacity is t2 and lower bound is l2. Note that out of two range tables, the one that was used during embedding is the same one that should be used during extraction. The decimal equivalents of secret bit streams embedded in gl′ and gr′ are s1 and s2, respectively, as in (7). (7)s1=d1′-l1,s2=d2′-l2Finally, s1 and s2 are converted to t1 and t2 binary bits, respectively. These are the bits actually hidden.


## 3. Proposed Technique

### 3.1. Proposed Variant 1: Five Directional PVD with Modified LSB Substitution

The image is divided into nonoverlapping blocks of size 2 × 3; i.e., a block comprises 6 pixels from two adjacent rows and three adjacent columns of the image, as shown in Figure2(a). The image is viewed as a two-dimensional matrix of pixels/bytes. On pixel gx, k bit LSB substitution is applied. The k value can be chosen from 3, 4, or 5. An ideal value for k is 3. After k bit LSB substitution gx becomes gx′. Suppose the decimal values of k LSBs of gx is L and the decimal value of k LSBs of gx′ is S. The deviation d is equal to L-S. Now gx′ is optimized using (1). This gx′ value is final.Figure 2
Original and stego-blocks of size 2 × 3.
(a) (b)For i = 1 to 5, five difference valuesdi=|gx′-gi| are calculated. Table 1 is the range table for type 1 and Table 2 is the range table for type 2. The value di belongs to a range in the range table whose lower bound is li and embedding capacity is ti. For i = 1 to 5, take ti binary bits from secret data stream and convert it to decimal value si. Now, for i = 1 to 5 calculate new difference values using (8). (8)di′=li+siFor i = 1 to 5, for each gi, two new values, namely, gi′′ and gi′′′, are calculated using (9). (9)gi′′=gx′-di′,gi′′′=gx′+di′Now, for i = 1 to 5, the stego-value of gi is known as gi′. It is calculated using (10). (10)gi′=gi′′′,ifgi′′<0gi′′,ifgi′′′>255gi′′,ifgi-gi′′<gi-gi′′′andgi′′≥0andgi′′′≤255gi′′′,otherwiseThus the block of Figure 2(a) is converted to its stego-block as shown in Figure 2(b).The extraction of the secret embedded data is done by the procedure as described below. The image is partitioned into blocks as was done in embedding procedure. A stego-block is shown in Figure2(b). From the pixel gx′, the k least significant bits are extracted. For i = 1 to 5, five difference values are calculated using (11). (11)di′=gx′-gi′The difference di′ belongs to a range in the range table whose embedding capacity is ti and lower bound is li. Note that out of two range tables, the one that was used during embedding is the same one that should be used during extraction. The decimal equivalents of secret bit streams embedded in gi′ is si. It is calculated using (12). (12)si=di′-liFinally, for i = 1 to 5, each si is converted to ti binary bits. These bits are the embedded data.


### 3.2. Example of Embedding and Extraction for Proposed Technique-Variant 1 and FOBP

To understand the embedding procedure, let us consider the original block in Figure3(a). Suppose the secret data to be embedded is 100 1111 101 000 001 001. Let us choose the k value as 3 and Table 1 as the range table. The value of gx is 181. The values of g1, g2, g3, g4, and g5 are 255, 200, 190, 192, and 182, respectively. The gx in binary is 101101012. Take 3 bits of data, i.e., 100 from the secret data stream and embed in gx using LSB substitution. The new binary value is 101101002 and its decimal equivalent is 180; thus gx′ is 180. The decimal value of 3 LSBs of gx is 5 and the decimal value of 3 LSBs of gx′ is 4. The deviation d is equal to 5-4 = 1. Now gx′ is optimized using (1). Hence final value of gx′ after optimization is 180.Figure 3
Examples of 2 × 3 original and stego-blocks.
(a)
Original block (b)
Stego-blockNow the five difference values ared1=180-255=75, d2=180-200=20, d3=180-190=10, d4=180-192=12, and d5=180-182=2. The value d1 belongs to the range [64,255], so t1=4 and l1=64. The value d2 belongs to the range [16,31], so t2 = 3 and l2 = 16. Similarly, t3 = 3, l3 = 8, t4 = 3, l4 = 8, t5 = 3, and l5 = 0. Take t1, t2, t3, t4, and t5 binary bits from secret data stream and convert them to decimal values s1, s2, s3, s4, and s5, respectively. Hence s1=15, s2=5, s3=0, s4=1, and s5=1.Using (8), d1′=64+15=79, d2′ = 16+5 = 21, d3′ = 8 + 0 = 8, d4′ = 8 + 1 = 9, and d5′ = 0 + 1 = 1. Using (9), g1′′=180-79=101, g1′′′=180+79=259, g2′′=180-21=159, g2′′′=180+21=201, g3′′=180-8=172, g3′′′=180+8=188, g4′′=180-9=171, g4′′′=180+9=189, g5′′=180-1=179, and g5′′′=180+1=181.Using (10), g1′ = 101, g2′ = 201, g3′ = 188, g4′ = 189, and g5′ = 181. Hence the stego-block is as shown in Figure 3(b).To understand the extraction procedure, let us consider the stego-block in Figure3(b). The value of gx′ is 180 and in binary is 101101002; the three LSBs, 1002, are extracted. Using (11), d1′=180-101=79, d2′=180-201=21, d3′=180-188=8, d4′=180-189=9, and d5′=180-181=1. The value d1′ belongs to [64,255], so t1=4 and l1=64. The value d2′ belongs to [16,31], so t2=3, l2=16. Similarly, t3=3, l3=8, t4=3, l4=8, t5=3, and l5=0.Using (12), s1=15, s2=5, s3=0, s4=1, and s5=1. Converting s1, s2, s3, s4, and s5 to t1, t2, t3, t4, and t5 binary bits, we get 1111 101 000 001 001. From gx′, we had extracted 1002. Thus the total data extracted is 100 1111 101 000 001 001.Fall of Boundary Problem (FOBP). A pixel of a gray image is represented in 8 bits. The decimal value of a pixel falls in the range {0,255}. If a stego-pixel value is less than zero or greater than 255, then we declare that a FOBP has arisen. Khodaei and Faez’s LSB+PVD approach is a very fantastic one and has higher embedding capacity and PSNR, but it suffers with FOBP.Khodaei and Faez’s Technique Suffers with FOBP. It can be understood from the following discussion. Let us consider a 1 × 3 pixel block as shown in Figure 4(a). The secret data stream to be embedded is 100 001 1111 000, etc. The middle pixel, i.e., gx, is 181; its binary value in 8 bits is 101101012. The values of gl and gr are 182 and 255, respectively. Let us choose k = 3 and Table 1 as range table. The 3 bits of data from the secret data stream is 100. After applying 3 bit LSB substitution, the binary value of gx changes to 101101002, which is equal to 180 in decimal. Thus the value of gx′ is 180. The three least significant bits of gx are 101; in decimal it is 5. The three least significant bits of gx′ are 100; in decimal it is 4. Thus d = L-S = 5-4 = 1. By applying (1), the optimized value of gx′ is 180, as shown in Figure 4(b).Figure 4
Embedding example in 1 × 3 blocks.
(a) (b) (c)Now we calculate two difference valuesd1=|gx′-gl|=180-182=2 and d2=180-255=75. The difference d1 belongs to the range {0,7}, so l1 and t1 value are 0 and 3, respectively. The next 3 bits of data from the secret data stream are 001; its decimal value is 1, i.e., s1 = 1. The new difference d1′ is 0 + 1 = 1, as per (2). The difference d2 belongs to the range {64,255}, so l2 and t2 value are 64 and 4, respectively. The next 4 bits of data from the secret data stream are 1111; its decimal value is 15, i.e., s2=15. The new difference d2′ is 64 + 15 = 79, as per (2).Now by referring to (3), gl′′=gx′-d1′=180-1=179, gl′′′=gx′+d1′=180+1=181, gr′′=gx′-d2′=180-79=101, and gr′′′=gx′+d2′=180+79=259. By referring to (4) and (5) gl′ and gr′ are calculated. This is shown as (13) and (14), respectively. (13)gl′=179,if182-179<182-181and0≤179≤255181,otherwise=181(14)gr′=101,if255-101<255-259and0≤101≤255259,otherwise=259Hence the gl′ = 181 and gr′ = 259. The stego-block is as shown in Figure 4(c). A FOBP occurred. Thus the embedding procedure of Khodaei and Faez’s technique needs some modification.


### 3.3. Proposed Variant 2: Eight Directional PVD with Modified LSB Substitution

The image is divided into nonoverlapping blocks of size 3 × 3; i.e., a block comprises 9 pixels from three adjacent rows and three adjacent columns of the image, as shown in Figure5(a). Image is viewed as a two-dimensional matrix of pixels/bytes. On pixel gx, k bit LSB substitution is applied. The k value can be chosen from 3, 4, or 5. An ideal value for k will be 3. After k bit LSB substitution gx becomes gx′. Suppose the decimal value of k LSBs of gx is L and the decimal value of k LSBs of gx′ is S. The deviation d is equal to L-S. Now gx′ is optimized using (1). This gx′ value is final.Figure 5
Original and stego-blocks of size 3 × 3.
(a) (b)For i = 1 to 8, eight difference valuesdi=|gx′-gi| are calculated. Table 1 is the range table for type 1 and Table 2 is the range table for type 2. The value di belongs to a range in the range table whose lower bound is li and embedding capacity is ti. For i = 1 to 8, take ti binary bits from secret data stream and convert it to decimal value si. Now, for i = 1 to 8 calculate new difference values using (15).(15)di′=li+siFor i = 1 to 8, for each gi, two new values, namely, gi′′ and gi′′′, are calculated using (16). (16)gi′′=gx′-di′,gi′′′=gx′+di′Now, for i = 1 to 8, gi′, the stego-value of gi is calculated using (17).(17)gi′=gi′′′,ifgi′′<0gi′′,ifgi′′′>255gi′′,ifgi-gi′′<gi-gi′′′andgi′′≥0andgi′′′≤255gi′′′,otherwiseThus the block of Figure 5(a) is converted to its stego-block as shown in Figure 5(b).The extraction of hidden data is done by the procedure described below. From the stego-image blocks are formed as in embedding procedure. A stego-block is as shown in Figure5(b). From the pixel gx′, k least significant bits are extracted. For i = 1 to 8, eight difference values are calculated using (18). (18)di′=gx′-gi′The difference di′ belongs to a range in the range table whose embedding capacity is ti and lower bound is li. Note that out of two range tables, the one that was used during embedding is the same one that should be used during extraction. The decimal equivalent of secret bit stream embedded in gi′ is si. It is calculated using (19). (19)si=di′-liFinally, for i = 1 to 8, each si is converted to ti binary bits. These bits are the embedded data.


## 3.1. Proposed Variant 1: Five Directional PVD with Modified LSB Substitution

The image is divided into nonoverlapping blocks of size 2 × 3; i.e., a block comprises 6 pixels from two adjacent rows and three adjacent columns of the image, as shown in Figure2(a). The image is viewed as a two-dimensional matrix of pixels/bytes. On pixel gx, k bit LSB substitution is applied. The k value can be chosen from 3, 4, or 5. An ideal value for k is 3. After k bit LSB substitution gx becomes gx′. Suppose the decimal values of k LSBs of gx is L and the decimal value of k LSBs of gx′ is S. The deviation d is equal to L-S. Now gx′ is optimized using (1). This gx′ value is final.Figure 2
Original and stego-blocks of size 2 × 3.
(a) (b)For i = 1 to 5, five difference valuesdi=|gx′-gi| are calculated. Table 1 is the range table for type 1 and Table 2 is the range table for type 2. The value di belongs to a range in the range table whose lower bound is li and embedding capacity is ti. For i = 1 to 5, take ti binary bits from secret data stream and convert it to decimal value si. Now, for i = 1 to 5 calculate new difference values using (8). (8)di′=li+siFor i = 1 to 5, for each gi, two new values, namely, gi′′ and gi′′′, are calculated using (9). (9)gi′′=gx′-di′,gi′′′=gx′+di′Now, for i = 1 to 5, the stego-value of gi is known as gi′. It is calculated using (10). (10)gi′=gi′′′,ifgi′′<0gi′′,ifgi′′′>255gi′′,ifgi-gi′′<gi-gi′′′andgi′′≥0andgi′′′≤255gi′′′,otherwiseThus the block of Figure 2(a) is converted to its stego-block as shown in Figure 2(b).The extraction of the secret embedded data is done by the procedure as described below. The image is partitioned into blocks as was done in embedding procedure. A stego-block is shown in Figure2(b). From the pixel gx′, the k least significant bits are extracted. For i = 1 to 5, five difference values are calculated using (11). (11)di′=gx′-gi′The difference di′ belongs to a range in the range table whose embedding capacity is ti and lower bound is li. Note that out of two range tables, the one that was used during embedding is the same one that should be used during extraction. The decimal equivalents of secret bit streams embedded in gi′ is si. It is calculated using (12). (12)si=di′-liFinally, for i = 1 to 5, each si is converted to ti binary bits. These bits are the embedded data.


## 3.2. Example of Embedding and Extraction for Proposed Technique-Variant 1 and FOBP

To understand the embedding procedure, let us consider the original block in Figure3(a). Suppose the secret data to be embedded is 100 1111 101 000 001 001. Let us choose the k value as 3 and Table 1 as the range table. The value of gx is 181. The values of g1, g2, g3, g4, and g5 are 255, 200, 190, 192, and 182, respectively. The gx in binary is 101101012. Take 3 bits of data, i.e., 100 from the secret data stream and embed in gx using LSB substitution. The new binary value is 101101002 and its decimal equivalent is 180; thus gx′ is 180. The decimal value of 3 LSBs of gx is 5 and the decimal value of 3 LSBs of gx′ is 4. The deviation d is equal to 5-4 = 1. Now gx′ is optimized using (1). Hence final value of gx′ after optimization is 180.Figure 3
Examples of 2 × 3 original and stego-blocks.
(a)
Original block (b)
Stego-blockNow the five difference values ared1=180-255=75, d2=180-200=20, d3=180-190=10, d4=180-192=12, and d5=180-182=2. The value d1 belongs to the range [64,255], so t1=4 and l1=64. The value d2 belongs to the range [16,31], so t2 = 3 and l2 = 16. Similarly, t3 = 3, l3 = 8, t4 = 3, l4 = 8, t5 = 3, and l5 = 0. Take t1, t2, t3, t4, and t5 binary bits from secret data stream and convert them to decimal values s1, s2, s3, s4, and s5, respectively. Hence s1=15, s2=5, s3=0, s4=1, and s5=1.Using (8), d1′=64+15=79, d2′ = 16+5 = 21, d3′ = 8 + 0 = 8, d4′ = 8 + 1 = 9, and d5′ = 0 + 1 = 1. Using (9), g1′′=180-79=101, g1′′′=180+79=259, g2′′=180-21=159, g2′′′=180+21=201, g3′′=180-8=172, g3′′′=180+8=188, g4′′=180-9=171, g4′′′=180+9=189, g5′′=180-1=179, and g5′′′=180+1=181.Using (10), g1′ = 101, g2′ = 201, g3′ = 188, g4′ = 189, and g5′ = 181. Hence the stego-block is as shown in Figure 3(b).To understand the extraction procedure, let us consider the stego-block in Figure3(b). The value of gx′ is 180 and in binary is 101101002; the three LSBs, 1002, are extracted. Using (11), d1′=180-101=79, d2′=180-201=21, d3′=180-188=8, d4′=180-189=9, and d5′=180-181=1. The value d1′ belongs to [64,255], so t1=4 and l1=64. The value d2′ belongs to [16,31], so t2=3, l2=16. Similarly, t3=3, l3=8, t4=3, l4=8, t5=3, and l5=0.Using (12), s1=15, s2=5, s3=0, s4=1, and s5=1. Converting s1, s2, s3, s4, and s5 to t1, t2, t3, t4, and t5 binary bits, we get 1111 101 000 001 001. From gx′, we had extracted 1002. Thus the total data extracted is 100 1111 101 000 001 001.Fall of Boundary Problem (FOBP). A pixel of a gray image is represented in 8 bits. The decimal value of a pixel falls in the range {0,255}. If a stego-pixel value is less than zero or greater than 255, then we declare that a FOBP has arisen. Khodaei and Faez’s LSB+PVD approach is a very fantastic one and has higher embedding capacity and PSNR, but it suffers with FOBP.Khodaei and Faez’s Technique Suffers with FOBP. It can be understood from the following discussion. Let us consider a 1 × 3 pixel block as shown in Figure 4(a). The secret data stream to be embedded is 100 001 1111 000, etc. The middle pixel, i.e., gx, is 181; its binary value in 8 bits is 101101012. The values of gl and gr are 182 and 255, respectively. Let us choose k = 3 and Table 1 as range table. The 3 bits of data from the secret data stream is 100. After applying 3 bit LSB substitution, the binary value of gx changes to 101101002, which is equal to 180 in decimal. Thus the value of gx′ is 180. The three least significant bits of gx are 101; in decimal it is 5. The three least significant bits of gx′ are 100; in decimal it is 4. Thus d = L-S = 5-4 = 1. By applying (1), the optimized value of gx′ is 180, as shown in Figure 4(b).Figure 4
Embedding example in 1 × 3 blocks.
(a) (b) (c)Now we calculate two difference valuesd1=|gx′-gl|=180-182=2 and d2=180-255=75. The difference d1 belongs to the range {0,7}, so l1 and t1 value are 0 and 3, respectively. The next 3 bits of data from the secret data stream are 001; its decimal value is 1, i.e., s1 = 1. The new difference d1′ is 0 + 1 = 1, as per (2). The difference d2 belongs to the range {64,255}, so l2 and t2 value are 64 and 4, respectively. The next 4 bits of data from the secret data stream are 1111; its decimal value is 15, i.e., s2=15. The new difference d2′ is 64 + 15 = 79, as per (2).Now by referring to (3), gl′′=gx′-d1′=180-1=179, gl′′′=gx′+d1′=180+1=181, gr′′=gx′-d2′=180-79=101, and gr′′′=gx′+d2′=180+79=259. By referring to (4) and (5) gl′ and gr′ are calculated. This is shown as (13) and (14), respectively. (13)gl′=179,if182-179<182-181and0≤179≤255181,otherwise=181(14)gr′=101,if255-101<255-259and0≤101≤255259,otherwise=259Hence the gl′ = 181 and gr′ = 259. The stego-block is as shown in Figure 4(c). A FOBP occurred. Thus the embedding procedure of Khodaei and Faez’s technique needs some modification.


## 3.3. Proposed Variant 2: Eight Directional PVD with Modified LSB Substitution

The image is divided into nonoverlapping blocks of size 3 × 3; i.e., a block comprises 9 pixels from three adjacent rows and three adjacent columns of the image, as shown in Figure5(a). Image is viewed as a two-dimensional matrix of pixels/bytes. On pixel gx, k bit LSB substitution is applied. The k value can be chosen from 3, 4, or 5. An ideal value for k will be 3. After k bit LSB substitution gx becomes gx′. Suppose the decimal value of k LSBs of gx is L and the decimal value of k LSBs of gx′ is S. The deviation d is equal to L-S. Now gx′ is optimized using (1). This gx′ value is final.Figure 5
Original and stego-blocks of size 3 × 3.
(a) (b)For i = 1 to 8, eight difference valuesdi=|gx′-gi| are calculated. Table 1 is the range table for type 1 and Table 2 is the range table for type 2. The value di belongs to a range in the range table whose lower bound is li and embedding capacity is ti. For i = 1 to 8, take ti binary bits from secret data stream and convert it to decimal value si. Now, for i = 1 to 8 calculate new difference values using (15).(15)di′=li+siFor i = 1 to 8, for each gi, two new values, namely, gi′′ and gi′′′, are calculated using (16). (16)gi′′=gx′-di′,gi′′′=gx′+di′Now, for i = 1 to 8, gi′, the stego-value of gi is calculated using (17).(17)gi′=gi′′′,ifgi′′<0gi′′,ifgi′′′>255gi′′,ifgi-gi′′<gi-gi′′′andgi′′≥0andgi′′′≤255gi′′′,otherwiseThus the block of Figure 5(a) is converted to its stego-block as shown in Figure 5(b).The extraction of hidden data is done by the procedure described below. From the stego-image blocks are formed as in embedding procedure. A stego-block is as shown in Figure5(b). From the pixel gx′, k least significant bits are extracted. For i = 1 to 8, eight difference values are calculated using (18). (18)di′=gx′-gi′The difference di′ belongs to a range in the range table whose embedding capacity is ti and lower bound is li. Note that out of two range tables, the one that was used during embedding is the same one that should be used during extraction. The decimal equivalent of secret bit stream embedded in gi′ is si. It is calculated using (19). (19)si=di′-liFinally, for i = 1 to 8, each si is converted to ti binary bits. These bits are the embedded data.


## 4. Results and Discussion

The proposed technique (variant 1 and 2) is experimented using MATLAB programming. The test images are taken from SIPI database [26]. The eight sample images are shown in Figure 6. These are RGB color images of size 512 × 512. Each pixel consists of 3 bytes. Each byte is treated like a pixel for computation point of view. Figure 7 represents the stego-images of Lena and Baboon for proposed variant 1. Figure 8 represents the stego-images of Lena and Baboon for proposed variant 2. It can be observed from the stego-images that there is no distortion observable to be suspected as stego-images; they are as good as original images. In each of these stego-images 840000 bits (eight lakhs and forty thousand bits) of data is hidden.Figure 6
Original images.Figure 7
Stego-images of proposed variant 1: five directional PVD with M-LSB substitution.Figure 8
Stego-images of proposed variant 2: eight directional PVD with M-LSB substitution.The proposed technique is compared with the Khodaei and Faez’s technique in terms of PSNR, hiding capacity, quality index (Q), and bits per byte (BPB). The formulae to measure these parameters are referred to in [27]. The number of cases of fall off boundary arisen during execution is recorded for these techniques. From Table 3 it can be observed that in both type 1 and type 2 of Khodaei and Faez’s technique FOBP arises. Further from Tables 4 and 5 it can be observed that both the variants of proposed technique do not suffer with FOBP. In proposed technique the hiding capacity and bit rate are higher than those of Khodaei and Faez’s technique, but PSNR is slightly lower than that of Khodaei and Faez’s technique.Table 3
Results of Khodaei and Faez's PVD technique [11].
Images 512 × 512 × 3 Type 1 Type 2 PSNR Capacity Q bit rate FOBP PSNR Capacity Q bit rate FOBP Lena 41.74 2375248 0.999 3.02 98 40.46 2434603 0.999 3.09 121 Baboon 37.27 2443361 0.998 3.10 12 34.19 2662080 0.996 3.38 26 Tiffany 38.7 2372396 0.997 3.01 12045 39.27 2416944 0.998 3.07 11994 Peppers 38.57 2372858 0.999 3.01 0 36.91 2435223 0.998 3.09 2 Jet 39.98 2374048 0.998 3.01 0 40.13 2418419 0.998 3.07 0 Boat 39.18 2391994 0.999 3.04 0 36.9 2504613 0.996 3.18 7 House 38.58 2387183 0.998 3.03 4 37.97 2470824 0.998 3.14 16 Pot 40.33 2366001 0.999 3.00 0 37 2387494 0.999 3.03 0 Average 39.29 2385386 0.998 3.03 1520 37.85 2466275 0.998 3.13 1521Table 4
Results of proposed variant 1: five directional PVD with M-LSB substitution.
Images 512 × 512 × 3 Type 1 Type 2 PSNR Capacity Q bit rate FOBP PSNR Capacity Q bit rate FOBP Lena 41.14 2379222 0.999 3.03 0 39.58 2451046 0.999 3.12 0 Baboon 34.35 2496404 0.996 3.17 0 31.72 2816768 0.993 3.58 0 Tiffany 37.27 2376135 0.996 3.02 0 35.74 2432745 0.995 3.09 0 Peppers 35.56 2379292 0.998 3.03 0 35.45 2459762 0.998 3.13 0 Jet 39.57 2384676 0.998 3.03 0 39.73 2454060 0.998 3.12 0 Boat 35.84 2409235 0.998 3.06 0 34.16 2565007 0.997 3.26 0 House 36.9 2404582 0.998 3.06 0 36.46 2533362 0.997 3.22 0 Pot 40.35 2369274 0.999 3.01 0 36.96 2399556 0.999 3.05 0 Average 37.62 2399853 0.998 3.05 0 36.23 2514038 0.997 3.20 0Table 5
Results of proposed variant 2: eight directional PVD with M-LSB substitution.
Images 512 × 512 × 3 Type 1 Type 2 PSNR Capacity Q bit rate FOBP PSNR Capacity Q bit rate FOBP Lena 41.04 2371255 0.999 3.02 0 39.38 2533551 0.999 3.22 0 Baboon 33.76 2502616 0.996 3.18 0 31.23 2939376 0.992 3.74 0 Tiffany 37.2 2366437 0.996 3.01 0 34.71 2511139 0.994 3.19 0 Peppers 35.15 2371837 0.998 3.02 0 34.1 2544392 0.997 3.24 0 Jet 39.52 2377031 0.998 3.02 0 39.2 2538801 0.998 3.23 0 Boat 35.32 2405009 0.998 3.06 0 33.17 2659795 0.997 3.38 0 House 37.58 2399229 0.998 3.05 0 36.66 2625804 0.998 3.34 0 Pot 40.34 2359271 0.999 3.00 0 36.33 2475977 0.999 3.15 0 Average 37.49 2394086 0.998 3.04 0 35.60 2603604 0.997 3.31 0Furthermore the PSNR and hiding capacity of three closely related techniques discussed in [12, 13, 19] are recorded in Table 6. Techniques in [12, 13] are extension of Khodaei and Faez’s [11] technique, so they suffer with FOBP. Technique in [19] is extension of Wu and Tsai’s [1] PVD technique. It also suffers with FOBP. Although the PSNR values of these three techniques are greater than that of the proposed technique, the hiding capacity of the proposed technique is higher than these techniques.Table 6
Results of existing techniques [12, 13, 19].
Images 512 × 512 × 3 LSB + 3PVD technique [12] LSB + 5PVD technique [13] 7 way PVD [19] Type 1 Type 2 Type 1 Type 2 PSNR Capacity PSNR Capacity PSNR Capacity PSNR Capacity PSNR Capacity Lena 42.22 2361875 40.83 2437700 41.84 2362944 39.98 2451046 40.81 1896662 Baboon 34.66 2393475 32.34 2772545 34.32 2396696 31.99 2816768 33.28 2226806 Tiffany 42.02 2363192 41.50 2425193 40.59 2363455 40.37 2432745 40.38 1400756 Peppers 39.27 2364428 38.04 2447737 38.16 2365366 36.50 2459762 39.63 1778072 Jet 41.81 2365839 41.90 2443492 41.26 2366486 40.62 2454060 40.36 1906254 Boat 38.04 2370147 36.13 2539530 37.10 2372127 34.76 2565007 37.14 1972086 House 39.66 2366686 38.73 2510373 38.59 2368303 37.51 2533362 37.83 1972223 Pot 42.39 2364360 41.17 2394782 40.26 2364549 36.95 2399556 41.81 1795551 Average 40.01 2368750 38.83 2496419 39.02 2369991 37.34 2514038 38.91 1868551The proposed technique has been compared with the techniques in [16, 24, 25] as shown in Table 7. The technique in [16] is an adaptive PVD technique with two variants. The hiding capacity of the proposed technique (in all the four variants) is greater than this technique. As the hiding capacity of the adaptive PVD technique is very less, PSNR is comparatively higher than the proposed technique. The hybrid technique in [24] is a mixture of PVD, LSB substitution, and EMD. All the four variants of this technique possess lesser hiding capacity as compared to the proposed technique. In [25] the two variants of eight directional PVD technique have been discussed. The PSNR and hiding capacity of the proposed technique (type 1) are as good as those of the technique in [25] (type 1). Similarly, the PSNR and hiding capacity of the proposed technique (type 2) are as good as those of the technique in [25] (type 2).Table 7
Comparison of techniques in [16, 24, 25].
Technique PSNR Capacity Amount of hidden data in stego-image to compute PSNR 2 × 3 adaptive PVD [16] 50.93 1445645 One lakh and forty thousand (1,40,000) bits 3 × 2 adaptive PVD [16] 50.93 1435623  3 PVD +3 LSB +EMD, type 1 [24] 41.07 1686041 Seven lakhs (7,00,000) bits 3 PVD +3 LSB +EMD, type 2 [24] 38.95 1798834 7 PVD +3 LSB +EMD, type 1 [24] 40.28 1710888 7 PVD +3 LSB +EMD, type 2 [24] 37.26 1823282  Eight directional PVD, type 1 [25] 39.55 2361368 Seven lakhs (7,00,000) bits Eight directional PVD, type 2 [25] 37.22 2603604  Proposed five directional PVD+MLSB, type 1 37.62 2399853 Eight lakhs and forty thousand (8,40,000) bits Proposed five directional PVD+MLSB, type 2 36.23 2514038 Proposed eight directional PVD+MLSB, type 1 37.49 2394086 Proposed eight directional PVD+MLSB, type 2 35.60 2603604The proposed technique (variant 1 and variant 2) uses LSB substitution and PVD, so it needs to be analyzed by both RS analysis and PDH analysis. Figure9 represents the PDH analysis using Lena, Baboon, Jet, and Tiffany images for type 1 and type 2 of Khodaei and Faez’s technique. There are eight subfigures in it. Each subfigure represents two curves. The solid line curve is for the original image and the dotted line curve is for the stego-image. The curve of original image will be smooth in nature, i.e., free from zig-zag appearance. This zig-zag appearance is called step effect. For Lena image the step effect is clearly identified, and for the other three images it is slightly identified. For the proposed variant 1 the PDH analysis is shown in Figure 10. The step effects are reduced as compared to that of Khodaei and Faez’s technique. For the proposed variant 2 the PDH analysis is shown in Figure 11. The step effects do not exist at all.Figure 9
PDH analysis of Khodaei and Faez’s PVD technique.Figure 10
PDH analysis of proposed variant 1: five directional PVD with M-LSB substitution.Figure 11
PDH analysis of proposed variant 2: eight directional PVD with LSB substitution.The RS analysis of Khodaei and Faez’s technique and the proposed technique is shown in Figures12–14, using Lena and Baboon images. It is carried out by computing 4 parameters such as R-m, S-m, Rm, and Sm [27]. If the condition Rm≈R-m>Sm≈S-m is true, then RS analysis fails to detect the steganography technique. However, if the condition R-m-S-m>Rm-Sm is true, then the RS analysis succeeds in detecting the steganography technique. From these figures it is evident that Khodaei and Faez’s technique and the proposed technique both escape from RS analysis.Figure 12
RS analysis of Khodaei and Faez’s PVD technique over Lena and Baboon images.Figure 13
RS analysis of proposed variant 1: five directional PVD with M-LSB substitution over Lena and Baboon images.Figure 14
RS analysis of proposed variant 2: eight directional PVD with M-LSB substitution over Lena and Baboon images.


## 5. Conclusion

Steganography techniques, those using the principles of LSB substitution and PVD, need to address three issues: (i) fall off boundary problem (FOBP), (ii) pixel difference histogram (PDH) analysis, and (iii) RS analysis. This paper proposes a steganography technique in two variants using LSB substitution and PVD. The first variant operates on 2 × 3 pixel blocks and the second variant operates on 3 × 3 pixel blocks. In one of the pixels of a block embedding is performed using modified LSB substitution. Based on the new value of this pixel, difference values with other neighboring pixels are calculated. Using these differences, PVD approach is applied. The edges in multiple directions are exploited, so PDH analysis cannot detect this steganography. The LSB substitution is performed in only one pixel of the block, so RS analysis also cannot detect this steganography. The FOBP is addressed by introducing suitable equations in the embedding procedure. The experimental results such as bit rate and PSNR are satisfactory.



---

*Source: 1505896-2018-09-04.xml*