# A High-Capacity Image Steganography Method Using Chaotic Particle Swarm Optimization

Authors: Aya Jaradat; Eyad Taqieddin; Moad Mowafi
Journal: Security and Communication Networks
 (2021)

---

## Abstract

Image steganography has been widely adopted to protect confidential data. Researchers have been seeking to improve the steganographic techniques in order to increase the embedding capacity while preserving the stego-image quality. In this paper, we propose a steganography method using particle swarm optimization and chaos theory aiming at finding the best pixel locations in the cover image to hide the secret data while maintaining the quality of the resultant stego-image. To enhance the embedding capacity, the host and secret images are divided into blocks and each block stores an appropriate amount of secret bits. Experimental results show that the proposed scheme outperforms existing methods in terms of the PSNR and SSIM image quality metrics.


---

## Body

## 1. Introduction

Information security has become a major topic due to its important role in data communication. It offers techniques to secure the information by avoiding any illegal access, change, damage, or disclosure of it [1]. The impact and importance of information security in daily life applications are supported by two ways, cryptography and steganography [2, 3], where steganography maintains the data format preserved [4]; on the other hand, cryptography converts the data into difficult to read codes [5].Steganography is a Greek word that comes from the word Steganos; it appeared around 2,500 years ago [6] and has been used to embed information in different media such as manuscripts, videos, images, and audio. It provides a way to communicate safely so that it does not attract suspicion and attention during data transmission. It goes hand-in-hand with the accompanying progress in the area of digital communications, which is clearly evident in the growth of data and users.The efficiency of any steganographic method greatly depends on the selection of the embedding area in the cover medium intelligently and accurately [7]. This can affect the embedding capacity and the quality of the cover medium. In this work, we propose a new method for image hiding to improve the efficiency of embedding without compromising the quality of the resulting stego-image. The proposed method utilizes the particle swarm optimization and chaos theory to implement the embedding process.Particle swarm optimization (PSO) is an efficient and easy-to-implement algorithm. It is closely linked to artificial life systems and works in a collective and cooperative manner [8]. The PSO algorithm does not require an enormous number of control parameters and can be easily accomplished through balanced computing as it is applied to gathering of particles. PSO focuses mainly on a number of random particles and aims to find the optimal solution through repetition [9]. It has been used in various fields, including steganography. For example, in [10, 11], PSO was used to find the optimal pixel in the cover image to embed the secret data.PSO depends on finding the best position for an ideal particle location and the best global particle location. However, one drawback to using it is that the particles become susceptible to premature convergence, which leads to trapping the swarm in an ideal local area and the inability to discover any new area located in the local optimal solution. Thus, access to the global optimal solution becomes relatively weak.In this work, our goal is to avoid this problem by employing the chaos theory [12], which depends mainly on random movement to generate random sequences that help in preventing any repetitions in the search area. Chaos theory can improve the quality of search by determining the location more accurately and achieves a balance between the global and local position search capabilities.The rest of this paper is organized as follows: Section2 reviews the related work and Section 3 presents background on PSO and chaotic map. Section 4 describes the proposed method and Section 5 discusses the experimental setup and evaluation of the results. Section 6 concludes the paper and provides future work.


## 2. Related Work

