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

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.


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].
e 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-inhand with the accompanying progress in the area of digital communications, which is clearly evident in the growth of data and users. e efficiency of any steganographic method greatly depends on the selection of the embedding area in the cover medium intelligently and accurately [7]. is 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. e 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]. e 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. us, 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. e rest of this paper is organized as follows: Section 2 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.

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. e 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. e proposed model provided high cloaking for the data but low embedding capacity due to the inclusion of only two bits. e 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. e Chi-square statistical attack was applied to evaluate the security level of the proposed method. e 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. e 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.

Standard PSO Algorithm.
e 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].
e 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. e 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. ese 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). ese two activities direct the particles to move toward the ideal solution [11]. e new location x t+1 i and velocity v t+1 where r 1 and r 2 are random numbers between 0 and 1, c 1 and c 2 are acceleration factors, and w is the inertia weight that controls the velocity.

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. e 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.

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.

CPSO Algorithm.
In the proposed algorithm, we utilize the logistic map to generate the chaotic variables and map these variables to the search space. e logistic equation can be expressed as where z i 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: 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 numbers r 1 and r 2 , we use two chaotic sequences that are created according to the following equations: where r(t + 1) is a real number generated between [0, 1]. Accordingly, the particle velocity is calculated as follows: where Chaotic is a function based on the logistic map results in equation (3). Algorithm 1 shows the pseudocode of the proposed CPSO algorithm.

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. is involves scanning the pixels of the cover image and determining the order and position of the pixels for embedding the secret image. ere 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.

Particles Representation.
In the CPSO algorithm, nine particles are defined that correspond to the variables shown in Table 1 [10]. e 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].

Data Embedding.
To embed the secret message, in our case an image S(k × v), into the cover image C(m × 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.
en, the MSB of each pixel is extracted to produce a sequence of bits with length l for embedding. e 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.
A common quality metric to measure the difference between the cover image and the stego-image is the peak signal to noise ratio (PSNR). e 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 Algorithm 1, we consider the PSNR value as the objective function: Accordingly, the pbest 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.

Data Extraction.
To extract the secret image, the particles are first extracted from the last row of the stego-image. e sequence of secret bits is then extracted using the corresponding particles to obtain the secret image. Algorithm 3 shows the pseudocode of the data extraction process.

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. e capacity is measured by the number of secret bits that are embedded in the cover image. e 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]. e higher the value of PSNR, the better the quality of the stego-image. e 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. e smaller the value of MSE, the lower the error. PSNR and MSE can be calculated as follows: where W × H is the resolution of the cover image and x ij and y ij 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]. e value where μ and σ are the mean and variance, respectively, and c 1 and c 2 are two constants included to avoid instability.
In the experiments, secret images with various resolutions are embedded into the cover image. Figure 3 shows the five standard images used as cover and secret images. First, the cover and secret images are divided into four separate blocks. en, for each block, the CPSO algorithm is applied (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 (Algorithm 1) (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 ALGORITHM 2: Pseudocode of data embedding. 6 Security and Communication Networks (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 ALGORITHM 3: Pseudocode of data extraction. Security and Communication Networks to find the best pixel locations to embed the secret bits such that the PSNR of the stego-image is maximized.
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. Table 4 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. e 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     To further demonstrate the efficiency of the proposed method, histogram analysis is performed on the stegoimages in Table 5. 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.

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. e 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. e 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.
Data Availability e data are available on request to the corresponding author.

Conflicts of Interest
e authors declare that they have no conflicts of interest.