Digital Image Steganography using Nine-Pixel Differencing and Modified LSB Substitution

To provide higher embedding capacity without sacrificing the imperceptibility, a novel steganographic technique based on nine-pixel differencing with modified Least Significant Bit (LSB) substitution is proposed. The image is divided into 3×3 non-overlapping blocks. In each block the average difference value is calculated. Based on this value the block is classified to fall into one of the four levels such as, lower, lower-middle, higher-middle, and higher. If a block belongs to lower level then 2-bit LSB substitution is used in it. Similarly, for lower-middle, higher-middle, and higher level blocks 3, 4, and 5 bit LSB substitution is used. After LSB substitution the pixel values are readjusted to minimize distortion such that these modified values do not disturb the embedded bits. The experimental results reveal that the stego-images are imperceptible and hiding capacity is higher.


Introduction
Steganography is an art of invisible communication, wherein the secret message is sent through a cover medium like image, audio, and video 1 .Digital Image steganography methods are of two categories such as, (i) spatial domain methods, and (ii) frequency domain methods.The image with which the secret message is transmitted is called as the stego-image.By hiding the secret message inside an image, there will be the change in statistics, but this change should be very less such that the intruder will not suspect it 2 .The Least Significant Bit (LSB) substitution method is the simplest and well known image steganographic method.But it is vulnerable to varieties of attacks.So it is strengthened by making some alterations.The LSBs of the various pixels can be grouped together to form an array and the binary secret message can be embedded at a maximum matching portion of it, so that the distortion will be minimum 3,4 .Pharwaha 5 proposed a Moderate Bit Substitution (MBS) data hiding scheme such that a secret data bit is embedded at a position next to first zero appearing at any of the first three LSB positions in the pixel, but the pixel is avoided if the first three LSBs in it are '111' .This scheme leads to the random selection of bit positions in the given image pixel, so that security is enhanced.If we hide adaptive number of bits in different pixels, then both the security and capacity can be increased 6,7 .Swain and Lenka [8][9][10] proposed message bit dependent LSB embedding schemes, wherein the embedding locations in a pixel are randomized depending on the bit pattern of the secret data.For smaller size secret messages only the LSBs of brighter and darker pixels can be targeted, so that embedding can be randomized and security can be improved 11,12 .A pixel in a colored image comprises of 3 bytes.The LSB substitution for colored images can be done differently.One of the bytes can be the indicator to indicate the existence of hidden data in other two bytes [13][14][15][16] .
Wu and Tsai 17 proposed Pixel Value Differencing (PVD) steganography with an idea that more number of bits can be embedded in edge areas compared to smooth areas of the image.This scheme is based on the substitution of a pixel value difference by a new difference value in every non-overlapping block of two consecutive pixels.Other improved forms of PVD techniques have also been proposed in literature [18][19][20] .With a slight modification to these original PVD techniques, the side match techniques based on the correlation of a pixel with its surrounding pixels has also been evolved.Chang and Tseng 21 proposed two-sided, three-sided and four-sided side match methods by exploiting the correlation of a target pixel with its two, three, and four neighboring pixels respectively.PVD techniques with maximum difference of neighboring pixel values have been proposed in 22,23 .The Fall In Error Problem (FIEP) which was observed in Chang and Tseng's method is addressed in 24 .LSB substitution provides high capacity and less distortion, but not secured.PVD techniques provide high security and more distortion.Wu et al. 25 proposed a technique with 2-pixel blocks using PVD and 3-bit LSB substitution to achieve high embedding capacity and more security.But it is observed that this technique enforces 3-bit LSB substitution in almost 90% of the blocks 26 .Furthermore Liao et al. 27 has proposed a modified LSB substitution in 4-pixel blocks after calculating pixel value differences.But the step-6 of the embedding procedure i.e. readjusting procedure, searches the new value of the pixels from a large number of possible values, which is not computationally feasible.
Being inspired by Wu et al. 25 and Liao et al. 27 schemes and to achieve higher capacity and higher security, a steganographic tehnique with nine-pixel differencing and modified LSB substitution has been proposed in this paper.
In section 2 the proposed technique is described.The results are discussed and compared with the results of Wu et al. 's LSB+PVD scheme in section 3. Finally, the paper is concluded in section 4.