In [13], the authors proposed a technique that relies on the Vernam Cipher algorithm and the false random key and adopts the least significant bit (LSB) steganography method in order to hide the secret image bits into the cover image. In [14], a new scheme based on pixel-value differencing and PSO was proposed to hide confidential information in the cover image.The authors in [15] used the principle of pixel overlapping to hide a large amount of information with high image quality. In [16], a quantum information hiding protocol was suggested based on image expansion using the quantum log-polar image representation and the Grover search algorithm to extract the precisely designed secret message and determine the correct quantitative image copy. In [17], the genetic algorithm (GA) was used with a linear convergence generator to hide confidential data into the cover image by specifying the appropriate locations to include at least two bits in each pixel. The proposed model provided high cloaking for the data but low embedding capacity due to the inclusion of only two bits.The work in [18] provided a technique depending on GA and LSB substitution to increase the embedding capacity and reduce the distortion that may affect the resultant image.In [19], a technique using the Knight Tour algorithm with LSB is proposed. It aims to shorthand the image and strengthen the security of the stego-image. The Chi-square statistical attack was applied to evaluate the security level of the proposed method. The authors in [20] relied on differencing and substitution mechanisms in the process of concealing high-capacity information. First, LSB substitution is applied to the two lower significant bits, then the quotient value differencing (QVD) is applied to the remaining six bits.An embedding method was introduced in [21] based on the use of PSO for optimal selection of pixel and wavelet transformation with the aim of masking a secret sound signal in the cover image. In [22], the authors proposed a hybrid information masking scheme that consists of a mixture of noise visibility function and an optimal coding scheme to achieve an increase in the payload capacity. Furthermore, a steganography procedure was proposed in [23] depending on the PSO algorithm with the aim of achieving consistent compatibility with the size of the secret data so as to accomplish a perfect stego-image quality through the substitution matrix intended to transform the secret data in the cover image.The authors in [24] presented a technique that depends on GA to embed the secret data bits into the cover images. A simple LSB is applied first; then, GA is used to change the pixel values to make the stego-image safe against RS attacks. In [25], another method that depends on GA was presented. It divides the cover images into parts, then the best pixels are found in each part to complete the embedding process.In this paper, we study applying the PSO algorithm with chaotic map in steganography aiming at improving the quality of the stego-image as well as the embedding capacity.


## 3. Background

### 3.1. Standard PSO Algorithm

The PSO algorithm aims to work in a collective and cooperative manner in a smart way. It appeared in 1995 and witnessed a number of enhancements in many areas, as it is closely linked to the evolutionary algorithms and artificial life [8]. It has many advantages including the following: (a) it does not require a large number of control parameters, so it is anything but not difficult to execute; (b) it can be accomplished easily through balanced computing as it is applied to gathering of particles. It focuses mainly on a number of random particles and aims to find the optimal solution through repetition [9, 26].The PSO algorithm depends mainly on the population as it consists of a group of individuals or particles called swarms, and these particles move to the search area with multiple dimensions to start searching for a solution, similar to searching for food. The individuals depend in their directions on the sociopsychological trends of other particles, which leads to a change in particle conditions as a result of the change in speed. These changes lead to the movement of the particles toward the best position in the search area which is known as the best global position (gbest), and each movement of the particle through its favorable position is known as the best particle position (pbest). These two activities direct the particles to move toward the ideal solution [11]. The new location xit+1 and velocity vit+1 of particle i at iteration t+1 can be expressed as(1)vit+1=w×vit+c1×r1×pbestit−xit+c2×r2×gbestt−xit,(2)xit+1=xit+vit+1,where r1 and r2 are random numbers between 0 and 1, c1 and c2 are acceleration factors, and w is the inertia weight that controls the velocity.


### 3.2. Chaotic Maps

A chaotic map function indicates a type of development that shows chaotic and random behavior that is not predictable, but it is characterized by a type of regularity and ergodicity that works to prevent points repetition from occurring in the search ranges caused by the random sequence. The chaotic equation is also characterized by its sensitivity to the initial values. If a slight change occurs, it leads to major changes in the behavior of the system. Logistic map is one of the simplest forms of a chaotic system and it has been used in many fields including steganography [27, 28]. In this work, we use the logistic map to produce primary particles distributed in a bound structure and recreate a specific number of particles. More insights on the logistic map are given in the next section.


## 3.1. Standard PSO Algorithm

