Medical JPEG image steganography method according to the distortion reduction criterion based on an imperialist competitive algorithm

In most of the digital steganography methods provided for natural digital images, the embedding of the conﬁdential message is based on the minimisation of the deﬁned distortion functions. It is often done based on choosing the most optimal criterion of distortion. Although the distortion functions are designed innovatively, steganography algorithms will be optimal. In such approaches, embedding interactions are often overlooked. Unlike usual images that have areas with a variety of tissue features, there are many smooth areas in medical images that will make the changes more visible if they are manipulated. Therefore, this study presents an adaptive approach that comes from the interactions between the changes made during the embedding algorithm to reduce the probability of recognising the message embedded in medical images and reducing the distortion caused by embedding in a discrete cosine transform space and based on the imperialist competitive algorithm for joint pho-tographic experts group images, especially in medical images due to the importance of information steganography in them. The results obtained show the high efﬁciency of the proposed algorithm in comparison with the state-of-the-art methods that are presented in this area.


INTRODUCTION
Modern steganography is the science and art of hidden communications that create intangible changes in digital media to conceal confidential information without creating suspicion of the information existence [1,2]. At present, most professional steganography methods are based on the distortion minimisation framework, which defines distortion as the total cost of embedding each of the cover media elements. Syndrome-trellis codes provides a generic and effective coding method that can theoretically optimise the average embedded distortion based on cost function [3].
With rapid reforms and the development of a biometric system, digital medical images have become increasingly important in recent years [4]. Medical images can be easily transferred to the internet to research, training, and counsel. Since medical images have information such as personal information of This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited. © 2021 The Authors. IET Image Processing published by John Wiley & Sons Ltd on behalf of The Institution of Engineering and Technology patients, the security protection of the private information and privacy of patients is also important in the transmission of medical images [5]. Ambika [6] has proposed a method for medical image steganography using the elephant herding-monarch butterfly optimisation algorithm for effective selection of pixels for embedding the secret message. Senapati [7] combines discrete Tchebichef transform with a singular value decomposition scheme and overcomes the false positive and diagonal line problems.
JPEG images have been very common on the internet to reduce bandwidth and improve storage space. Thus, over the last few years, these types of images have become a major objective in the field of steganography in images and many researchers have investigated the methods of images steganography in JPEG format and suggested ways to hide a variety of messages in JPEG images including Jsteg [8], Outguess [9], F5 [10], J-UNIWARD [11], uniform embedding distortion (UED) [12].
As mentioned earlier, the JPEG format has recently been increasingly used to store and transfer medical images. Because it can increase not only the higher compression speed but also the visual quality of the image. Hence, JPEG format can be used to embed a patient's personal information into medical images.
The Jsteg method rewrites the least significant bit (LSB) of the quantised discrete cosine transform (DCT) coefficients with the hidden message and changes the statistical properties of histogram coefficients to recognisable methods [6,13]. The outguess method maintains almost half of the existing coefficients to correct statistical deviations in the total histogram of the coefficients that are due to the change in LSBs in other coefficients (remains unchanged). Therefore, its embedding capacity is almost halved [7]. The classic F5 method embeds only messages into the non-zero alternating current (AC) DCT coefficients but also introduces the shrinkage effect so that the coefficient becomes zero after embedding. The F5 method without shrinkage is an improved version of the F5 method that allocates infinite costs to some DCT coefficients and thus reduces the negative effect of the usual method [14]. The authors in [15] have presented the cost function and JPEG images steganography method by designing and optimising a multi-parameter model with the preservation of specific statistical features. They recently proposed universal wavelet relative distortion (UNIWARD) in [9] that evaluates the cost of embedding DCT coefficients in the field of location using an inverse DCT transform and executes embedding operations in the JPEG domain. The J-UNIWARD embedding distortion is calculated as the sum of coefficient variations in the decomposition process with the directional filtre banks on the uncompressed image [16]. Based on the concept of spread-spectrum communication, UED [12] and uniform embedding revisited distortion (UERD) [17] with low computational complexity extend the embedding changes in DCT coefficients from all possible values. Improved UERD (IUERD) works well by exploring the correlation among adjacent DCT blocks between the smooth and textured areas [18]. The introduced methods are adaptive steganography methods that are based on a shrinking distortion model in which changes in cover media elements are performed independently so that minimisation of the overall distortion equals the minimisation of the total cost of modified elements.
In JPEG images, DCT coefficients show two complex correlations called intra-and inter-block correlations. Intra-block correlations refer to the relationship between coefficients with similar frequencies in a block, while inter-block correlations describe the relationship between coefficients in corresponding positions in different DCT blocks; inter-block correlations have been ignored in recent JPEG-based embedding methods.
In this study, we design an adaptive JPEG image steganographic scheme to minimise the defined distortion. A novel scheme based on imperialist competitive algorithm (ICA) is proposed, and it preserves the correlation among inter-block adjacent coefficients by adjusting cost values in the embedding process. We divided the original JPEG image into several non-overlapping sub-images. The initial cost of DCT coefficients is calculated by the cost function. The cost values of the coefficients in sub-images (according to the embedding algorithm) are updated to the change in the inter-block neighbouring values. Cross-distortion does not change as much as possible by changing the effect of DCT coefficients in the process of allocating cost values to maintain the difference of inter-block neighbourhood. Experimental results show that the proposed method can obtain better performance on the distortion reduction criterion.
The rest of the study is organised as follows. A basic concept is introduced in Section 2. In Section 3, we describe a cost function based on the wavelet transform in detail. The strategy of the proposed method is presented in Section 4. In Section 5, we describe the procedures of embedding and extraction algorithms. The results of the simulation are presented in Section 6. Discussion and comparisons are presented in Section 7. Finally, the conclusion is given in Section 8.