Nine-Pixel Differencing and Modified LSB Substitution Technique
The image is scanned in raster scan order and is partitioned into non-overlapping blocks consisting 3 × 3 pixels as shown in Figure 1, where x 0 , x 1 , x 2 , x 3 , x 4 , x 5 , x 6 , x 7 , and x 8 are the different pixel values.The average difference value, d of the block is calculated as in equation 1, where x min is the minimum value of x i , for i = 0, 1, 2, …, 8. Suppose n-bit LSB substitution is applied in a block, where n value is 2, 3, 4, and 5 corresponding to lower, lower-middle, higher-middle, and higher level respectively.The two LSBs of x 8 i.e. 7 th and 8 th bit locations are reserved to behave as indicator during extraction, but the other bit locations like 4 th , 5 th , and 6 th can be utilized for data embedding if granted as per the block-level.These 7 th and 8 th bits are set to 00 if the block belongs to lower level.Similarly, these two bits are set to 01, 10, and 11 if the block belongs to lower-middle, higher-middle, and higher level respectively.Thus a block can hide a total of (9 × n -2) number of bits.Let y 0 , y 1 , y 2 , y 3 , y 4 , y 5 , y 6 , y 7 , and y 8 are the new pixel values corresponding to x 0 , x 1 , x 2 , x 3 , x 4 , x 5 , x 6 , x 7 , and x 8 respectively.
After applying the n-bit LSB substitution, now the adjustments are applied to y i , for i = 0, 1…8, as in equation 2 below, to minimize the distortion.Where z i , for i = 0, 1…8, modified values.
After this adjustment if the z i value falls off boundary {0, 255}, then the equation 3 is applied to enforce it to fall with in boundary {0, 255}.Now, the final stego-block comprises of the pixel values z 0 , z 1 , z 2 , z 3 , z 4 , z 5 , z 6 , z 7 , and z 8 as in Figure 2 corresponding to the original pixel block given in Figure 1.
The extraction procedure is very simple.The stegoimage is scanned in raster scan order and is partitioned into non-overlapping blocks consisting 3 × 3 pixels as in embedding.Let s 0 , s 1 , s 2 , s 3 , s 4 , s 5 , s 6 , s 7 , and s 8 are the different stego-pixel values and the pixel s 8 is represented by the eight bits as: This proposed scheme differs from Liao et al. 27 scheme in the following points.Firstly, the proposed scheme is based on nine pixel differencing and Liao et al. 's scheme is based on four pixel differencing.Secondly, the proposed scheme adaptively embeds messages using four levels (lower, lower-middle, higher-middle, and higher), where as Liao et al. 's scheme uses only two levels (lower and higher).Thirdly, the sixth step in Liao et al. 's scheme called as "readjustment procedure", searches the new value of the pixels from a large number of possible values, which is not computationally feasible.The readjustment procedure in the proposed scheme is complete different and is as given in equation 2.