The PSO algorithm aims to work in a collective and cooperative manner in a smart way. It appeared in 1995 and witnessed a number of enhancements in many areas, as it is closely linked to the evolutionary algorithms and artificial life [8]. It has many advantages including the following: (a) it does not require a large number of control parameters, so it is anything but not difficult to execute; (b) it can be accomplished easily through balanced computing as it is applied to gathering of particles. It focuses mainly on a number of random particles and aims to find the optimal solution through repetition [9, 26].The PSO algorithm depends mainly on the population as it consists of a group of individuals or particles called swarms, and these particles move to the search area with multiple dimensions to start searching for a solution, similar to searching for food. The individuals depend in their directions on the sociopsychological trends of other particles, which leads to a change in particle conditions as a result of the change in speed. These changes lead to the movement of the particles toward the best position in the search area which is known as the best global position (gbest), and each movement of the particle through its favorable position is known as the best particle position (pbest). These two activities direct the particles to move toward the ideal solution [11]. The new location xit+1 and velocity vit+1 of particle i at iteration t+1 can be expressed as(1)vit+1=w×vit+c1×r1×pbestit−xit+c2×r2×gbestt−xit,(2)xit+1=xit+vit+1,where r1 and r2 are random numbers between 0 and 1, c1 and c2 are acceleration factors, and w is the inertia weight that controls the velocity.


## 3.2. Chaotic Maps

A chaotic map function indicates a type of development that shows chaotic and random behavior that is not predictable, but it is characterized by a type of regularity and ergodicity that works to prevent points repetition from occurring in the search ranges caused by the random sequence. The chaotic equation is also characterized by its sensitivity to the initial values. If a slight change occurs, it leads to major changes in the behavior of the system. Logistic map is one of the simplest forms of a chaotic system and it has been used in many fields including steganography [27, 28]. In this work, we use the logistic map to produce primary particles distributed in a bound structure and recreate a specific number of particles. More insights on the logistic map are given in the next section.


## 4. Proposed Method

One of the disadvantages of the PSO algorithm is the premature convergence toward the optimal local solution. In this work, we propose a chaotic PSO (CPSO) algorithm to make the PSO algorithm progressively effective in the steganography process by locating the best pixel locations in the cover image to embed the secret image bits while maintaining the quality of the stego-image resulting from the embedding process.


### 4.1. CPSO Algorithm

In the proposed algorithm, we utilize the logistic map to generate the chaotic variables and map these variables to the search space. The logistic equation can be expressed as(3)zi+1=μzi1−zi,where zi is a chaotic variable in the interval (0, 1) and μ is a parameter in the interval [0, 4] that controls the behavior of the logistic map. When μ is in the range [3, 4], the system behaves in a chaotic manner.For the particles speed, we utilize a sigmoid function for accurate positioning, which can be expressed by the following equation:(4)svit+1=11+e−vit+1.In the traditional PSO algorithm, random numbers are used to initialize the population particles. Since the initial velocity and direction of each particle in the population are irregular and not constant, this may lead to missing some spatial positions. On the other hand, using a chaotic sequence instead of the random numbers for initialization is considered a robust method that increases the diversity of the particles and enhances the performance of the PSO algorithm by preventing premature convergence. In the proposed algorithm, the logistic map is applied when the particle’s speed and position are initialized, and instead of using the random numbersr1 and r2, we use two chaotic sequences that are created according to the following equations:(5)xit+1=0,rt+1<svit+1,xit+1=1,rt+1≥svit+1,where rt+1 is a real number generated between [0, 1]. Accordingly, the particle velocity is calculated as follows:(6)vit+1=w×vit+c1×Chaotic1×pbestit−xit+c2×Chaotic2×gbestt−xit,where Chaotic is a function based on the logistic map results in equation (3). Algorithm 1 shows the pseudocode of the proposed CPSO algorithm.Algorithm 1: Pseudocode of the proposed CPSO algorithm.
Input: Number of particles (N), maximum iterationsOutput: Global best particles position (gbest)(1)
fori=1 to N //Initialize particles velocity and position(2)
xi⟵Chaoticxmin,xmax(3)
vi⟵Chaoticvmin,vmax(4)
pbest⟵xi //Initialize particles local best position(5)
gbest⟵ϕ //Initialize particles global best position(6)
end for(7)
do(8)
fori=1 to N(9)
iffxi>fpbesti(10)
pbesti⟵xi //Update local best position(11)
end if(12)
iffpbesti>fgbest(13)
gbest⟵pbesti //Update global best position(14)
end if(15)
end for(16)
fori=1 to N(17)
Updatevi using equation (6)(18)
Updatexi using equation (2)(19)
end for(20)
while (Maximum iterations or stopping criterion is not attained)