BASIC CONCEPTS
Without losing the totality, {£} n1 × n2 also shows the stego image after the embedding operation in the cover image X and m = (m i ) ∈ {0, 1} k represents the embedded message. £ is pixel or DCT coefficient of dynamic image range. For example, £ = {0, … , 255} is for the 8-bit grayscale image, and £ = {−1024, … , 1023} is for the JPEG image. Therefore, x i, j is a pixel or DCT coefficient in the (i, j ) position. When embedding the input and output of the steganography system, LSBs are the cover and stego images. In this study, the binary vector LSB, , is used to display cover and stego images.
To minimise the probability of statistical detection and distortion caused by the embedding of confidential messages, the adaptive steganography process tries to design a distortion function well that is generally defined as or When the message 'm' is embedded based on the cost value of i, j , the inverse probability criterion is calculated as follows: Therefore, the sender can send an average H ( ) bits while the average distortion is E [D] and represented as follows: and The following two conditions are considered in the sender: 1. Payload-limited sender (PLS): In this case, a certain number of m bits are embedded, while the average distortion is minimised.
2. Distortion-limited sender: In this case, the embedding capacity is maximised, while the embedding distortion stays constant.
max H ( ) PLS is the most common mode for the design of adaptive steganography methods, and the corresponding extraction method can be shown as follows: In which, H is the parity-check matrix for the coding scheme. Besides, λ in the above equations can be obtained based on the states expressed.
The problem of minimising embedding distortion, as described in the previous paragraph, is described in [19] and entitled 'syndrome coding'. In this study, the embedding and extraction maps are as follows: In which the following equation must be true: In particular, it is not possible to determine the distortion profile i, j in the receiver, but in practice, we are interested in practical methods that can embed the one m-bit message into n elements of the cover image, and it is expected that the amount of distortion E[D(x, Emb(x, m))], if possible, has a minimum value.
In syndrome coding, embedding and extracting are obtained using a linear binary code C with dimensions n-m: Thus, H ∈ {0, 1} m × n is a parity-check matrix of the binary codes,C (m) = {z ∈ {0, 1} n |Hz = m}, all operations are done in binary. The most important challenge in this section is the optimal implementation of the binary code to achieve the binary vector z.
In this study, a solution to obtain the z-vector, taking into account the relationship and correlation between the DCT coefficients in the neighbouring blocks and creating the possible minimum distortion in the stego image, is presented based on an ICA and the cost function used in the J-UNIWARD method [11]. In [20], the clustering modification directions (CMD) strategy is presented that mainly focuses on maintaining the correlation between pixels in a neighbourhood in the sphere of location. As a result, it can synchronise the embedding paths and increase the performance evaluated by steganalysis.
In this study, by inspiration from CMD, an image steganography scheme compatible with JPEG is proposed in which the correlation of the adjacent coefficients between the blocks is maintained by adjusting the cost values in the embedding process. The initial cost values of all coefficients are first calculated by the distortion function. The original JPEG image is divided into several sub-images that are not overlapped. For a given DCT coefficient, there are four corresponding points in the same place in the four adjacent DCT blocks (we call them neighbours between the blocks). The cost of each coefficient is dynamically adjusted according to the changes of its neighbours.