Results and Discussion
The proposed scheme is implemented using MATLAB.Figure 3 represents a set of original color images of size 256 × 256 and Figure 4 represents the corresponding stego-images with 3,50,000 bits of data hidden in each.Similarly, Figure 5 represents a set of original color images of size 512 × 512 and Figure 6 represents the corresponding stego-images with 14,000,000 bits of data hidden in each.The performance of the proposed scheme is compared with Wu et al. 's LSB+PVD scheme by the parameters, (i) mean square error (MSE), (ii) peak signal-to-noise ratio (PSNR), (iii) correlation, (r), and (iv) capacity.The capacity is measured in bits.A steganography technique should strive for getting higher capacity and lesser distortion.The smaller value of MSE refers to lesser distortion.Unlike MSE the higher PSNR value refers to lesser distortion.The correlation (r) is an estimation of similarity between the cover image and its stego-image.The maximum value of r can be 1, if both cover image and stego-image are the same.Thus a higher value of r implies lesser distortion.The equations to measure MSE, PSNR and correlation are as in 28 .
Table 1 represents a comparison between Wu et al. 's scheme with the proposed scheme in terms of MSE, PSNR, r, and capacity.The results for ten test images are as shown in this table.It can be observed from Table 1 that the hiding capacity is larger for the proposed scheme in seven images except the Jelly beans2, Tiffany and Pot.The PSNR value in the proposed scheme is higher in nine images except Baboon.So for the majority of the images the proposed scheme performs better than Wu et al. 's scheme.Furthermore, by taking the average value of the different comparison parameters the following advantages are observed in the proposed scheme.The MSE decreases by 0.5375, which is 8.19%.The increase in PSNR is 0.74, which is 1.83%.The correlation value, r is also increased by 0.0002 and the capacity is increased by 187069 bits, which is 14.66%.
In Table 2 the distribution of PVD and LSB blocks of Wu et al. 's scheme and the distribution of blocks to various levels in the proposed scheme are presented.It can be observed that in Wu et al. 's scheme almost 86.38% of the blocks are using 3-bit LSB substitution.In the proposed scheme only 74.74% of the blocks are using 3-bit LSB substitution.The rest 25.26% of the blocks are using 2-bit, 4-bit and 5-bit LSB substitution.By scattering the distribution of the blocks to these four levels and embedding variable number of bits in the different pixels, the security aspect has been addressed.It can also be observed from Figure 4 and Figure 6 that the stego-images are of good quality, they do not show any visible marks to be suspected and they are very much similar to their respective original images in Figure 3 and Figure 5.
The proposed scheme can escape from RS steganalysis.In the traditional 1-bit LSB substitution steganography if the LSB of cover image pixel value is equal to the message bit, the pixel value is not altered.Otherwise, the pixel value is altered from 2n to 2n + 1 or from 2n + 1 to 2n.But the alterations from 2n to 2n -1 or 2n + 1 to 2n + 2 do not occur.This asymmetry could be caught by RS steganalysis.In the proposed scheme n-bit LSB substitution is applied in a block, where n value is 2, 3, 4, and 5 corresponding to lower, lower-middle, higher-middle, and   higher level respectively.In case of 2-bit LSB substitution if the 2 LSBs of cover image pixel value are equal to the two message bits, the pixel value is not altered.Otherwise the pixel value alters from 2n to {2n + 1 or 2n -1 or 2n -2}, or 2n + 1 to {2n or 2n -1 or 2n -2} or 2n -1 to {2n or 2n + 1 or 2n -2}, or 2n -2 to {2n or 2n + 1 or 2n -1}.Note that a pixel value is considered in one of these four ways like {2n, 2n + 1, 2n -1, 2n -2}, where n = 1, 2, …, 127.Thus there is no asymmetry as arises in 1-bit LSB substitution.Similarly in 3-bit LSB, 4-bit LSB, and 5-bit LSB substitution also this asymmetry does not occur.From this discussion it is clear that the proposed scheme can escape from RS steganalysis.

Conclusion
To achieve higher embedding capacity and lesser distortion an adaptive and modified LSB substitution steganographic scheme has been proposed.The security has been addressed by hiding variable number of bits in different blocks by categorizing the blocks into one of the four levels (lower, lower-middle, higher-middle, and higher) based on average of pixel value differences in nine-pixel blocks.In a majority of the test cases the capacity of the proposed scheme is higher and the distortion is lower as compared to the Wu et al. 's LSB + PVD scheme.
The stego-images are imperceptible and do not show any visible marks to draw the attention of the intruders.The extraction can be done very simply by using the two LSBs of the 9 th pixel of every 3 × 3 block.
d ≤ 7, then the block belongs to lower-level and 2-bit LSB substitution is applied.If 8 ≤ d ≤ 15, then the block belongs to lower-middle level and 3-bit LSB substitution is applied.If 16 ≤ d ≤ 31, then the block belongs to higher-middle level and 4-bit LSB substitution is applied.If d ≥ 32, then the block belongs to higher level and 5-bit LSB substitution is applied.
s 8 = b 1 b 2 b 3 b 4 b 5 b 6 b 7 b 8 , where each b i for i = 1, 2... 8 is a bit.If b 7 b 8 is 00, then two LSBs from each of the pixels s 0, s 1 , s 2 , s 3 , s 4 , s 5 , s 6 , and s 7, are extracted and from s 8 nothing is extracted.If b 7 b 8 is 01, then three LSBs from each of the pixels s 0 , s 1 , s 2 , s 3 , s 4 , s 5 , s 6 , and s 7, are extracted and from s 8 the bit from 6 th location, i.e. b 6 is extracted.If b 7 b 8 is 10, then four LSBs from each of the pixels s 0 , s 1 , s 2 , s 3 , s 4 , s 5 , s 6 , and s 7 , are extracted and from s 8 the bits from 5 th and 6 th locations, i.e. b 5 b 6 are also extracted.If b 7 b 8 is 11, then five LSBs from each of the pixels s 0 , s 1 , s 2 , s 3 , s 4 , s 5 , s 6 , and s 7 , are extracted and from s 8 the bits from 4 th , 5 th and 6 th locations, i.e. b 4 b 5 b 6 are also extracted.

Figure 6 .
Figure 6.Stego-images with 14,000,000 bits of data hidden in each.

Table 1 .
Comparison of MSE, PSNR, r and Capacity

Table 2 .
Comparison of range counts