### 4.2. Scanning Order in Cover Image

In this work, we use LSB substitution to hide a secret image into the cover image. To do so, we model the steganography problem as a search problem in which the goal is to find the best pixel locations in the cover image to hide the secret image with minimum distortion. This involves scanning the pixels of the cover image and determining the order and position of the pixels for embedding the secret image. There are different orders and positions that give a different stego-image quality [10]. Figure 1 shows examples of different pixel scanning orders for an image with dimension 5 × 5. In this work, we use the CPSO algorithm to find the best order and position in the cover image that maximizes the quality of the stego-image.Figure 1
Examples of pixel scanning order.
(a)(b)(c)


### 4.3. Particles Representation

In the CPSO algorithm, nine particles are defined that correspond to the variables shown in Table1 [10]. The direction of pixel scanning in the cover image consists of 16 possible states. X-offset and Y-offset represent the starting point position. Bit-planes specify the LSBs in the cover image that are used for embedding as shown in Table 2 [10]. SB-pole and SB-dire specify the pole and direction of secret bits, respectively, while BP-Dire specifies the direction of the LSB planes as shown in Table 3 [10].Table 1
Particles representation.
Particle nameValue rangeLengthDescriptionDirection0–154 bitsDirection of pixel scanningX-offset0–2558 bitsX-offset of starting pointY-offset0–2558 bitsY-offset of starting pointBit-planes0–154 bitsLSBs used for secret bit insertionSB-pole0–11 bitPole of secret bitsSB-dire0–11 bitDirection of secret bitsBP-dire0–11 bitDirection of bit-planesX-side-length0–2558 bitsDimension of block inx-axisY-side-length0–2551 bitDimension of block iny-axisTable 2
Possible values for bit-planes particle.
ValueDescription0000Use none of LSBs0001Use 1st LSB0010Use 2nd LSB0011Use 1st and 2nd LSBs0100Use 3rd LSB0101Use 1st and 3rd LSBs0110Use 2nd and 3rd LSBs0111Use 1st, 2nd, and 3rd LSBs1000Use 4th LSB1001Use 1st and 4th LSBs1010Use 2nd and 4th LSBs1011Use 1st, 2nd, and 4th LSBs1100Use 3rd and 4th LSBs1101Use 1st, 3rd, and 4th LSBs1110Use 2nd, 3rd, and 4th LSBs1111Use four LSBsTable 3
Possible values for SB-pole, SB-dire, and Bp-dire particle.
Particle nameValueDescriptionSB-pole0No change is made to secret bits1All secret bits are complementedSB-dire0No change is made to secret bits1Secret bits are reversed from end to beginningBP-dire0Bit-planes are used from MSB to LSB1Bit-planes are used from LSB to MSB


### 4.4. Data Embedding

