FPGA Implementation of Image Steganography Algorithms Using Generalized Exploiting Modification Direction and Pixel Segmentation Strategy
FPGA Implementation of Image Steganography Algorithms Using Generalized Exploiting Modification Direction and Pixel Segmentation Strategy
ABSTRACT
The generalized exploiting modification direction (GEMD) steganography algorithm is an enhancement of the
exploiting modification direction (EMD) algorithm to hide a high payload capacity with maintaining the quality of
the stego-image. This paper proposed a developed GEMD image steganography algorithm using improved pixel
segmentation strategy with an indicator bit (PSS-IB) to overcome the drawbacks of the previous EMD algorithms. The
proposed algorithm segments each block of pixels of the cover image into vector of coordinate area (VCA), an
indicator bit (IB) and vector modification area (VMA). The VCA vector is kept unchanged, the IB is flipped if
required and the VMA vector is modified. The VCA vector is segmented into "n" vectors to carry the secret data.
The modified VMA vector is obtained by applying the GEMD algorithm on these vectors. Furthermore, the
proposed algorithm is designed and FPGA implemented using Xilinx System Generator (XSG) on Spartan 3E Kit.
The experimental results prove that, the proposed algorithm has high embedding rate, high embedding payload
capacity, less computational complexity and keeping high stego-image quality compared to previous work.
Keywords: FPGA, Xilinx System Generator, Image Steganography, Pixel Segmentation Strategy with an Indicator
Bit (BSS-IB) and Generalized Exploiting Modification Direction.
I. INTRODUCTION
Steganography is the science of embedding a secret text in a cover image without leaving a remarkable track on the cover
image. The image steganography is a widely acceptable data hiding techniques [1], [2]. The steganography techniques are
generally categorized into spatial domain techniques and transform domain techniques. The spatial domain
techniques such as LSB based approach, EMD based approaches and Pixel Value Differencing (PVD) based
approaches. The transform domain techniques, such as DCT, DWT and IWT [3] – [5]. The EMD algorithm is a
spatial domain technique. There are different EMD algorithms that used to obtain an acceptable stego-image quality
as well as embed a large payload [6].
This paper proposed a developed GEMD image steganography algorithm that based on an improved Pixel
Segmentation Strategy with Indicator Bit (PSS-IB). The proposed algorithm overcomes the drawbacks of the previous
EMD algorithms [7]. The proposed algorithm has two procedures; an embedding procedure and an extracting procedure. During
the embedding procedure, the proposed algorithm segments each block of pixels of the cover image into VCA, IB and VMA.
The VCA vector of each pixel of the block is kept unchanged, the IB is flipped if required and the VMA vector is modified.
The proposed algorithm assigns the overall VCA vector (the vector that contains the VCA of each pixel of the block) and
generate "n" vectors to carry the secret text, where n = LVMA–1, and LVMA is the length of overall VMA vector [8] – [11]. During
the extracting procedure, the embedded data is extracted from the stego-image pixels. The proposed algorithms are simulated
using MATLAB and FPGA implemented using XSG on Spartan 3E Kit [12], [13].
The remaining of this paper is organized as follows; briefly review on different EMD steganography algorithms is presented
in Section II. Section III describes the proposed developed GEMD image steganography algorithm based on improved pixel
segmentation strategy with indicator bit. Section IV shows the FPGA implementation of the proposed algorithms, Simulation
and experimental results are illustrated in Section V. Finally the conclusion remarks are demonstrated in Section VI.
data but cannot used more than two pixels [7]. In 2008, Lee et al. also enhance the payload capacity of EMD by proposing a data
hiding based on PSS [8].
However, the space of the VMA was determined to be insufficient and the variable codes needed to be exchanged before
extra communication between receiver and transmitter. In PSS, each pixel is segmented into VCA and VMA. Each
embedding block consists of two pixels. For the case of two pixels, 16 bits can be segmented into four pieces, which
are denoted as VCA1, VMA1, VCA2 and VMA2 respectively. VCA1 and VCA2 correspond to VCA in the first and
the second pixels, VMA1 and VMA2 correspond to VMA in the first and the second pixels. The VCA vector is
composed of VCA1 and VCA2. It has (8 – LVMA1) + (8 – LVMA2) bits where LVMA1 and LVMA2 are the bit length of
VMA1 and VMA2 respectively. The VMA vector is composed of VMA1 and VMA2. The VCA is the base to generate
the generating vectors, while the VMA is a guide to hide data [8].
For example, if the pair of pixels (p1, p2) = (200, 187)10, then (p1, p2) are transformed into their binary stream as
(11001000, 10111011)2. If LVMA1 = 2 and LVMA2 = 1, then the VCA vector will be (1100101011101)2 and the VMA
vector will be (001)2. If (LVMA1, LVMA2) increases, the mean square error (MSE) increases and the quality of stego-
image will decrease. In 2013, Kuo et al. proposed a GEMD algorithm. This algorithm embedded (n+1) bits of the secret data
in each block of "n" pixels [9]. Kuo et al. also proposed a hybrid GEMD to increase the embedding rate and maintain the stego-
image quality in 2014 [10].
A. Embedding Algorithm
The secret data is embedded in the LVMA LSBs, where if there is a change in the LSBs, the distortion of cover image will be
less significant rather than that of any change in the MSBs. Furthermore, the modification of the LSBs is not easy to be detected.
259 C18
Authorized licensed use limited to: UNIVERSITY COLLEGE CORK. Downloaded on September 06,2023 at 11:01:13 UTC from IEEE Xplore. Restrictions apply.
2018, 35th NATIONAL RADIO SCIENCE CONFERENCE
(NRSC 2018), March 20 - 22, 2018
Misr International University (MIU), Cairo, Egypt
For example, if given the pixel-pair (p1, p2) = (200, 187) = (11001000, 10111011)2. If LVMA1 = 2 and LVMA2 = 2, i.e
LVMA = 4, and secret data is s = (1101)2. Therefore, the VCA vector will be (11001010111)2, the IB will be (0)2 and
the VMA vector will be (0011)2. Then, the stego pixel-pair (pƍ1, pƍ2) = (200, 186)10 as follows:
1- Compute n = LVMA – 1 = 3.
2- Generate 3 vectors, (g1, g2, g3) = (1100, 1010, 111)2 = (12, 10, 7)10.
3- Compute t = f(g1, g2, g3) = (1x12 + 3x10 + 7x7)mod (16) = (11)10.
4- Calculate the difference value d = (s – t) = 13 – 11 = (2)10.
5- Transform d into binary, d = (0010)2, then fill d in VMA = (0010)2.
6- The stego pixel pair will be (11001000, 10111010)2 = (200, 186)10.
7- Flip the IB, the stego pixel value (pƍ2) = (10111110) = (190)10. Here, there is two values for pƍ2.
8- Choose pƍ2 = 186, because it is closer to 187 than 190. So (pƍ1, pƍ2) = (200, 186)10.
B. Extracting Algorithm
The secret data can be recovered from the stego-image by following the steps of the extracting algorithm. The
extracting steps divide each pixel-pair of the stego-image into VCA, IB and VMA vectors as in embedding steps.
For example, if given the stego pixel-pair (p'1, p'2) = (200, 186)10 = (11001000, 10111010)2, for a block, LVMA = 4.
Therefore, VCA = (11001010111)2, IB = (0)2 and VMA = (0010)2, n = LVMA – 1 = 3. Then, the secret data is
recovered, s = (1101)2 as follows:
1- Assign the VCA vector, generate 3 vectors (g1, g2, g3) = ((1100)2, (1010)2, (111)2) = (12, 10, 7)10.
2- Compute (gƍ1, gƍ2, gƍ3) = (11, 11, 7)10 from (g1, g2, g3) = (12, 10, 7)10 when VMA = (0010)2 by following
the GEMD method as shown in Table (1).
3- Calculate the secret data s = f(gƍ1, gƍ2, gƍ3) = f(11, 11, 7) = (13)10.
4- Convert decimal number (13)10 to binary (1101)2.
Binary (b4b3b2b1)
When d < 8
0000 0001 0010 0011 0100 0101 0110 0111
g'1 g1 g1+1 g1-1 g1 g1 g1+1 g1-1 g1
g'2 g2 g2 g2+1 g2+1 g2-1 g2-1 g2 g2
g'3 g3 g3 g3 g3 g3+1 g3+1 g3+1 g3+1
Binary (b4b3b2b1)
1111 1110 1101 1100 1011 1010 1001 1000
When d 8
2's complement
0001 0010 0011 0100 0101 0110 0111
g'1 g1-1 g1+1 g1 g1 g1-1 g1+1 g1 g1+1
g'2 g2 g2-1 g2-1 g2+1 g2+1 g2 g2 g2
g'3 g3 g3 g3 g3-1 g3-1 g3-1 g3-1 g3+1
260 C18
Authorized licensed use limited to: UNIVERSITY COLLEGE CORK. Downloaded on September 06,2023 at 11:01:13 UTC from IEEE Xplore. Restrictions apply.
2018, 35th NATIONAL RADIO SCIENCE CONFERENCE
(NRSC 2018), March 20 - 22, 2018
Misr International University (MIU), Cairo, Egypt
• Convert 2-D to 1-D: The cover image is transformed into a single array of pixels. This array is segmented into
two vectors; vector with odd indices, the other vector with even indices.
• Text: The text is prepared to be read by the Xilinx blocks.
• Convert 1-D to 2-D: The two vectors (one for odd indices and the other for even indices) are concatenated into
one vector and then, this 1-D vector is converted into 2-D image, where the stego-image is formed.
Fig. 2: The proposed XSG based GEMD steganography algorithm (First case).
261 C18
Authorized licensed use limited to: UNIVERSITY COLLEGE CORK. Downloaded on September 06,2023 at 11:01:13 UTC from IEEE Xplore. Restrictions apply.
2018, 35th NATIONAL RADIO SCIENCE CONFERENCE
(NRSC 2018), March 20 - 22, 2018
Misr International University (MIU), Cairo, Egypt
262 C18
Authorized licensed use limited to: UNIVERSITY COLLEGE CORK. Downloaded on September 06,2023 at 11:01:13 UTC from IEEE Xplore. Restrictions apply.
2018, 35th NATIONAL RADIO SCIENCE CONFERENCE
(NRSC 2018), March 20 - 22, 2018
Misr International University (MIU), Cairo, Egypt
B. Performance Measurement
The proposed algorithms are performed using MATLAB software on the Intel Core i5 – 4210U CPU computer
with 6 GB RAM. Furthermore, the proposed algorithms are designed and FPGA implemented using XSG on Spartan
3E Kit to evaluate the embedding payload capacity and the quality of stego-image. In the original EMD embedding
algorithm, when n = 2, the embedding rate is 3 x log2(5)/2 = 3.48 bpp and the payload capacity is 262,144 x 3 x
log2(5)/2 = 912,261 bits. In the IEMD embedding algorithm, when n = 2, the embedding rate is 4.5 bpp and the
payload capacity is 262,144 x 4.5 = 1,179,648 bits. In the PSS and EMD embedding algorithm, when a block of
pixel-pair is used and LVMA = 3, the embedding rate is log2(2(2 LVMA-1 – 1) + 1)/2 = log2(7)/2 = 1.4 bpp and the
payload capacity is 262,144 x 1.4 x 3 = 1,101,004 bits. In the GEMD embedding algorithm, when n = 2, the
embedding rate is 3 x 3/2 = 4.5 bpp and the payload capacity is 262,144 x 4.5 = 1,179,648 bits. In the proposed
embedding algorithm, when a block of pixel-pair is used and LVMA = 3, then the embedding rate is 0.5 x LVMA x 3 =
0.5 x 3 x 3 = 4.5 bpp and the payload capacity is 262,144 x 4.5 x 3 = 1,179,648 bits, but if LVMA = 6 in the proposed
algorithm, then the embedding rate is 0.5 x LVMA x 3 = 0.5 x 3 x 3 = 9 bpp and the payload capacity is 262,144 x 3
x 3 = 2,359,296 bits.
The performance evaluation parameters in all experiments are the PSNR, MSE and payload capacity. If the
embedding rate is defined as R = S / (M x N), where S refers to the length of the secret data to be hidden and (M x
N) is the total number of cover image pixels. The number of hidden secret bits in each pixel and the PSNR are used
to compare the performance of the proposed algorithm and the previous EMD algorithms. If IC and IS are the cover
image and stego-image respectively, then the MSE and PSNR are calculated using the following equations [14] –
[16]:
1 N −1 M −1 2
MSE = ¦ ¦ [ I S (i, j ) − I C (i, j )] (3)
MxN i =0 j =0
ª MSE R + MSE G + MSE B º
MSE RGB = « » (4)
¬ 3 ¼
2
PSNR = 10 log10 Cmax(/ MSE RGB ) (5)
Where M and N are the dimensions of the cover images and Cmax is the maximum value in the original images.
Table (2) summarizes a comparison of the embedding rate (bpp) and the PSNR between the previous EMD
algorithms and the proposed algorithms, when each block contains a pair of pixels (n=2) in case of color images.
As shown, when the embedding rate is 4.5, the PSNR value is 50.15 dB, when the embedding rate is 6, the PSNR
value is 47.57 dB, when the embedding rate is 7.5, the PSNR value is 43.87 dB and when embedding rate is 9, the
PSNR value is 41.37 dB. Table (3) summarizes a comparison in case of grayscale images, the quality of stego-
image is about 3.5 dB which is higher than that of the previous algorithms. The corresponding stego-images are
shown in Fig. 7. In case of adding attacks to the stego-image, the embedded data cannot be efficiently extracted.
Table 2: Comparison of the embedding rate (bpp) and PSNR for the previous and proposed algorithms applied on color images
[8], [11].
Embedding Algorithm
Embedding EMD Proposed (Four cases)
Parameter EMD IEMD with GEMD (LVMA1, LVMA2)
PSS (1, 2) (2, 2) (2, 3) (3, 3)
Embedding Rate
3.48 4.5 4.2 4.5 4.5 6 7.5 9
(bpp)
PSNR (dB) 52.13 50.72 51.0 50.74 50.15 47.57 43.87 41.37
263 C18
Authorized licensed use limited to: UNIVERSITY COLLEGE CORK. Downloaded on September 06,2023 at 11:01:13 UTC from IEEE Xplore. Restrictions apply.
2018, 35th NATIONAL RADIO SCIENCE CONFERENCE
(NRSC 2018), March 20 - 22, 2018
Misr International University (MIU), Cairo, Egypt
Table (3): Comparison of PSNR for the previous and proposed algorithms applied on grayscale image at the same payload
capacity [8], [10], [17].
Embedding Method Embedding EMD- EMD- GEMD- Proposed
(LVMA1, LVMA2) Parameter PSS PSS-IB PSS Algorithm
Payload capacity 393216
(1,2)
PSNR 46.36 48.08 46.38 49.83
Payload capacity 524288
(2,2)
PSNR 44.14 46.26 44.16 47.31
Payload capacity 655360
(2,3)
PSNR 46.38 48.05 40.03 43.51
Payload capacity 786432
(3,3)
PSNR 40.75 43.11 37.92 41.19
Embedding Method
Stego-images
(LVMA1, LVMA2)
(1,2)
(2,2)
(2,3)
(3,3)
264 C18
Authorized licensed use limited to: UNIVERSITY COLLEGE CORK. Downloaded on September 06,2023 at 11:01:13 UTC from IEEE Xplore. Restrictions apply.
2018, 35th NATIONAL RADIO SCIENCE CONFERENCE
(NRSC 2018), March 20 - 22, 2018
Misr International University (MIU), Cairo, Egypt
VI. CONCLUSIONS
This paper proposed a developed GEMD image steganography algorithm based on PSS-IB to overcome the
drawbacks of the previous EMD algorithms. The stego-image quality and the embedding payload capacity are two
important parameters for steganography algorithms. The proposed algorithms have an embedding rate 3 x 0.5 x
LVMA (up to 9 bpp) which is greater than R = 3 x (n + 1)/n of the GEMD method. The proposed algorithms are
simulated using MATLAB, designed and FPGA implemented using XSG on Spartan 3E Kit. The simulations and
experimental results prove that the proposed algorithm has high embedding payload capacity (up to 2,359,296 bits)
and keeping high stego-image quality (up to 50.15 dB).
REFERENCES
[1] I. J. Cox, M. L. Miller, J. A. Bloom, J. Fridrich, and T. Kalker, Digital Watermarking and Steganography,
London: Elsevier Science & Technology, November 2007.
[2] Y.-H. Chen and H.-C. Huang, A Wavelet-based Image Watermarking Scheme for Stereoscopic Video Frames,
9th International Conference on Intelligent Information Hiding and Multimedia Signal Processing, IEEE, pp.
25 – 28, 2013.
[3] A. Cheddad, J. Condell, K. Curran and P. M. Kevitt, Digital Image Steganography: Survey and Analysis of
Current Methods, Signal Processing, ELSEVIER, Vol. 90, pp. 727 – 752, 2010.
[4] K. Ntalianis and N. Tsapatsoulis, Remote Authentication via Biometrics: A Robust Video-Object
Steganographic Mechanism Over Wireless Networks, IEEE Transactions on Emerging Topics in Computing,
Vol. 4, Issue 1, pp. 156 – 174, March 2016.
[5] C. H. Yang, C. Y. Weng, S. J. Wang, and H. M. Sun, Adaptive Data Hiding in Edge Areas of Images with
Spatial LSB Domain Systems, IEEE Transactions on Information Forensics and Security, Vol. 3, pp. 488 –
497, 2008.
[6] X. Zhang and S. Wang, Efficient Steganographic Embedding by Exploiting Modification Direction, IEEE
Communications Letters, Vol. 10, No. 113, pp. 781-783, 2006.
[7] C. F. Lee, Y.R. Wang, C.C. Chang, A Steganographic Method With High Embedding Capacity by Improving
Exploiting Modification Direction, Proceedings of the third International Conference on Intelligent
Information Hiding and Multimedia Signal Processing (IIHMSP07), IEEE, pp. 497 – 500, 2007.
[8] C. F. Lee, C. C. Chang, and K. H. Wang, An Improvement of EMD Embedding Method for Large Payloads by
Pixel Segmentation Strategy, Image and Vision Computing, ELSEVIER, Vol. 26, No. 12, pp. 1670 – 1676,
2008.
[9] W. C. Kuo, and C. C. Wang, Data hiding based on generalized exploiting modification direction method,
Imaging Science journal, Vol. 61, No. 6, pp. 484 – 490, 2013.
[10] W. C. Kuo and S. Y. Chang, Hybrid GEMD Data Hiding, Journal of Information Hiding and Multimedia
Signal Processing, Vol. 5, No. 3, pp. 420 430, July 2014.
[11] C. C. Wang, W. C. Kuo, Y. C. Huang and L. C. Wuu, A High Capacity Data Hiding Scheme Based on Re-
Adjusted GEMD, Multimedia Tools and Applications, Springer, pp. 1 – 15, April 2017.
[12] E. A. Elshazly, Safey A. S. Abdelwahab, R. M. Fikry, O. Zahran, S. M. Elaraby and M. El-Kordy, FPGA
Implementation of Robust Image Steganography Technique Based on Least Significant Bit (LSB) in Spatial
Domain, International Journal of Computer Applications (IJCA), Vol. 145, No. 12, pp. 43 – 52, July 2016.
[13] D. S. Warkari and U. A. Kshirsagar, FPGA Implementation of Point Processing Operation using Hardware
Simulation, International Journal of Advanced Research in Computer and Communication Engineering, Vol.
4. Issue 4. 91 – 95, 2015.
[14] K. N. Chen, C. C. Chang and H. C. Lin, A Large Payload EMD Embedding Scheme with High Stego-image
Quality, International Conference on Computational Aspects of Social Networks, IEEE, pp. 126 – 130, 2010.
[15] D. Baby, J. Thomas, G. Augustine, E. George and N. R. Michael, A Novel DWT Based Image Securing Method
Using Steganography, Procedia Computer Science, ELSEVIER, Vol. 46, pp. 612 – 618, 2015.
[16] S. Agarwal and J. S. Bisht, Efficient BEMD Data Hiding Algorithm, International Journal of Computer
Applications, Vol. 160, No. 5, pp. 24 – 29, February 2017
[17] W. Hong, C. L. Pan, T. S. Chen, W. Y. Ji, and Y. K. Wang, A Novel Data Embedding Method for High Payload
Using Improved Pixel Segmentation Strategy, Electrical Power Systems and Computers, springer, pp. 89 – 95.
2011.
265 C18
Authorized licensed use limited to: UNIVERSITY COLLEGE CORK. Downloaded on September 06,2023 at 11:01:13 UTC from IEEE Xplore. Restrictions apply.