Reversible data hiding scheme based on pixel-value differencing in dual images

In this article, a new reversible data hiding scheme using pixel-value differencing in dual images is proposed. The proposed pixel-value differencing method can embed more secret data as the difference value of adjacent pixels is increased. In the proposed scheme, the cover image is divided into non-overlapping blocks and the maximum difference value is calculated to hide secret bits. On the sender side, the length of embeddable secret data is calculated by using the maximum difference value and the log function, and the decimal secret data are embedded into the two stego-images after applying the ceil function and floor function. On the receiver side, the secret data extraction and the cover image restoration can be performed by using the correlation between two stego-images. After recovering the cover image from two stego-images, the secret data can be extracted using the maximum difference value and the log function. The experimental results show that the proposed scheme has a higher embedding capacity and the proposed scheme differs in embedding the secret data depending on the characteristics of the cover image with less distortion. Also, the proposed scheme maintains the degree of image distortion that cannot be perceived by the human visual system.


Introduction
Recently, most of important information is transmitted over the Internet using advanced computer performance and Internet technology. Internet is convenient for information exchange because of easy access and various conveniences. However, the Internet is an open space, so important information can be deceived and altered by malicious attackers. Therefore, many data hiding schemes that can transmit information securely over the Internet have been proposed. In general, a data hiding scheme generates the stego-image by embedding the secret data into a cover image. Many data hiding schemes have been proposed based on least significant bits (LSB) replacement and pixel-value differencing (PVD) in irreversible data hiding methods. [1][2][3][4][5] The LSB scheme embeds or extracts the secret data in the lower bit region in each pixel or pixel group that is based on the fact that it is very difficult to be detected by the human visual system even if the lower bits of a pixel change. The LSB-based schemes uniformly embed the secret data as same quantity into all pixels of a cover image. However, there are edge and smooth areas in an image and it means that different amount of secret bits can be embedded on edge and smooth areas.
It is based on the fact that the alteration of edge areas cannot be distinguished well, but the alteration of smooth areas can be distinguished easily in human visual system. In other words, an edge area can be hidden more secret data than a smooth area. The PVD was first proposed by Wu and Tsai to distinguish edge and smooth areas. In the PVD method, two pixels are located in an edge area if the difference value between the two consecutive pixels is large, then more secret data can be hidden depending on the range table. On the other hand, if the difference value between the two consecutive pixels is small, less secret data can be hidden since the two pixels are located in a smooth area. Data hiding schemes using PVD method are proposed continuously. [6][7][8] Although the PVD method can embed more secret data and guarantee high imperceptibility, the cover image cannot be restored because the original image is damaged after extracting the secret data from the stego-image. It could cause serious problems in the military and medical fields that are sensitive to the distortion of the original image, so reversible data hiding schemes have been proposed to overcome restoring the cover image. [9][10][11][12] The reversible data hiding scheme can extract the secret data from the stego-image and restore the original cover image perfectly without loss of cover image. In general, reversible data hiding schemes generate a single stego-image by embedding secret data into a single cover image, but recently, dual image-based reversible data hiding schemes have been proposed that generate two stego-images after embedding secret data into a cover image. Dual image-based reversible data hiding scheme was first proposed by Chang et al. 13 in 2007. This scheme embeds and extracts secret data based on the quinary notation and improves the extraction function of exploiting modification direction (EMD) scheme 14 to increase the embedding capacity. A modulus function is designed, and two stego-pixel values are defined according to the value of the quinary secret data. In 2009, Lee et al. proposed a dual imagebased reversible data hiding scheme using four directions based on the central point. 15 This scheme uses the relationship between two images to determine if secret data can be embedded in the second image. In the embedding process, two stego-pixel values are determined according to the combination of two binary secret bits. Qin et al. proposed a scheme for performing different embedding processes on two images, 16 where the EMD scheme was applied to the first image and three rules based on the first image to embed the secret data was used to the second image. In this scheme, the distortion of the second stego-image is larger than the first stego-image. In 2015, Lu et al. proposed a dual image-based reversible data hiding scheme to reduce loss of original image by applying center folding strategy (CFS) method. 17 The CFS method reduces the distortion of the image by adjusting the range of secret data. In this scheme, secret data are embedded by using the ceil function and the floor function to generate two stego-images. In 2017, Yao et al. 18 proposed a dual image-based reversible data hiding scheme using the selection strategy of shiftable pixels' coordinates to improve the Lu et al.'s scheme. Yao et al. used the diagram to improve the scheme of Lu et al., and the selection strategy of the shiftable pixels' coordinates was used to increase the embedding capacity. In this scheme, secret data are classified into even and odd numbers, and different embedding methods are applied. In 2019, Shastri and Thanikaiselvan proposed a scheme to improve the image quality of Yao et al.'s scheme. The CFS method, shiftable pixel coordinate selection strategy method, and lookup table were used to improve the image quality. 19 In this article, we propose a dual image-based reversible data hiding scheme using the PVD method. The proposed scheme divides a cover image into sub-block and uses the maximum difference value in each sub-block to decide the length of embeddable secret data. Therefore, the proposed scheme can embed more secret data when the difference value of pixel values is larger in each sub-block.
The rest of the article is organized as follows. The PVD method and dual image-based reversible data hiding schemes are described in the ''Related works'' section. In the ''The proposed scheme'' section, the proposed embedding scheme is described and extracting and restoring scheme is explained in detail. The experimental results are explained and analyzed to demonstrate the superiority of the proposed scheme. The ''Conclusion and discussion'' section concludes the article.