A COST FUNCTION BASED ON THE WAVELET TRANSFORM
As previously mentioned, in this study we use the cost function used in [11], which we will discuss as follow.
Most of the existing JPEG steganographic schemes embed messages by modifying DCT coefficients, but the dependencies among DCT coefficients would be disrupted [21]. We preserve the differences among DCT coefficients at the same position in adjacent DCT blocks as much as possible and spread the embedding modification to each DCT coefficient evenly and designed a cost function for homogeneous embedding according to the principles of the spread spectrum communication. We evaluate its smoothness in multiple directions using the Daubechies 8-tap wavelet directional filter bank. According to a pair of the cover and stego images, X and Y, W (k) (uv) (X ) and W (k) (uv) (Y ) are the wavelet coefficients of (uv) in the k th decomposition obtained using below kernels: We calculate the initial cost value matrix D of all DCT coefficients by applying cost functions. In this study, the initial cost value matrix D(X, Y ) is computed by the cost function in J-UNIWARD. If X and Y are JPEG images, they are first converted to the sphere of location, and then the wavelet transform is applied. In other words, they are first decompressed to the spatial domain, and then the wavelet transform is applied: where the sum of the (uv) parameters is taken over all coefficients of the subband n1 × n2, and > 0 is a constant to avoid dividing by zero. To do this, we consider ε equal to 10 × Eps in MATLAB software, which means ε ≈ 10 −15 that the security of embedding using UNIWARD is relatively sensitive to the precise amount of parameter. To further understand the logic behind this function, we should state that when the ratio of the indicated equation is small, a large wavelet coefficient has been changed in the cover image, which in this case usually happened in tissue or noise areas and near the edges in the image. On the other hand, if the minimum coefficient, which is small, changes to a relatively large value, the amount of distortion will also be large. Therefore, the function in question prevents changes in the smooth areas of the image. The initial cost values of DCT coefficients are calculated by one of the existing cost functions. The first sub-image is embedded based on the initial cost values. The cost values of coefficients in the other sub-images will be updated according to the modifications of inter-block neighbours. The mutual embedding impacts of DCT coefficients are taken into account in the process of assigning cost values to maintain the difference of inter-block neighbours unchanged as much as possible. Since the initial cost values can be computed by any of the existing cost functions, the proposed method can be flexibly implemented together with the state-of-the-art JPEG image steganographic methods [22].