To embed the secret message, in our case an imageSk×v, into the cover image Cm×n, the secret image is first divided into four separate blocks, and each block is converted into binary according to the SB-pole and SB-dire particles. Then, the MSB of each pixel is extracted to produce a sequence of bits with length l for embedding. The cover image is then divided into four separate blocks each of length w. Accordingly, the number of secret bits that can be embedded in each block can be calculated as l/w. After that, the CPSO algorithm is applied to find the best position of the pixels in each block. Within the swarm, the number of pixels in each block that are needed to embed the secret bits should be determined as the number of pixels varies depending on the number of secret bits to be embedded. Finally, the number of pixel bits in the cover image is compared with the number of secret bits. If the number of secret bits is less than the pixel bits, the secret bits are embedded into the pixels to obtain the stego-image. Otherwise, the embedding process cannot be performed. Figure 2 illustrates the process of data embedding and extraction.Figure 2
Data embedding and extraction.A common quality metric to measure the difference between the cover image and the stego-image is the peak signal to noise ratio (PSNR). The higher the PSNR value, the less difference between the cover image and stego-image. In the proposed CPSO algorithm, the objective is to maximize the value of PSNR. In Algorithm1, we consider the PSNR value as the objective function:(7)fxi=PSNRC,S.Accordingly, thepbest and gbest values are iteratively updated based on the PSNR value. pbest is updated when the PSNR value is greater than the previous one, while gbest is updated when the PSNR value is globally higher. Algorithm 2 shows the pseudocode of the data embedding process.Algorithm 2: Pseudocode of data embedding.
(1)
Divide the cover and secret images into blocks using the X-Side-Length and Y-Side-Length particles(2)
For each block, convert the secret image into a sequence of bits using the SB-Pole and SB-dire particles(3)
if (SB-Pole = 1)(4)
Complement the secret bits(5)
end if(6)
if (SB-dire = 1)(7)
Reverse the direction of the secret bits(8)
end if(9)
Create a sequence of cover pixels using the Direction, X-offset, and Y-offset particles(10)
Convert the cover pixels sequence into a sequence of bits using the Bit-Planes and BB-dire particles(11)
Apply the CPSO algorithm (Algorithm1)(12)
if (number of secret bits < cover pixel bits)(13)
Embed secret bits into corresponding cover pixel bits(14)
Embed the particles into the last row of cover image(15)
Calculate PSNR of the stego-image(16)
end if


### 4.5. Data Extraction

To extract the secret image, the particles are first extracted from the last row of the stego-image. The sequence of secret bits is then extracted using the corresponding particles to obtain the secret image. Algorithm3 shows the pseudocode of the data extraction process.Algorithm 3: Pseudocode of data extraction.
(1)
Extract the particles from the last row of stego-image(2)
Prepare the image blocks using the X-Side-Length and Y-Side Length particles(3)
Create a sequence of stego pixels using the Directions, X-offset, and Y-offset particles(4)
Convert the stego pixels sequence into a sequence of bits using the Bit-Planes and BB-dire particles(5)
if (SB-Pole= 1)(6)
Complement the secret bits(7)
end if(8)
if (SB-dire = 1)(9)
Reverse the direction of the secret bits(10)
end if(11)
Extract the secret pixels from the secret bits(12)
Render secret image using the secret pixels(13)
end


## 4.1. CPSO Algorithm

In the proposed algorithm, we utilize the logistic map to generate the chaotic variables and map these variables to the search space. The logistic equation can be expressed as(3)zi+1=μzi1−zi,where zi is a chaotic variable in the interval (0, 1) and μ is a parameter in the interval [0, 4] that controls the behavior of the logistic map. When μ is in the range [3, 4], the system behaves in a chaotic manner.For the particles speed, we utilize a sigmoid function for accurate positioning, which can be expressed by the following equation:(4)svit+1=11+e−vit+1.In the traditional PSO algorithm, random numbers are used to initialize the population particles. Since the initial velocity and direction of each particle in the population are irregular and not constant, this may lead to missing some spatial positions. On the other hand, using a chaotic sequence instead of the random numbers for initialization is considered a robust method that increases the diversity of the particles and enhances the performance of the PSO algorithm by preventing premature convergence. In the proposed algorithm, the logistic map is applied when the particle’s speed and position are initialized, and instead of using the random numbersr1 and r2, we use two chaotic sequences that are created according to the following equations:(5)xit+1=0,rt+1<svit+1,xit+1=1,rt+1≥svit+1,where rt+1 is a real number generated between [0, 1]. Accordingly, the particle velocity is calculated as follows:(6)vit+1=w×vit+c1×Chaotic1×pbestit−xit+c2×Chaotic2×gbestt−xit,where Chaotic is a function based on the logistic map results in equation (3). Algorithm 1 shows the pseudocode of the proposed CPSO algorithm.Algorithm 1: Pseudocode of the proposed CPSO algorithm.
Input: Number of particles (N), maximum iterationsOutput: Global best particles position (gbest)(1)
fori=1 to N //Initialize particles velocity and position(2)
xi⟵Chaoticxmin,xmax(3)
vi⟵Chaoticvmin,vmax(4)
pbest⟵xi //Initialize particles local best position(5)
gbest⟵ϕ //Initialize particles global best position(6)
end for(7)
do(8)
fori=1 to N(9)
iffxi>fpbesti(10)
pbesti⟵xi //Update local best position(11)
end if(12)
iffpbesti>fgbest(13)
gbest⟵pbesti //Update global best position(14)
end if(15)
end for(16)
fori=1 to N(17)
Updatevi using equation (6)(18)
Updatexi using equation (2)(19)
end for(20)
while (Maximum iterations or stopping criterion is not attained)