PVD
Wu and Tsai proposed a PVD scheme that adjusts the size of secret data that can be embedded according to the difference between two neighboring pixels. In the grayscale cover image, two consecutive pixels are used as one block. The image is divided by blocking. When the pixels of each block are denoted by C i and C i + 1 , the difference value d i is obtained using d i = C i + 1 À C i . If the lower and upper range values in the block are u i and l i , the number n of bits that can be embedded in each block is calculated using equation (1) If a value obtained by converting n bits into a decimal form is given as b, a new difference value d 0 i is calculated using equation (2) When the new difference value is d 0 i and the difference value of the block is denoted as d i , the difference value m i between two pixels is calculated using equation (3) Suppose that two consecutive pixels in a grayscale stego-image are denoted by S i and S i + 1 , the stegoimage pixels can be calculated using equation (4)

Zhang et al.'s scheme
In 2019, Zhang et al. proposed reversible data hiding scheme using histogram shifting for high embedding capacity. This scheme used additive homomorphic encryption and block permutation for image encryption and consists of encryption, secret data embedding, secret data extraction, and image restoration phase. The encryption phase consists of additive homomorphic encryption and Block permutation. The cover image is divided into non-overlapped blocks, and a key stream R is generated to apply additive homomorphic encryption. When s is defined as the value of the original image and r is an element of the key stream R, the value x of the encrypted image X 0 is defined by equation (5) Then, block permutation is performed to enhance security. Block permutation uses the Logistic chaotic function to generate a key sequence and performs block permutation based on this key sequence to create a fully encrypted image X.
The secret data embedding step consists of a prediction step, a histogram expansion, and a shifting step. In the prediction phase, three sets are used. In the case of set 0, the predicted value is calculated using MED. When x i, j is located at (i, j) of the image, the predicted value p x is calculated using equation (6) In case of set 1, the predicted value p x is calculated using the rhombus predictor of equation (7). When x i, j is located at (i, j) of the block, adjacent pixels are x i, jÀ1 , x iÀ1, j , x i + 1, j , and x i, j + 1 , and ½ is a rounding function The case of set 2 is similar to set 1. The p x value in set 2 is the domain mean value of the vertical and horizontal directions. When the predicted value p x is calculated, the prediction error d is calculated using the following equation After the prediction error value d is calculated, the histogram right expansion and shifting steps are performed. When the range of this step is defined ½t n1 , t n2 , the number of histograms extended to the right is calculated using the following equation The prediction error d r (i, j) is calculated using equation (10) If the secret data are s r , the original pixel value is x(i, j), and the prediction error is d(i, j), then xrm(i, j) with the secret data embedded is calculated using equation (11) x rm i, j ð Þ= To generate a stego-image, a similar process is performed for histogram left expansion and shifting.