THE STRATEGY OF THE PROPOSED METHOD
JPEG image steganography method usually hides information into an image by adding or subtracting the values of DCT coefficients. In a specific framework, the coefficients may be corrected by an increase or a decreasing unit. The systems of analysing the steganography methods always detect the data by examining the fluctuations and distortions caused by hiding.
When the inter-block correlation remains unchanged, the distortion may be reduced. To maintain inter-block correlation, when calculating cost values, the effect of embedding adjacent inter-block coefficients must also be taken into account, that is, the coefficient changes must be consistent with its block neighbours. The process of dividing the cover image into sun-images Based on the above analysis, a strategy to maintain interblock correlations is presented in Figure 2. The JPEG image is divided into several sub-images n1 × n2 8 × 8 and the message 'm' is also divided into several parts. Each part of the message is embedded in the corresponding sub-image. The initial cost of DCT coefficients is calculated by the cost function described in Section 3. The first sub-image is embedded in terms of initial cost values. The cost values of the coefficients in sub-images (according to the embedding order- Figure 3) are updated to the change in the inter-block neighbouring values. Cross-distortion does not change as much as possible by changing the effect of DCT coefficients in the process of allocating cost values to maintain the difference of inter-block neighbourhood [23].
The main idea of the proposed strategy is presented in Figures 1 and 2. For a JPEG image with the size of n 1 × n 2 , it And each DCT block contains 64 quantised DCT coefficients. The X-character pointer represents the JPEG image after the DCT conversion, and x i, j represents the position of the DCT coefficient in the JPEG cover image. The stego image is represented by a matrix Y = (y i, j ) ∈ (0, 1) n1 × n2 . For a given DCT coefficient x i, j , interblock neighbours are defined as follows and their details are shown in Figure 1.
To correct, x i, j must be compatible with most of the elements in the Z inter set, which can be expressed as Here, P(•) denotes the probability of a change, and N {Q} also indicates the number of elements in the 'Q' set. This equation states that if the number of neighbouring coefficients x i, j in adjacent blocks of 8, that change with '+1' is greater than the number of neighbouring coefficients x i, j in adjacent blocks of 8 with '-1' change, then the probability that 1 unit is added to x i, j is more than 1 unit is subtracted and vice versa.

THE EMBEDDING AND EXTRACTION PROCEDURES
Considering the contents mentioned in the previous sections, to maintain a correlation between the coefficients in adjacent blocks, the most important challenge is to update the cost values. The allocation of cost values completely reduces the interactions of embedding inter-block coefficients. The exact steps of embedding and extraction algorithms are fully reviewed as follows.

Embedding algorithm
Step 1: The JPEG cover image is divided into 8 × 8 blocks. So that blocks are considered in groups of four and arranged to embed the message 'm' in a zigzag form.
Step 2: We consider the number of non-zero AC coefficients P nzAC in each block.
Step 3: We obtain C = (c i, j ) n1 × n2 the initial cost values using the defined cost function for DCT coefficients (all DCT coefficients by applying cost functions) in all blocks.
Step 4: To embed m bits based on our ICA, we go through the following steps: Step 4.1: We formulate the following matrix equation based on the coding logic: whereẎ b , is the embedded LSB of non-zero AC coefficients in block 1 from Figure 2, and H is also the parity-check matrix. For example, if we want to embed 4 bits of the message 'm' in eight non-zero coefficients of block 1, we will have where the parity-check sub-matrixĤ = has been used to develop the H matrix.
Step 4.2: In this section, the purpose is to find the LSBẎ b such that the following equation holds: Step 4.3: ICA which includes the following steps: Step 4.3.1: Initialisation of ICA by a random method based on non-zero AC coefficients Variable values in one country represent the corresponding index in the LSB in which the values oḟy 1 r are randomly determined.̇y Step Step 4.3.3: The fitness of a country is obtained by evaluating the following criteria on the variables Step 4.3.4: In this step, the highest value of fitness and the best place to embed the 'm' message is obtained when Step 4.3.5: 'N', which has powerful states, is considered to form an empire, and the rest of the 'N' is placed as colonies within each empire; so there will be two types of countries, colonisers and colonies.
Step 4.3.6: To initialise the empires, the colonies are placed based on the power of each empire within the empires, and the number of colonies in each empire must be directly proportional to the power of that empire.
To divide the colonies among the proper empires, the normalised fitness of an empire is defined as follows: (24) So that c n is the fitness (cost) of the nth empire and C n is normalised fitness (cost).
Step 4.3.7: Moving colonies toward coloniser in an empire: At this step, colonial countries are beginning to improve their colonies. This fact, as shown in Figure 4, is modelled by the movement of all colonies towards the coloniser.
Step 4.3.8: Changing the position of coloniser and colony: When moving towards a coloniser, a colony may reach a position with higher fitness than that of the coloniser. In such a case, the coloniser moves to the position of the colony and vice versa.
Step 4.3.9: Removal and convergence of empires: The weak empires are dissolved in the imperial rivalries and their colonies are transferred to other colonisers.
Step 4.3.10: Go to step 4.3.7 and repeat the process. 1. Initialisation of the algorithm. Generate some random solution in the search space and create initial empires. 2. Assimilation: Colonies move towards imperialist states in different directions. 3. Revolution: Random changes occur in the characteristics of some countries. 4. Position exchange between a colony and imperialist. A colony with a better position than the imperialist has the chance to take the control of empire by replacing the existing imperialist. 5. Imperialistic competition: All imperialists compete to take possession of colonies of each other. 6. Eliminate the powerless empires. Weak empires lose their power gradually and they will finally be eliminated. 7. If the stop condition is satisfied, stop, if not go to 2. 8. End.
Step 4.4: In the end, we will have only one empire in which the rest of the states will be colonised by a powerful coloniser whose values, among the colonisers, are the best position in Y r b to embed the message 'm, which is most similar to Y r b , and the correlation between the coefficients is satisfied.

