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 stegoimage 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 stegoimage. 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.
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 handinhand 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 stegoimage. The proposed method utilizes the particle swarm optimization and chaos theory to implement the embedding process.
Particle swarm optimization (PSO) is an efficient and easytoimplement 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: 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.
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 pixelvalue 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 logpolar 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 stegoimage. The Chisquare 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 highcapacity 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 stegoimage 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 stegoimage 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 stegoimage 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 (), and each movement of the particle through its favorable position is known as the best particle position (). These two activities direct the particles to move toward the ideal solution [11]. The new location and velocity of particle at iteration can be expressed aswhere and are random numbers between 0 and 1, and are acceleration factors, and 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 stegoimage 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 aswhere 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 and , we use two chaotic sequences that are created according to the following equations:where is a real number generated between [0, 1]. Accordingly, the particle velocity is calculated as follows:where is a function based on the logistic map results in equation (3). Algorithm 1 shows the pseudocode of the proposed CPSO algorithm.

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 stegoimage 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 stegoimage.
(a)
(b)
(c)
4.3. Particles Representation
In the CPSO algorithm, nine particles are defined that correspond to the variables shown in Table 1 [10]. The direction of pixel scanning in the cover image consists of 16 possible states. Xoffset and Yoffset represent the starting point position. Bitplanes specify the LSBs in the cover image that are used for embedding as shown in Table 2 [10]. SBpole and SBdire specify the pole and direction of secret bits, respectively, while BPDire specifies the direction of the LSB planes as shown in Table 3 [10].
4.4. Data Embedding
To embed the secret message, in our case an image , into the cover image , the secret image is first divided into four separate blocks, and each block is converted into binary according to the SBpole and SBdire particles. Then, the MSB of each pixel is extracted to produce a sequence of bits with length for embedding. The cover image is then divided into four separate blocks each of length . Accordingly, the number of secret bits that can be embedded in each block can be calculated as . 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 stegoimage. 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 stegoimage is the peak signal to noise ratio (PSNR). The higher the PSNR value, the less difference between the cover image and stegoimage. 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 and values are iteratively updated based on the PSNR value. is updated when the PSNR value is greater than the previous one, while is updated when the PSNR value is globally higher. Algorithm 2 shows the pseudocode of the data embedding process.

4.5. Data Extraction
To extract the secret image, the particles are first extracted from the last row of the stegoimage. The 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.

5. Experimental Results
In this section, we evaluate the performance of the proposed CPSObased steganography method and compare it against existing PSObased methods. We consider two parameters for evaluation: the embedding capacity and the quality of the stegoimage. The capacity is measured by the number of secret bits that are embedded in the cover image. The quality of the stegoimage 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 stegoimage [29]. The higher the value of PSNR, the better the quality of the stegoimage. 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 stegoimage and the cover image. The smaller the value of MSE, the lower the error. PSNR and MSE can be calculated as follows:where is the resolution of the cover image and and indicate the value of each pixel in the cover and stegoimages.
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 and of common size aswhere and are the mean and variance, respectively, and and 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. 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 stegoimage is maximized.
(a)
(b)
(c)
(d)
(e)
To study the effect of the secret image size on the quality of the stegoimage, 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.
The performance of the proposed method is compared with two related schemes: the PSObased method in [10] and the PSOLSBbased 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 stegoimages are calculated. The results show the superiority of the proposed CPSObased 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 PSOLSB and PSO have 51.1354 dB and 57.65 dB, respectively. In terms of SSIM, the CPSO has SSIM = 0.9996, while the PSOLSB and PSO have 0.9982 and 0.9988, respectively.
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 stegoimages for Lena, Baboon, Airplane, and Boat. As shown, the cover and stegoimages are visually alike and the histograms of the stegoimages show no noticeable changes due to the minimal distortion of the stego pixels.
(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.
Data Availability
The data are available on request to the corresponding author.
Conflicts of Interest
The authors declare that they have no conflicts of interest.