## 4.2. Scanning Order in Cover Image

In this work, we use LSB substitution to hide a secret image into the cover image. To do so, we model the steganography problem as a search problem in which the goal is to find the best pixel locations in the cover image to hide the secret image with minimum distortion. This involves scanning the pixels of the cover image and determining the order and position of the pixels for embedding the secret image. There are different orders and positions that give a different stego-image quality [10]. Figure 1 shows examples of different pixel scanning orders for an image with dimension 5 × 5. In this work, we use the CPSO algorithm to find the best order and position in the cover image that maximizes the quality of the stego-image.Figure 1
Examples of pixel scanning order.
(a)(b)(c)


## 4.3. Particles Representation

In the CPSO algorithm, nine particles are defined that correspond to the variables shown in Table1 [10]. The direction of pixel scanning in the cover image consists of 16 possible states. X-offset and Y-offset represent the starting point position. Bit-planes specify the LSBs in the cover image that are used for embedding as shown in Table 2 [10]. SB-pole and SB-dire specify the pole and direction of secret bits, respectively, while BP-Dire specifies the direction of the LSB planes as shown in Table 3 [10].Table 1
Particles representation.
Particle nameValue rangeLengthDescriptionDirection0–154 bitsDirection of pixel scanningX-offset0–2558 bitsX-offset of starting pointY-offset0–2558 bitsY-offset of starting pointBit-planes0–154 bitsLSBs used for secret bit insertionSB-pole0–11 bitPole of secret bitsSB-dire0–11 bitDirection of secret bitsBP-dire0–11 bitDirection of bit-planesX-side-length0–2558 bitsDimension of block inx-axisY-side-length0–2551 bitDimension of block iny-axisTable 2
Possible values for bit-planes particle.
ValueDescription0000Use none of LSBs0001Use 1st LSB0010Use 2nd LSB0011Use 1st and 2nd LSBs0100Use 3rd LSB0101Use 1st and 3rd LSBs0110Use 2nd and 3rd LSBs0111Use 1st, 2nd, and 3rd LSBs1000Use 4th LSB1001Use 1st and 4th LSBs1010Use 2nd and 4th LSBs1011Use 1st, 2nd, and 4th LSBs1100Use 3rd and 4th LSBs1101Use 1st, 3rd, and 4th LSBs1110Use 2nd, 3rd, and 4th LSBs1111Use four LSBsTable 3
Possible values for SB-pole, SB-dire, and Bp-dire particle.
Particle nameValueDescriptionSB-pole0No change is made to secret bits1All secret bits are complementedSB-dire0No change is made to secret bits1Secret bits are reversed from end to beginningBP-dire0Bit-planes are used from MSB to LSB1Bit-planes are used from LSB to MSB


## 4.4. Data Embedding