FIGURE 4
The process of moving colonies towards colonisers in an empire Step 5: We calculate the difference between the embedded and the original bits in the coefficients.
Step 6: The values + and − are, respectively, defined as positive and negative correction cost values and we have Otherwise + and − should be set as follows: where the parameter > 1 is considered as the adjustment parameter [24].
Step 7: The algorithm continues from step 4 for blocks numbers 2, 3, and 4.
Step 8: Then for the rest of the block groups, the algorithm continues from step 2 until all bits of the messages 'm' are embedded in the cover image.

Extraction algorithm
To extract, the receiver can extract the message 'm' without having the original JPEG image. The stego image, like the embedding algorithm, is divided into sub-images, and the receiver extracts each sub-message 'm' from the sub-images and finally combines all the sub-messages. The extraction steps of 'm' message are as follows: Step 1: The image Y (stego image) is divided into four subimages based on blocks of 8 × 8, similar to those embedded in the algorithm.
Step 2: Sub-message 'm' is extracted from each sub-image using the decoding method and the following equation.
in whichẎ b is the embedded LSB of non-zero AC coefficients that are obtained optimally at the embedding algorithm, and H is also the parity-check matrix.
Step 3: Depending on the order of the embedding operation (Figure 3), all bits of sub-message 'm' are extracted and combined.

THE RESULTS OF THE SIMULATION
The main idea of the proposed method is to maintain the correlation of the coefficients in the neighbourhood of eight and based on the ICA, which is carried out dynamically by setting the cost values.
The JPEG cover image is divided into several sub-images so that the DCT coefficients are placed in the different sub-images, hence the mutual embedding distortion can be considered in this way. For each coefficient, the values for positive correction and negative correction are determined as + i, j and − i, j . Both of them are equal to the initial value of the coefficient cost in the first sub-image. For other images, + and − for the DCT coefficients are adjusted according to the change in the intrablock neighbours. If N + i, j is greater than N − i, j , the probability of increasing the coefficient as one unit to its reduction is more and therefore its cost, + i, j , reduces. If N − i, j is greater, its cost − i,j must be reduced simultaneously. Therefore, intra-block dependencies can be maintained. To find out if the proposed algorithm can optimally choose the embedding paths, we will embed several sample images to examine the changes. In this study, implementation functions are used to randomly create binary sequences to embed in JPEG images. Also, different types of text, audio, video and so forth files can be embedded after converting to the binary sequence. The most important thing about medical images that can be considered and used in the embedding process is about the patients and their illness information that can be embedded in the image. Of course, it should be noted that for types of compressed files, the debugging process will be required to reduce the likelihood of a failure of compressed files after the extraction algorithm of the binary sequence.
To illustrate the performance of the proposed method, we chose three brains magnetic resonance imaging images and sample cover images with dimensions of 512 × 512 pixels containing smooth areas, edges, and textures in Figures 5(a)-(c), and the results of embedding using the proposed algorithm are shown in Figures 5(d)-(f). Also, for example, the changes in the sample cover image shown in Figure 5(a) after applying the proposed algorithm in the area of the location are shown in Figure 6(a), and the difference between the cover and the stego images can be seen in Figure 6(b). As is clear, most changes have occurred in the edges and border areas where the human eye system is not sensitive to these changes.
Also, for example, the DCT coefficients that have been modified in Figure 5(a) and their numbers are shown in Figure 7(a), and Figure 7(b) shows the coefficients that have been changed in each DCT conversion block and their position in the DCT blocks.
The evaluation of the 'α' adjustment parameter in the proposed scheme is very important. The 'α' value may affect the embedding locations and the displacement rate, and thus may have different performances, which, according to Table 1, the best value for 'α' equals to 1.5.
In the following, we examine the changes in the embedding parameter among non-zero coefficients and its effect on the coefficients changes rate for α = 1.5, which is shown in Fig-TABLE