Lu et al.'s scheme
Lu et al.'s scheme used CFS method to reduce image distortion in embedding of secret data. Lu et al.'s scheme selects k bits of binary secret data and converts it into decimal form. The secret data are d, and the secret data range for k is given as R. When the data to which CFS can apply are d, equation (12) is used to calculate In order to generate two stego-images, the d value is divided into two types using the following equation When a pixel value of the cover image is defined as x i, j , the first stego-image pixel is defined as x 0 i, j , and the second stego-image pixel is defined as x 00 i, j . And, equation (14) is used to embed the secret data into the two stegoimages Yao et al.'s scheme If the number of bits of the binary secret data that can be embedded is k, then the k binary secret bits are converted into a decimal secret data d. If d is equal to 2 k À 1, additional bits can be embedded. The pixel value (x i , x i ) of the image changes into (x i À 1, x i + 1) when the additional bit is 0 and If d is not equal to 2 k À 1, then the secret data are embedded by following two cases. When each pixel of two stego-images is called x 0 i and x 00 i , d is embedded by using equation (15). Case 1: d is an even number Case 2: d is an odd number Shastri and Thanikaiselvan's scheme   Initial shifts are calculated using equation (16). Case 1: d is an even number The final shifts s 0 and s 00 are calculated using equation (17). Case 1: d\7 e , d is even The created lookup table, Table 2, is as follows. Equation (18) is used to generate two stego-image pixels s 0 and s 00 . The C i is the cover image pixel The proposed scheme The proposed scheme uses PVD method to dual imagebased reversible data hiding scheme for high embedding capacity. The cover image divides into sub-blocks with non-overlapping and the maximum difference value is calculated between the pixels in each sub-block. The maximum difference value and log function are used to determine the number of embedding secret bits. The binary secret bits that can be embedded into each pixel are converted into decimal secret data. The decimal secret data are embedded by using the floor function and ceil function into the cover image to generate two stego-images. In the extraction process, the two stegoimages are divided into non-overlapping blocks. The cover image is recovered using the average value of the pixel values of the two stego-images. The maximum difference value is calculated within each block of the cover image, and secret data are extracted using the maximum difference value and the log function. In this section, we describe a new dual image-based reversible data hiding scheme that embeds secret data according to the difference value of the pixels in the block for high embedding capacity.

Embedding algorithm
The detailed embedding algorithm is as follows. Each pixel in the block calculates the difference value with the other pixels in the block and embeds the decimal secret data based on the maximum difference value.

Algorithm 1. The embedding algorithm
Input: A cover image with width W and height H and the binary secret data Output: The two stego-images of W 3 H Step 1. Divide a cover image into non-overlapping blocks with M 3 M size.
Step 2. Define the ith block as B i , and each pixel in B i as c j, k i (j, k = 0, 1, . . . , M). And, calculate the max difference value d j, k i (j, k = 0, 1, . . . , M) using equation (19). The max function returns the maximum value ::::::: Step 3. Apply the log function to the maximum difference value d j, k i of each pixel in the block for obtaining embedding size l j, k i (j, k = 1, 2, . . . , M) by the following equation  Step 4. Convert the l j, k i size binary secret bits to decimal secret data s j, k i , and the value to be embedded is defined using the following formula. T j, k i and t j, k i are temporary values for embedding secret data Step 5. Calculate the following equation to combine the temporary values and cover image pixel values to generate two stego-images. When two stegoimages are defined as S 1 and S 2 , the pixels in each stego-image are called S 1 p j, k i and S 2 p j, k Step 6. Repeat the above steps for all blocks.

Extraction and recovering algorithm
The detailed extraction algorithm is as follows. In the recovering process, the cover image is restored by using the average value between the two stego-images. The secret data are extracted using the maximum difference value among the pixels in the restored cover image. Step 3. Calculate the maximum difference value d j, k i for each pixel using equation (19).
Step 4. Calculate the number of bits embedded into the pixel using the following equation. The number of secret bits in each pixel is defined as l 0j, k Step 5. Extract the embedded secret data s j, k i using l 0j, k i and the following equation Step 6. Repeat the above steps for all blocks.  (24). And, the secret data s 0, 0 1 = 125 À 120 j j+ 114 À 120 j j= 11, s 0, 1 1 = 141 j À140j + 138 À 140 j j= 3, s 1, 0 1 = 127 À 125 j j + 122À j 125j = 5, and s 1, 1 1 = 119 À 112 j j+ 104 j À112j = 15 are extracted using l 0 i j, k and equation (25). This extraction and recovering example is shown in Figure 3.

Experiment results and analysis
The reversible data hiding scheme measures the image quality and embedding capacity to evaluate the performance of the proposed algorithm. The embedding capacity of the secret data means the amount of secret data that can be inserted into a cover image. The visual image quality means the degree of distortion of the stego-image. The PSNR is used to evaluate the quality of an image in general. If the PSNR is more than 30 dB, image distortion cannot be detected easily by the human visual system. Therefore, most reversible data hiding schemes aim to keep the PSNR value above 30 dB. There is a trade-off relationship between the embedding capacity and the PSNR. In the data hiding scheme, the goal is to increase the embedding capacity while maintaining good image quality. The PSNR is defined as equation (26) When the pixels of the cover image are p i and the pixels of the stego-image are defined as p 0 i , the mean squared error MSE is defined in equation (27) In the proposed method, two 512 3 512-sized stegoimages are generated using a cover image of 512 3 512 sizes as shown in Figures 4-6. In 2002, Wang and Bovik 20 proposed a method to measure the quality index of images using correlation loss, luminance distortion, and contrast distortion Each element of the equation is given in equations (29)-(31) The exponent is defined as the combination of loss of correlation, luminance distortion, and contrast distortion, and is redefined as equation (32) d xy =d x d y is the correlation coefficient between the two images. The second element 2p 2 x p 2 y / p 2 x + p 2 y measures the luminance between the two images, and the third element 2d x d y / d 2 x + d 2 y compares the two images to measure the similarity of the two images.