To embed the secret message, in our case an imageSk×v, into the cover image Cm×n, the secret image is first divided into four separate blocks, and each block is converted into binary according to the SB-pole and SB-dire particles. Then, the MSB of each pixel is extracted to produce a sequence of bits with length l for embedding. The cover image is then divided into four separate blocks each of length w. Accordingly, the number of secret bits that can be embedded in each block can be calculated as l/w. After that, the CPSO algorithm is applied to find the best position of the pixels in each block. Within the swarm, the number of pixels in each block that are needed to embed the secret bits should be determined as the number of pixels varies depending on the number of secret bits to be embedded. Finally, the number of pixel bits in the cover image is compared with the number of secret bits. If the number of secret bits is less than the pixel bits, the secret bits are embedded into the pixels to obtain the stego-image. Otherwise, the embedding process cannot be performed. Figure 2 illustrates the process of data embedding and extraction.Figure 2
Data embedding and extraction.A common quality metric to measure the difference between the cover image and the stego-image is the peak signal to noise ratio (PSNR). The higher the PSNR value, the less difference between the cover image and stego-image. In the proposed CPSO algorithm, the objective is to maximize the value of PSNR. In Algorithm1, we consider the PSNR value as the objective function:(7)fxi=PSNRC,S.Accordingly, thepbest and gbest values are iteratively updated based on the PSNR value. pbest is updated when the PSNR value is greater than the previous one, while gbest is updated when the PSNR value is globally higher. Algorithm 2 shows the pseudocode of the data embedding process.Algorithm 2: Pseudocode of data embedding.
(1)
Divide the cover and secret images into blocks using the X-Side-Length and Y-Side-Length particles(2)
For each block, convert the secret image into a sequence of bits using the SB-Pole and SB-dire particles(3)
if (SB-Pole = 1)(4)
Complement the secret bits(5)
end if(6)
if (SB-dire = 1)(7)
Reverse the direction of the secret bits(8)
end if(9)
Create a sequence of cover pixels using the Direction, X-offset, and Y-offset particles(10)
Convert the cover pixels sequence into a sequence of bits using the Bit-Planes and BB-dire particles(11)
Apply the CPSO algorithm (Algorithm1)(12)
if (number of secret bits < cover pixel bits)(13)
Embed secret bits into corresponding cover pixel bits(14)
Embed the particles into the last row of cover image(15)
Calculate PSNR of the stego-image(16)
end if


## 4.5. Data Extraction

To extract the secret image, the particles are first extracted from the last row of the stego-image. The sequence of secret bits is then extracted using the corresponding particles to obtain the secret image. Algorithm3 shows the pseudocode of the data extraction process.Algorithm 3: Pseudocode of data extraction.
(1)
Extract the particles from the last row of stego-image(2)
Prepare the image blocks using the X-Side-Length and Y-Side Length particles(3)
Create a sequence of stego pixels using the Directions, X-offset, and Y-offset particles(4)
Convert the stego pixels sequence into a sequence of bits using the Bit-Planes and BB-dire particles(5)
if (SB-Pole= 1)(6)
Complement the secret bits(7)
end if(8)
if (SB-dire = 1)(9)
Reverse the direction of the secret bits(10)
end if(11)
Extract the secret pixels from the secret bits(12)
Render secret image using the secret pixels(13)
end


## 5. Experimental Results