DISCUSSION AND COMPARISONS
To evaluate the proposed method, Table 2 compares the two methods of J-UNIWARD [11] and UED [12] for the sample cover image and different embedding rates. According to the obtained values, the proposed method, for the 37,240 non-zero DCT coefficients in the sample image iden-

FIGURE 9
Comparisons of detection errors E oob by the proposed method upon J-UNIWARD in against JSRM steganalysis tified in implementation, has a lower percentage of change in the coefficients than the compared methods. Specifically compared to the J-UNIWARD method, our best performances were in 0.05, 0.1, 0.2, 0.3 embedding rates, and to the UED method, our best performances were in 0.1, 0.2, 0.4, and 0.5 embedding rates.
About the security performance in digital images, it should be noted that perfect security seems unachievable for empirical cover sources, and currently, the best the steganographer is to minimise the detectability when embedding a required payload [23,25]. A way to approach this problem is to embed while minimising the distortion function criteria. This converts the problem of secure steganography to one that has been largely resolved in terms of known bounds and general near-optimal practical coding constructions. Since we have reduced the distortion function criteria, we can see the effect of the improvement in security with five embedding payloads 0.1, 0.2, 0.3, 0.4, 0.5 bit per non-zero AC coefficient in Figure 9. All the 1000 images are JPEG with three quality factors 75, 85, 95, respectively, and the percentage of incremental E oob ratio (incremental testing error ratio), that is, the ratio of difference of E oob value of ours proposed method and E oob value of J-UNIWARD [26], are obtained by the proposed scheme upon J-UNIWARD JSRM steganalysis [26]. The proposed method could improve the corresponding detection error and our best performance is in 0.5 embedding payload by about 7.2%.

CONCLUSION
Today, the need to disseminate and share medical images is rapidly increasing, and advanced medical information systems have changed the way of changing the storage, access, and distribution of medical images. A large amount of patients' personal information is presented and also available in medical JPEG images, therefore the privacy of patients in JPEG medical images has become an important issue. Also, medical images, due to their smooth texture, are more likely to be exposed to embedded distortions, and this problem has been acceptably resolved in the proposed method based on the distortion reduction approach. Steganography is a useful tool to hide patients' information in medical images. Most existing JPEG image steganography methods can eliminate interdependencies of DCT blocks, thus the security performance is still not fully satisfactory. More study on security parameters is one of the aspects that should be considered more by researchers in this field in future work. In this study, an adaptive strategy was first considered to coordinate the correct paths for the same position of adjacent DCT blocks based on the ICA, and then the cost values were dynamically adjusted using the inter-block neighbours' changes in the embedding process. The process of adjusting cost values, in turn, reduces the distortion caused by embedding, which is a significant effect on not identifying images that have embedded messages and patient confidential information. Experimental results showed that the proposed method can significantly improve performance on the distortion reduction criterion, and subsequently the security of patient information is improved in that it is not threatened by anti-steganalysis methods. Comparisons in medical images with different dimensions, types of compression in medical images, and other types of distribution functions can also be considered in future works.