Keywords

1 Introduction

Data hiding is an advanced technology for protecting the message with integrity and security from data transmission in a public network [1]. The secret information is capable of being hidden into some media, such as an image, audio or video data, using the well-known data hiding scheme. In general, for different target, the data hiding scheme can be classified into two categories. One is non-reversible data hiding scheme [24]. The non-reversible data hiding scheme aims to protect the hidden data for secret communication. The conventional LSBs (least signification bit substitution) is a simple and easy technology of non-reversible data hiding scheme. For example of 1-bit LSBs method, a secret bit is to be embedded into 1-rightmost bit of the cover pixel. The other is reversible data hiding (RDH) scheme [516]. The goal of RDH algorithm is to obtain both cover media and hidden data that can be recovered and extracted from stego media. It indicates that the distortion of cover media is intolerable when secret message is extracted. RDH can be widely applied into some applications, such as military, medical, or legal document.

Many RDH techniques have been developed in present. It can be divided into three categories, namely, histogram-based [58], difference expansion [912], and prediction error [1316]. Ni et al. first proposed a reversible data hiding based on histogram shifting in 2006 [5]. In their method, the histogram distribution is fist generated from an input image. After that, shift and conceal the secret bits into the selected range from histogram distribution. Ni’s approach performed a good quality in the stego image because pixel shifting and data concealing are only shifted by one unit. Although histogram-based approach is simplicity and provides high image quality, the number of embedding capacity is limited in the height of peak point. Later on, more efficient algorithms have been invented for improving the embedding capacity limitation [68].

The second category is difference expansion. In 2003, Tian proposed a reversible data hiding scheme based difference expansion (DE) [9]. Tain’s method expands the two pixel differencing for data concealing. The maximal embedding ratio based on DE is near to 0.5 bpp (bit per pixel) for one layer embedding. Some researchers are focused on investigation and developing high-fidelity reversible data hiding scheme [1012].

The histogram-based approach and difference expansion method can perform lossless data hiding, but their performance might be limited within the media context. A basic idea is to review their drawback and develop suitable strategy for promoting the performance in terms of embedding capacity and image quality. The prediction error is a good strategy for both histogram-based approach and difference expansion method to devise a new method of improving the performance. A local prediction reversible data hiding combined prediction error and difference expansion is proposed by Drago and Coltur in 2014 [13]. Drago and Colutr’s approach utilized least square predictor to obtain the prediction error, then, expend the prediction error for data hiding. This approach has better performance than that of DE method. Later on, more researchers are developed the efficient approaches for obtaining higher performance [1416].

In reviewing above-mention reversible data hiding scheme, a framework of reversible data hiding is proposed. Our main contribution is to build 2D histogram distribution based on two side-match predictors and slope meter. 2D histogram distribution can collect more information and find out more spaces for date embedding, resulting in high embedding capacity. Our proposed can be extended into multi-dimensional framework in future.

The rest of the paper is organized as follows. The related works about histogram shifting scheme are briefly introduced in Sect. 2. Section 3 presents our proposed scheme in detail. The experimental result is illustrated in Sect. 4. Finally, the conclusion is concludes in Sect. 5.

2 Related Works

In this subsection, we will review the reversible data hiding scheme based on histogram shifting. The histogram shifting scheme, named as histogram-based, is introduced in 2006. Ni et al.’s approach found out that each cover image has its pixel distribution. Firstly, they applied the statistic function to account each pixel number, the histogram distribution is thus generated. Next, find out the range of peak point and zero point from this distribution. In the end, shift and conceal the data into the range of peak point and zero point. The detail algorithm of histogram-based is shown as below.

Input: Cover image CI, each pixel value x∈[0.255], secret message SM = b 1 b 2 b 3b n , b i ∈ {0,1}.