In this section, we evaluate the performance of the proposed CPSO-based steganography method and compare it against existing PSO-based methods. We consider two parameters for evaluation: the embedding capacity and the quality of the stego-image. The capacity is measured by the number of secret bits that are embedded in the cover image. The quality of the stego-image can be measured by different metrics such as PSNR and structural similarity index (SSIM).PSNR measures the average pixel difference between the cover image and the stego-image [29]. The higher the value of PSNR, the better the quality of the stego-image. The value of PSNR is calculated based on the value of the mean square error (MSE), which represents the value of the squared error between the stego-image and the cover image. The smaller the value of MSE, the lower the error. PSNR and MSE can be calculated as follows:(8)MSE=1W×H∑i=1W∑j=1Hxij−yij2,PSNR=10log2552MSE,where W×H is the resolution of the cover image and xij and yij indicate the value of each pixel in the cover and stego-images.SSIM is a predictor of the perceived quality of images and videos. It realizes image deterioration through the perceived change in the structural image data [30]. The value of SSIM is in the range [0, 1], where the value of 1 indicates the highest quality. SSIM can be calculated between two image windows x and y of common size as(9)SSIM=2μxμy+c12σxy+c2μx2+μy2+c1σx2+σy2+c2,where μ and σ are the mean and variance, respectively, and c1 and c2 are two constants included to avoid instability.In the experiments, secret images with various resolutions are embedded into the cover image. Figure3 shows the five standard images used as cover and secret images. First, the cover and secret images are divided into four separate blocks. Then, for each block, the CPSO algorithm is applied to find the best pixel locations to embed the secret bits such that the PSNR of the stego-image is maximized.Figure 3
Standard test images used for evaluation. (a) Lena, (b) Baboon, (c) Peppers, (d) Boat, and (e) Airplane.
(a)(b)(c)(d)(e)To study the effect of the secret image size on the quality of the stego-image, Airplane and Baboon images with different resolutions are used as secret images and embedded into Lena, Peppers, and Baboon images of resolution 256 × 256; respectively. Table4 shows the embedding capacity for different secret image sizes and the corresponding PSNR of the cover images. As shown, the PSNR is decreased when the embedding capacity increases; however, the corresponding PSNR values are still acceptable. For example, when the embedding capacity is 204,800 bits, the PSNR values for Lena are 56.145 dB and 60.1 dB, respectively, which are still high.Table 4
PSNR for Lena, Peppers, and Boat using Airplane and Baboon as secret images.
Secret imageCover imageLenaPeppersBoatResolutionCapacity (bits)PSNR (dB)PSNR (dB)PSNR (dB)Airplane64 × 6432,76868.5164.9968.8480 × 8051,20067.18463.1667.2290 × 9064,80065.82363.266.1396 × 9673,72862.5862.6665.63116 × 116107,64860.0359.3063.90128 × 128131,07259.4258.8063.00160 × 160204,80056.1556.5861.02Baboon64 × 6432,76869.0268.9469.2080 × 8051,20067.3767.1267.3890 × 9064,80066.2766.3066.2496 × 9673,72865.6665.8265.69116 × 116107,64864.0361.0264.08128 × 128131,07260.1560.263.08160 × 160204,80060.1058.3861.20The performance of the proposed method is compared with two related schemes: the PSO-based method in [10] and the PSO-LSB-based method in [11]. Table 5 shows the results of embedding Lena image with resolution 256 × 256 into different cover images (Baboon, Lena, Airplane, and Boat) of resolution 512 × 512. For each method, the PSNR and SSIM of the stego-images are calculated. The results show the superiority of the proposed CPSO-based method over the other methods in terms of both PSNR and SSIM. For example, for the Lana image, the CPSO has PSNR = 63.029 dB, while the PSO-LSB and PSO have 51.1354 dB and 57.65 dB, respectively. In terms of SSIM, the CPSO has SSIM = 0.9996, while the PSO-LSB and PSO have 0.9982 and 0.9988, respectively.Table 5
Comparison between CPSO, PSO, and PSO-LSB-based methods.
Stego-imagePSNRSSIMPSO-LSB [11]PSO [10]CPSOPSO-LSB [11]PSO [10]CPSOBaboon51.148757.8463.2530.99870.99900.9998Lena51.135457.6563.0290.99820.99880.9996Airplane51.144855.6963.1950.99550.99710.9995Boat51.141355.8963.1090.99630.99650.9973To further demonstrate the efficiency of the proposed method, histogram analysis is performed on the stego-images in Table5. Figure 4 shows the histograms of the cover and stego-images for Lena, Baboon, Airplane, and Boat. As shown, the cover and stego-images are visually alike and the histograms of the stego-images show no noticeable changes due to the minimal distortion of the stego pixels.Figure 4
Cover and stego-images with their respective histograms. (a) Lena, (b) Baboon, (c) Boat, (d) Airplane, and (e) Peppers.
(a)(b)(c)(d)(e)


## 6. Conclusion and Future Work

We presented an efficient steganography method for concealing a secret image within a cover image based on chaotic maps and the PSO algorithm. The proposed CPSO algorithm is utilized to determine the best pixel locations in the cover image in order to embed the secret bits with minimal distortion. In the proposed method, we divide the cover and secret images into four blocks to improve the embedding capacity. The experimental results show that the proposed methods perform better than existing schemes in terms of PSNR and SSIM. As a future work, we plan to study other types of chaotic maps and investigate their effect on pixel selection in order to further enhance the efficiency of the CPSO algorithm.



---

*Source: 6679284-2021-06-08.xml*