Visual image quality
The first stego-images with PSNR values are shown in Figure 5, and the second stego-images with PSNR values are shown in Figure 6. Figures 5 and 6 show that all images of the proposed scheme maintain a PSNR value over 30 dB. Table 3 compares the PSNR of the proposed scheme and other schemes when the embedding capacity is about 500,000 bits. In Table 3, the average PSNR of the proposed scheme is 50.9679 dB. Yao et al.'s average PSNR is 51.1431 dB, and Shastri and Thanikaiselvan's average PSNR is 53.0077 dB. Shastri and Thanikaiselvan's PSNR is about 2 dB higher than the proposed scheme. However, the proposed scheme keeps the PSNR value more than 30 dB, and it is difficult to discriminate the distortion of the image in the human visual system. Table 4 compares the PSNR of the proposed scheme and other schemes when the embedding capacity is about 800,000 bits. In Table 4, the average PSNR of the proposed scheme is 42.2817 dB. The average PSNR of Lu et al.'s scheme is 45.1003 dB, the average PSNR of Yao et al.'s scheme is 46.3038 dB, and the average PSNR of the Shastri and Thanikaiselvan's scheme is 50.2927 dB. When the embedding capacity is 800,000 bits, the PSNR of other schemes is higher than the proposed scheme. However, the proposed scheme keeps the PSNR value more than 42 dB, so there is no problem.

Embedding capacity
The maximum embedding capacity of the proposed scheme and other schemes is compared in Table 5. The average embedding capacity of the proposed scheme is at least about 100,000 bits higher than Lu et al.'s scheme and Yao et al.'s scheme on average. And, the average embedding capacity of the proposed scheme is at least about 600,000 bits higher than Shastri and Thanikaiselvan's scheme on average. Shastri and Thanikaiselvan's scheme aims to improve the image quality when the embedding capacity is not large, so the maximum embedding capacity is low. As a result, the proposed scheme can embed more secret data than other schemes while maintaining the degree of image distortion that cannot be detected by the human visual system. Figure 7 compares the maximum embedding capacity using a histogram. The histogram shows that the proposed scheme has higher embedding capacity than other schemes in most images. And, the embedding capacity of secret data is almost constant in other schemes. However, the proposed scheme can embed the secret data up to 1,800,000 bits depending on the characteristics of the image. In the case of Baboon image and Bridge image, the embedding capacity of secret data is high because of the large difference between adjacent pixels. PSNR and embedding capacity Figure 9 shows PSNR and embedding capacity of the six images of the proposed scheme in the graph. The proposed scheme embedded more than 1,300,000 bits secret data while keeping PSNR more than 40 dB in tank image. In the case of truck image and Elaine image, the proposed scheme embedded more than 1,300,000 bits secret data while keeping PSNR about 39 dB. In other images, the PSNR can be maintained at more than 34 dB while maintaining an embedding capacity of more than 1,300,000 bits. The proposed scheme has lower PSNR than other schemes when the embedding capacity is low. However, when the embedding capacity is increased, PSNR is higher than other schemes. In the case of embedding capacity is 1,300,000 bits, PSNR is higher than other schemes for most images.

Conclusion and discussion
In this article, a dual image-based reversible data hiding scheme using PVD has been proposed. The cover image      was divided into blocks of size M 3 M, and the maximum difference value between the pixels in each block was calculated to decide the length of the embeddable bits. The proposed scheme increased the embedding capacity by using the maximum difference value in the sub-block. Two types of temporary values were generated by applying the ceil function and floor function to secret data. The temporary values have been combined with the pixel values of the cover image to generate two stego-images. The correlation of two stego-images was used to restore the cover image. The secret data could be extracted using the reconstructed cover image, where the maximum difference value and log function were used. Experimental results showed that the proposed scheme maintains the high embedding capacity and good image quality that has less distortion by the human visual system than the previous schemes. Also, the proposed scheme had the different embedding capacity depending on the characteristics of the cover image that makes robust to some attacks. In future work, we will plan to adopt interpolation techniques on dual images to increase the embedding capacity with good image quality.