Output: Stego image SI, a pair information (peak point, zero point).

  1. Step 1:

    Generate a histogram distribution H(x) from an inputted image. Where, Fig. 1 is an example of histogram distribution using Lena image.

    Fig. 1.
    figure 1

    The example of pixel distribution using Lena as cover image

  2. Step 2:

    Find out a pair-data (P, Z) from the histogram distribution. Notable, P indicates the maximum number of pixels in this distribution. Z means no pixel or minimum pixel in this distribution.

  3. Step 3:

    Shift all the pixels x within the range of peak point and zero point by one unit. Note, the Fig. 2 shows the result after pixel shifting operation. The shifting function is given as following.

    $$ \left\{ {\begin{array}{*{20}c} {x^{\prime} = x + 1,\text{if }Z > P\;\text{and}\;x \in \left[ {\text{P + 1, Z}} \right]} \\ {x^{\prime} = x - 1,\text{if }P > Z\;\text{and}\;x \in \left[ {\text{Z, P} - \text{1}} \right]} \\ \end{array} } \right. $$
    (1)
    Fig. 2.
    figure 2

    The example of pixel shifting using Fig. 1.

  4. Step 4:

    Scan all pixels in the cover image, once the pixel value meets the P value, and then, check the secret bits. If the secret bit is “0”, the pixel value remains unchanged. If the secret bit is “1”, the pixels value is changed by one unit according to following data concealing function

    $$ \left\{ {\begin{array}{*{20}c} {x^{\prime} = x + 1,\text{if }Z > P} \\ {x^{\prime} = x - 1,\text{if }P\text{ } > Z} \\ \end{array} } \right. $$
    (2)

Finally, output all the scanned pixel as the stego pixel (stego image). Notably, the stego pixel can be performed the processes of data extracting and pixel recovering since a pair-data (P, Z) is received. For the data extracting, the secret bit will be extracted when the inputted pixel meets the value of P or P + 1. In other words, the hidden bits can be successfully retrieved. For the concept of pixel recovering, each inputted pixel can run the inverse of shifting operation to recover the pixel value as an original pixel.

3 Our Proposed Method

In this section, we introduce our reversible data hiding scheme based on 2D histogram modification in detail. The 1D histogram-based approach applied one factor, such as pixel value or prediction error, to generate a factor histogram distribution. Then, modify the highest value in the factor distribution for data concealing. For receiving more efficiency, our proposed scheme uses two prediction error to produce a 2D histogram distribution. More specified cases are to be considered for pursuing more spaces for promoting the embedding capacity. The detail of our data embedding algorithm is shown as below.

Input: Cover image CI with size M × N, CI = I i,j,, i = 0 to M-1, j = to N-1, secret message SMsg = b 1 b 2 b 3b n , b i ∈ {0,1}.

Output: Marked-image MI, two pair information (PP 0, PZ 0) and (NP 0, NZ 0).

  1. Step 1:

    Scan the cover image and run two side-match predictor methods, Forward side-match (FSM) and Backward side-match (BSM), to predict the pixel vale in the image.

    1. Step 1.1:

      The FSM prediction algorithm is shown the subsection, and then, compute the prediction error PE_FSM i,j  = PI i,j - I i,j .

      1. Step 1.1.a:

        If i = 0 and j = 0, then PI i,j  = I i,j -128.

      2. Step 1.1.b:

        If i = 0, then PI i,j  = I i,j - I i,j-1.

      3. Step 1.1.c:

        If j = 0, then PI i,j  = I i,j - I i-1,j .

      4. Step 1.1.d:

        Else, PI i,j  = I i,j - int (average (I i-1,j +I i-1,j-1 + I i,j-1)).

    2. Step 1.2:

      The Backward side-match (BSM) prediction algorithm is shown the subsection, and calculate the prediction error PE_BSM i,j  = PI i,j - I i,j .

      1. Step 1.2.a:

        If i = 0 and j = M-1, then PI i,j  = I i,j -128.

      2. Step 1.2.b:

        If i = 0, then PI i,j  = I i,j - I i,j+1.

      3. Step 1.2.c:

        If j = 0 and j ≠ 0, then PI i,j  = I i,j - I i-1,j .

      4. Step 1.2.d:

        Else, PI i,j  = I i,j - int (average (I i-1,j  + I i,j-1)).

    3. Step 1.3:

      Obtain each slope meter SM from computing the difference of PE_BSM i,j and PE_FSM i,j , where SM i,j  = PE_FSM i,j ─ PE_BSM i,j .

  2. Step 2:

    Let (SM i,j , PE_FSM i,j ) denotes a 2D value, and collect all 2D values to generate a 2D histogram distribution, H(SM i,j , PE_FSM i,j ).

  3. Step 3:

    Find two pair information (PP 0, PZ 0) and (NP 0, NZ 0) from 2D histogram distribution. Where a pair information (PP 0, PZ 0) is selected in the positive regions of 2D histogram distribution. In the same way, a pair information (NP 0, NZ 0) is picked by the negative positive regions of 2D histogram distribution.

  4. Step 4:

    Shift all the prediction error PE_FSM i,j by 1 unit according to following function.

    $$ {\text{PE}}\_{\text{FSM}}_{i,j}^{'} = \left\{ \begin{aligned} \text{ }{\text{PE}}\_\text{FSM}_{i,j} + 1,{\text{PE}}\_{\text{FSM}}_{i,j} \in \left[ {PP_{\text{0}} + 1,PZ_{0} } \right] \hfill \\ {\text{PE}}{\_}{\text{FSM}}_{i,j} - 1,\,\;{\text{PE}}{\_}{\text{FSM}}_{i,j} \in \left[ {NZ_{\text{0}} ,NP_{0} - 1} \right] \hfill \\ \end{aligned} \right. $$
    (3)
  5. Step 5:

    Scan all the PE_FSM i,j and fetch each secret bits from secret message SMsg, and then, conceal the secret bitstring into PE_FSM i,j value while SM i,j precisely equals to “0” and the PE_FSM i,j equals to the peak values, PP 0 and NP 0. The data concealing function is listing as below.

    $$ \text{PE}\_{\text{FSM}}_{\text{i,j}}^{'} = \left\{ {\begin{array}{*{20}c} {{\text{PE}}{\_}{\text{FSM}}_{{\text{i,j}}} + 1,\text{PE}\_{\text{FSM}}_{\text{i,j}} = {\text{PP}}_{ 0} \;{\text{and}}\;{\text{b}}_{\text{i}} = 1} \\ {{\text{PE}}{\_}{\text{FSM}}_{\text{i,j}} ,{\text{PE}}{\_}{\text{FSM}}_{\text{i,j}} = {\text{PP}}_{ 0} \;{\text{and b}}_{\text{i}} = 0} \\ {{\text{PE}}{\_}{\text{FSM}}_{\text{i,j}} ,{\text{PE}}{\_}{\text{FSM}}_{\text{i,j}} = {\text{ZP}}_{ 0} \;{\text{and b}}_{\text{i}} = 0} \\ {{\text{PE}}{\_}{\text{FSM}}_{{\text{i,j}}} - 1,\text{PE}\_{\text{FSM}}_{\text{i,j}} = {\text{ZP}}_{ 0} \;{\text{and}}\;{\text{b}}_{\text{i}} = 1} \\ \end{array} } \right. $$
    $$ {\text{PE}}\_{\text{FSM}}_{i,j}^{'} = \left\{ {\begin{array}{*{20}c} {{\text{PE}}{\_}{\text{FSM}}_{i,j} + 1,\text{PE}\_{\text{FSM}}_{i,j} = PP_{ 0} \;{\text{and}}\;b_{i} = 1} \\ {\;\;\;\;\;\;\;{\text{PE}}{\_}{\text{FSM}}_{i,j} ,{\text{PE}}{\_}{\text{FSM}}_{i,j} = PP_{ 0} \;{\text{and }}b_{i} = 0} \\ {\;\;\;\;\;\;\;{\text{PE}}{\_}{\text{FSM}}_{i,j} ,{\text{PE}}{\_}{\text{FSM}}_{i,j} = ZP_{ 0} \;{\text{and }}b_{i} = 0} \\ {{\text{PE}}{\_}{\text{FSM}}_{i,j} - 1,\text{PE}\_{\text{FSM}}_{i,j} = ZP_{ 0} \;{\text{and}}\;b_{i} = 1} \\ \end{array} } \right. $$
    (4)
  6. Step 6:

    Recover the marked prediction error value (PE_FSM i,j ) to be a stego-pixel (SPI) according the inverse of Forward side-match (FSM) predictor, where the inverse algorithm is given as below.

    1. Step 6.1:

      If i = 0 and j = 0, then SPI i,j  = PE_FSM i,j  + 128.

    2. Step 6.2:

      If i = 0, then SPI i,j  = PE_FSM i,j  + I i,j-1.

    3. Step 6.3:

      If j = 0, then SPI i,j  = PE_FSM i,j  + I i-1,j .

    4. Step 6.4:

      Else, SPI i,j  = PE_FSM i,j  + int (average (I i-1,j +I i-1,j-1 + I i,j-1)).

All the marked prediction error values are fully to be recovered, the marked image (MI) is therefore outputted.

The data extracting procedure is similar with the data embedding procedure. Two prediction methods, FSM and BSM, are also used in the extracting process. The extracting process is the inverse of the data embedding procedure. After running the data extracting procedure, the secret message is completely obtained and the image is successfully recovered.

4 Experiment Results

In section, we demonstrate the simulations of our proposed scheme. Five 512 × 512 images, including Lena, Airplane, Pepper, Boat, and Goldhill (See Fig. 3) are used in our simulations. The secret bitstring in our simulation is generated by the random number generator. We also employ the commonly measure function peak-signal-to-noise-ratio (PSNR) and MSE as a evaluate tool for comparing the visual quality between the cover image and marked image. The measure functions are given as following.

$$ {\text{PSNR}}\left( {\text{db}} \right) = 10 \times log_{ 1 0} \left( {\frac{{Max^{2} }}{MSE}} \right) $$
(5)
$$ {\text{MSE = }}\frac{1}{W \times H}\sum\nolimits_{x = 1}^{W} {\sum\nolimits_{y = 1}^{H} {\left( {\left( {I\left( {x,y} \right)} \right) - \left( {I^{\prime}\left( {x,y} \right)} \right)} \right)^{2} } } $$
(6)

where W and H are defined as the width and height of the image. I(x, y) and I’(x, y) indicates the values of cover image and marked image, respectively. The Max means the maximum value of cover image. Here, our cover image is gray level image, thus, the Max value in gray level is 255(= 28).

Fig. 3.
figure 3

The five cover images. (a)Lean; (b)Airplane; (c)Pepper; (d)Boat; (e)Goldhill

To obtain a better knowledge of how different cover image impact the performance of the proposed RDH scheme, we compare our experimental results with the recent RDH scheme, the comparison result is illustrated in Table 1. From this comparison, our scheme has better performance in terms of high embedding capacity and good image quality than that of existing RDH methods. The side match predictor applied the neighbor pixels to predict the prediction value. Generally speaking, in a nature image, the current pixel is very similar with its neighbor pixels. Assume that we use side match manner to predict the value, we can obtain an accuracy prediction. It leads that more and more prediction errors are falling into zero space. This is a reason that our side match predictor explores the advantage of prediction error to create more space for data concealing.

Table 1. The performance comparison with various approaches

5 Conclusion

In this paper, based on two side match predictors and two peaks histogram embedding, an efficient reversible data hiding scheme is proposed. The key point is to build 2D histogram based on two side match predictors and slope meter. The slope meter is used to estimate the differencing of two prediction errors. Based on accurate prediction and selecting two peak points, our proposed scheme provides more spaces for enhancing embedding capacity, the evidence can be seen in the performance evaluation. From the experimental result, it shows that our proposed approach is superior over some histogram-based works.