1 Introduction

As the progressive development of personal computers, smart phones and network technologies, data generation, transmission, and storage become easier. Browsing Web pages, sending and receiving E-mails, and instant messaging are common applications of data transmission. It is an important issue to build up a thorough image visual mechanism to protect the security of data when they are transmitted via the Internet. Data hiding reaches the invisibility of hidden data because it embeds the confidential message into a visual cover media such that the secret data cannot be conscious of the existence of message itself by human sense. The cover media of reversible data hiding techniques can be inverted back to the original media without any distortion after the hidden data have been extracted out. It is a critical requirement in some applications, such as medical diagnosis and law enforcement for some legal considerations.

Depending on different image features, data hiding can be classified into three domains: spatial domain [1, 3, 8], frequency domain [2, 5], and compression domain [6, 11]. The main idea of image processing in spatial domain is to handle the pixels directly by modifying pixel values. The most common technique is the least significant bit (LSB) substitution [1, 10]. Secret messages are embedded by modifying the last few significant bits of a pixel value. Human’s eyes are not sensitive in the kind of pixel fine tuning. Histogram modification method shifts the pixels between the peak and zero or points of the histogram of an image to slightly modify the pixel grayscale values to embed data into the image. It is able to embed about 5–80 K bits into a 512×512 grayscale image while the PSNR of the marked image versus the original image is kept to be 48 dB. A novel techniques in [8, 12] constructed a histogram of difference values between original pixels and predicted pixels to enhance embedding capacity and reserve the image quality. Secret messages are hidden in the histogram. Multilevel histogram modification [12] is able to enlarge the payload of secret message in a more flexible and adaptive way. Image interpolation [3, 9] is usually used to generate a high-resolution image from its low-resolution, that is, to scale up an image. The interpolated pixels result to some difference values comparing with its original image and data hiding can be applied by taking this advantage. There are some simple interpolation methods, such as nearest neighbor, bilinear, and nearest neighbor mean interpolation will be introduced later in Sect. 2.

The technique of data hiding in frequency domain transforms pixel values into a set of coefficients first and then uses the coefficients to carry secret data. Some well-known transformation functions such as discrete cosine transform (DCT), discrete wavelet transform (DWT), discrete Fourier transform (DFT) and so on are usually employed. A Haar digital wavelet transform (HDWT)-based reversible data hiding method [2] was developed to embed data in the high frequency band since the high frequency band incorporates less energy than other bands of an image. Discarding high frequency DCT coefficients in certain image regions, a watermarking technique [5] modifies the coefficients in the middle frequency to carry a secret message.

In the compression domain, the cover image is an index format that is generally encoded by vector quantization (VQ) [6, 11]. The principle of VQ-based data hiding first trains a representative codebook and then divides the codebook into sub-codebooks in which n codewords with stronger similarity formed a n-member sub-codebooks. The number of codewords in sub-codebook determines the amount of secret embedding at a time when the secret are hidden. One of the codewords in the sub-codebook is selected to substitute the original codeword and to embed the secret message.

In this paper, we propose a two-stage data hiding method on digital images. At the first stage, we first generate a cover image using the developed enhanced neighbor mean interpolation (ENMI for short) and then take the difference values from input and cover pixels as carrier to embed secret data. In this stage, our proposed scheme raises the image quality a lot due to the ENMI method. At the second stage, a histogram modification method applied on the difference image to further enlarges the embedding capacity and preserves the image quality without distortion. Our technique achieves the requirement of high embedding capacity and image quality with low-computation complexity.

The rest of this paper is organized as follows. In Sect. 2, two reversible data hiding methods upon image interpolations and histogram modification are introduced. The proposed scheme is presented in Sect. 3. Experiments are performed and the experimental results are shown in Sect. 4. The performance in terms of embedding capacity and image quality are also discussed. The conclusion is stated in Sect. 5.

2 Related works

Data hiding schemes upon image interpolations and histogram modification are reviewed in this section.

2.1 Data hiding upon interpolations

Interpolation is the process by which a small image is resized or remapped to a larger one. Interpolation algorithms stretch the size of an image and generate pixels to fill in the blanks. Image interpolation is widely used in medical imaging, digital photos, film-scanned images, and so forth. For example, image reconstruction in computed tomography (CT) or magnetic resonance imaging (MRI) often employs image interpolation. In 2009, Jung and Yoo [4] first proposed the use of image interpolation in the spatial domain of data hiding. Data hiding in combination with image interpolation makes the use of imagery more diverse.

In image interpolation, limited information is used to calculate and predict other pixel values. The limited information, or the known pixels, are called reference pixels and will leave unchanged while interpolating. In the following, some common interpolation algorithms including nearest neighbor interpolation and bilinear interpolation are introduced.

2.1.1 Nearest neighbor interpolation

Nearest neighbor interpolation (NNI for short) is a simple method, which selects the value of the nearest neighboring point to yield an interpolant. An example is shown in Fig. 1.

Fig. 1
figure 1

An example of nearest neighbor interpolation, which estimates new data points by locating the nearest known data points

2.1.2 Bilinear interpolation

To the estimated the point value, bilinear interpolation (also called BI) uses the 4 nearest neighboring reference (known) pixels, which are located in diagonal directions from the given pixel. Figure 2 shows an example of the estimation by bilinear interpolation, where the pixel value of p′(1,2) is calculated by weighting its reference neighbors which are pixels p(0,0), p(2,0), p(0,3), and p(2,3).

Fig. 2
figure 2

An example of bilinear interpolation

2.1.3 Neighbor mean interpolation

In 2009, Jung and Yoo [4] proposed a new interpolation which is “Neighbor mean interpolation (NMI for short)” with a low-time complexity and high-calculation speed. An example of NMI is shown in Fig. 3 as follows.

Fig. 3
figure 3

An example of neighbor mean interpolation method

The data hiding scheme by Jung and Yoo scales down an input image to 1/4 of its initial size, which then becomes the original image. The scheme then uses NMI to enlarge this original image into a cover image, which has the same size as the input image. Secret data are hidden in the scaling-up cover image. The authorized receiver can extract embedded secret message from the stego-image and restore the cover image to the original image.

2.2 Data hiding on histogram modification

In the traditional histogram modification data hiding, the amount of every pixel values of the cover image is counted and a histogram is constructed. This method was first applied by Ni et al. in 2006 [7]. For a grayscale cover image C with size of M×N, let a grayscale value with the maximum number of pixels in C as the peak point denoted as P; let a grayscale value with no pixels or the minimum number of pixels in C as the zero point denoted as Z. Assume P<Z, histogram modification method shifts the values within the range [P+1, Z−1] of the histogram to the right-hand side by one unit, leaving the grayscale value (P+1) empty. A bit b which is extracted from the secret data will be embedded, and the output stego-image is S. The rule to hide the secret bit b is as shown in Eq. (2).

$$ C '(i,j) = \left \{ \begin{array}{l@{\quad}l} C(i,j) &\mathrm{if}\ C(i,j) \le P\\ C(i,j) + 1 &\mathrm{if}\ Z > C(i,j) > P\end{array} \right . ,\ \mathrm{for}\ 0 \le i \le M - 1,\ 0 \le j \le N - 1, $$
(1)
$$ S(i,j) = \left \{ \begin{array}{l@{\quad}l} C '(i.j) &\mathrm{if} \ C '(i,j) = P\ \mathrm{and}\ b = 0\\ C '(i.j) + 1& \mathrm{if}\ C '(i,j) = P\ \mathrm{and}\ b = 1\\ C '(i,j)&\mathrm{otherwise} \end{array} \right .. $$
(2)

A simple example considers a matrix shown in Fig. 4 as a cover image. Assume a secret message be a series of bits “1010111”. The histogram of the cover image is shown in Fig. 5. The peak value is P=3, so all pixels larger than three are increased by one. The image and its histogram after pixel-shifting are shown in Figs. 6 and 7. According to the embedding rule, when a pixel value equivalent to three, the pixel is modified to be four as we embed the bit b=1; otherwise, we keep the pixel value unchanged. After the embedding process has been done, the stego-image is shown in Fig. 8.

Fig. 4
figure 4

A cover image of simple example

Fig. 5
figure 5

The histogram corresponding to the cover image in Fig. 4

Fig. 6
figure 6

The image after pixel-shifting applied

Fig. 7
figure 7

The histogram corresponding to the image in Fig. 6

Fig. 8
figure 8

The stego-image after secret data have been embedded

3 The proposed scheme

In this section, we propose a high visual quality data hiding scheme. In Sect. 3.1, we design an enhanced neighbor mean interpolation (also called ENMI) to generate a cover image. Second, the proposed embedding procedure in two stages is illustrated in Sect. 3.2. The procedure of secret data extraction and image restoration is presented in Sect. 3.3. To give readers a better understanding of our proposed scheme, we give a simple example to illustrate the method in Sect. 3.4.

3.1 Enhanced neighbor mean interpolation

The proposed enhanced neighbor mean interpolation (ENMI for short) is inspired from the Jung–Yoo-scheme [4]. Figure 9 illustrates the procedure of our proposed scheme. For an input image I sized of 512×512 pixels, we first define an image block, which is composed of four adjacent pixels, i.e., I(i,j), I(i+1,j), I(i,j+1), and I(i+1,j+1). For each pixel I(i,j), the corresponding cover pixel, C(i,j) of a cover image C is defined by the algorithm of ENMI. Figure 10 shows an example of how to process the enhanced neighbor mean interpolation.

Fig. 9
figure 9

The flowchart of proposed data hiding method

Fig. 10
figure 10

An example of ENMI method

Algorithm of ENMI

Input: Input image I with sized N×N

Output: Cover image C

for i=0∼N−1 do

for j=0∼N−1 do

$$ C(i,j) = \left \{ \begin{array}{l} I(i,j)\quad \mathrm{if}\ i\bmod 2 = 0\ \mbox{and}\ j\bmod 2 = 0 \\ I(i,j - 1)\quad \mathrm{if}\ j = N - 1 \\ I(i - 1,j)\quad \mbox{if } i = N - 1 \\ \frac{I(i,j - 1) + I(i,j + 1)}{2}\quad \mathrm{if}\ i\bmod 2 = 0\ \mathrm{and}\ j\bmod 2 = 1 \\ \frac{I(i - 1,j) + I(i + 1,j)}{2}\quad \mathrm{if}\ i\bmod 2 = 1\ \mathrm{and}\ j\bmod 2 = 0 \\ \frac{I(i - 1,j - 1) + I(i - 1,j + 1) + I(i + 1,j - 1) + I(i + 1,j + 1)}{4}\quad \mathrm{otherwise} \end{array} \right .. $$
(3)

end for

end for

3.2 The embedding phase

The proposed data hiding algorithm, including two stages with interpolation data hiding and histogram modification, are shown next in details.

Step 1.:

For an input image I, the ENMI algorithm is employed to generate the corresponding cover image C. Afterward, a difference image D 0 can be computed by Eq. (4).

$$ D_{0}(i,j) = C(i,j) - I(i,j). $$
(4)
Step 2.:

The number of bits, says n is calculated by Eq. (5).

$$ n = \mathit{trunc} \bigl(\log_{2}\bigl \vert D_{0}(i,j) \bigr \vert \bigr) - 1, $$
(5)

where “trunc” denotes the function which returns a number truncated to an integer.

Step 3.:

The first segment of binary secret data W 1 needs to be partitioned into sub-streams before they are hidden. Each sub-stream, say w with n bits denoted by Eq. (6) can be extracted out from secret segment W 1. A bit “1” called the leading bit is padded to the left-hand side of sub-stream w. An integer value d is converted from the sub-stream w and its leading bit.

$$ w = w_{n}w_{n - 1}\cdots w_{2}w_{1}\quad \mathrm{if} \ n > 0, $$
(6)
$$\begin{aligned} d = \left \{ \begin{array}{l@{\quad}l} 1 \times 2^{n} + w_{n} \times 2^{n - 1} + w_{n - 1} \times 2^{n - 2} +\cdots + w_{1} \times 2^{0}&\mathrm{if} \ n > 0 \\ 1&\mathrm{if} \ n = 0 \end{array} \right .. \end{aligned}$$
(7)
Step 4.:

At this point in the first stage of embedding procedure, we can embed d to a cover pixel C(i,j). A stego-image S 1 is generated by adding d to or subtracting d from the cover pixel C(i,j) in order to make the stego-pixel value closer to the input pixel I(i,j). The embedding rule is shown as follows:

$$ S_{1}(i,j) = \left \{ \begin{array}{l} C(i,j) \\ C(i,j) + d \\ C(i,j) - d \end{array} \right .\quad \begin{array}{l} \mbox{if } i\bmod 2 = 0\ \mbox{and}\ j\bmod 2 = 0 \\ \mbox{if } I ( i,j ) \ge C ( i,j ) \\ \mbox{if } I ( i,j ) < C ( i,j ) \end{array}. $$
(8)
Step 5.:

For increasing the embedding capacity, the second stage of embedding procedure produces another difference image D 1 in by Eq. (9).

$$ D_{1}(i,j) = S_{1}(i,j) - C(i,j). $$
(9)
Step 6.:

A histogram is constructed based on the difference values D 1 and two peak points are chosen where P 2<0<P 1. It is worth mentioning that we do not choose 0 as a peak value because we want to present the changes of reference pixels when the pixel-shifting in the histogram modification of D 1 are carried out. That is, the secret data cannot be embedded on reference pixels after histogram modification method is applied on D 1, or we cannot recover D 1 on the recovery phase. The rule for shifting values in the histogram of D 1 is listed as the following Eq. (10):

$$ D_{1}'(i,j) = \left \{ \begin{array}{l@{\quad}l} D_{1}(i,j) + 1&\mbox{if } D_{1}(i,j) > P_{1} \\ D_{1}(i,j) - 1&\mbox{if } D_{1}(i,j) < P_{2} \\ D_{1}(i,j)&\mathrm{otherwise} \end{array} \right .. $$
(10)
Step 7.:

Sequentially scan the difference image \(D_{1}'\) from left-to-right and up-to-down. If the value \(D_{1}'(i,j)\) equals to one of the peak values, then we can extract one bit w′ from the second segment of binary secret data W 2 to be hidden in \(D_{1}'(i,j)\). The second stage of embedding rule is listed as the following Eq. (11):

$$ D_{1}'' (i,j) = \left \{ \begin{array}{l@{\quad}l} D_{1}'(i,j) + w'& \mbox{if}\ D_{1}' ( i,j ) = P_{1}\\ D_{1}'(i,j) - w'&\mbox{if } D_{1}' ( i,j ) = P_{2} \\ D_{1}'(i,j)& \mathrm{otherwise}\end{array} \right . . $$
(11)
Step 8.:

Equation (12) shows that the difference value \(D_{1} '' (i, j)\) can be added to the cover pixel C(i,j) to generate the stego-pixel S(i,j).

$$ S(i,j) = C(i,j) + D_{1}'' (i,j). $$
(12)

The following pseudo-code demonstrates our proposed embedding phase:

Input::

Input image I with sized N×N, secret data W=W 1W 2 where “∥” means string concatenation operator.

Output::

Stego-image S, two peak points P 1,P 2

Apply ENMI on I to generate C;

for i=0∼N−1 do

for j=0∼N−1 do

   D 0(i,j)=C(i,j)−−I(i,j);

  The number of bits n is calculated from D 0(i,j);

  Extract n-bit stream w from W 1;

  Convert 1∥w to decimal presentation d;

   If I(i,j)>C(i,j)

    S 1(i,j)=C(i,j)+d;

   Else

    S 1(i,j)=C(i,j)−d;

end for

end for

for i=0∼N−1 do

for j=0∼N−1 do

   D 1(i,j)=S 1(i,j)−C(i,j);

end for

end for

Generate histogram of D 1;

Select two peak points from D 1 where P 2<0<P 1;

Apply histogram shifting on D 1 resulting \(D_{1}'\);

Embed secret bits from W 2 on P 2 and P 1 of \(D_{1}'\) resulting \(D_{1}''\);

for i=0∼N−1 do

for j=0∼N−1 do

   \(S(i, j) = C(i, j) +D_{1}''(i, j)\);

end for

end for

3.3 The phase of secret extraction and image recovery

The proposed algorithms of secret extraction and image recovery are described in the following.

Step 1.:

The cover image C can be retrieved from the stego-image S. The procedure first scans the stego-image S and introduces the ENMI algorithm to obtain C by the following rule as shown in Eq. (13):

$$ C(i,j) = \left \{ \begin{array}{l} S(i,j)\quad \mathrm{if}\ i\bmod 2 = 0\ \mbox{and}\ j\bmod 2 = 0 \\ \frac{S(i,j - 1) + S(i,j + 1)}{2}\quad \mathrm{if}\ i\bmod 2 = 0\ \mathrm{and}\ j\bmod 2 = 1 \\ \frac{S(i - 1,j) + S(i + 1,j)}{2}\quad \mathrm{if}\ i\bmod 2 = 1\ \mathrm{and}\ j\bmod 2 = 0 \\ \frac{S(i - 1,j - 1) + S(i - 1,j + 1) + S(i + 1,j - 1) + S(i + 1,j + 1)}{4}\quad \mathrm{otherwise} \end{array} \right .. $$
(13)
Step 2.:

We can construct a histogram by subtracting C from S as Eq. (14) shown

$$ D_{1}'' (i,j) = S(i,j) - C(i,j). $$
(14)

Afterward, the extraction procedure sequentially scans the difference image \(D_{1}''\) from left-to-right and up-to-down for extracting a segment of secret message by referencing to the values around the peak points.

Step 3.:

There are two stages need to be performed for extracting the whole hidden data and restoring cover pixels. The first stage initializes W 2 as an empty set in advanced. If the difference value \(D_{1}'' (i,j)\) equals to P 1, P 1+1, P 2, or P 2−1, then a secret bit has been hidden among them. We can extract the secret bit w′ according to Eq. (15).

$$\begin{aligned} w' = \left \{ \begin{array}{l@{\quad}l} 0 &\mathrm{if}\ D_{1}'' (i,j) = P_{1}\ \mbox{or } D_{1}'' (i,j) = P_{2}\\ 1 &\mathrm{if}\ D_{1}'' (i,j) = P_{1} + 1\ \mbox{or } D_{1}'' (i,j) = P_{2} - 1\end{array} \right . . \end{aligned}$$
(15)

Append the secret bits to W 2 in the way of W 2=W 2w′. Afterward, the histogram modification method is applied on the difference image \(D_{1}''\) by Eq. (16).

$$ D_{1}(i,j) = \left \{ \begin{array}{l@{\quad}l} D_{1}'' (i,j) - 1& \mathrm{if}\ D_{1}'' (i,j) > P_{1}\\ D_{1}'' (i,j) + 1& \mathrm{if}\ D_{1}'' (i,j) < P_{2}\\ D_{1}'' (i,j)& \mathrm{otherwise}\end{array} \right .. $$
(16)
Step 4.:

The next is to convert the integer D 1(i,j) to its binary representation, say b. The first bit which must have been the bit “1” that denotes the leading bit of the string b. What we want to find is the secret sub-stream, say w, is to discard the leading bit and take the rest of the string b. For example, if D 1(i,j)=9, convert it to binary, that is “1001”. Discard the leading bit and we obtain the secret sub-stream “001”. However, when D 1(i,j)=1 is encountered, it means no secret data are embedded.

Step 5.:

At last, all the secret sub-streams are appended to obtain the secret segment W 1. Append W 2 to W 1 and the whole secret message W=W 1W 2 can be completely extracted out.

The pseudo-code demonstrates our proposed extraction and image recovery phase as follows:

Input: Stego-image S with sized N×N; two peak points P 1 and P 2

Output: Secret data W=W 1W 2 and cover image C

Apply ENMI on S to generate C;

Let W 1 and W 2 be EMPTY;

for i=0∼N−1 do

for j=0∼N−1 do

   \(D_{1}''(i, j) = S(i, j) - C(i, j)\);

   If \(D_{1}''(i, j) = P_{1}\) or P 2

    W 2=W 2∥0;

   Else if \(D_{1}''(i, j) = P_{1} + 1\) or P 2−1

    W 2=W 2∥1;

end for

end for

for i=0∼N−1 do

for j=0∼N−1 do

   If \(D_{1}''(i, j) > P_{1}\)

    \(D_{1}(i, j) = D_{1}''(i, j) - 1\);

   Else if \(D_{1}''(i, j) < P_{2}\)

    \(D_{1}(i, j) = D_{1}''(i, j) + 1\);

   Else

    \(D_{1}(i, j) = D_{1}''(i, j)\);

  Convert D 1(i,j) to binary presentation b;

  Discard the first bit of b and the rest bit stream is w;

   W 1=W 1w;

   end for

end for

W=W 1W 2;

3.4 An example of the proposed scheme

We give a simple example to illustrate the proposed scheme. For an input image I sized of 3×3 pixels, the reference pixels are 35, 101, 199, and 79. The cover pixel, C(i,j) of a cover image C can be calculated by the algorithm of ENMI. Figure 11 shows an example of how to process the enhanced neighbor mean interpolation to obtain a cover image C.

Fig. 11
figure 11

Example of a cover image from an input image by ENMI algorithm

A difference image D 0 can be computed by Eq. (4) and shown in Fig. 12 by subtracting the pixel values of the input image from that of the cover image.

Fig. 12
figure 12

An example of difference image D 0

Apply Eq. (5) to calculate the number of bits which have to be extracted out from secret segment W 1 and embedded onto a cover pixel. The embedded process is shown as Fig. 13 and Fig. 14.

Fig. 13
figure 13

An example of calculating the number of hidden bits

Fig. 14
figure 14

An example of embedding secret messages by ENMI method

Another difference image D 1 can be calculated by subtracting each pixel values in the cover image C from which in the stego-image S 1. Figure 15 shows the result of D 1 in our simple example. A histogram can be constructed from D 1 and we choose −6 and 9 as two peak values. Then the histogram is shifted and secret message W 2= “1001” is embedded continuously.

Fig. 15
figure 15

An example of embedding secret messages by histogram modification

After histogram modification, adding up the modified difference values \(D_{1} ''\) to cover image. A stego-image S is generated as Fig. 16.

Fig. 16
figure 16

An example of stego-image

When the receiver gets a stego-image S and two peak values, the cover image C can be recovered by ENMI. Thus, the histogram can be constructed by the difference value of S and C. While scanning \(D_{1} ''\) and the difference value −6 or 9 is encountered, a secret bit “0” can be extracted; otherwise, if the difference value is −7 or 10, the secret bit “1” can be extracted, as shown in Fig. 17.

Fig. 17
figure 17

Obtain \(D_{1} ''\) and secret messages in extraction process

By applying the inverse process of histogram modification, the difference image D 1 can be recovered. Convert each absolute value of D 1(i,j) to its binary string b and discard the leading bit “1”of string b to obtain the hidden secret sub-bitstream w. The extraction process is shown in Fig. 18. A complete secret message W=W 1W 2 comes from appending the secret segment W 2 in Fig. 17 to the secret segment W 1 in Fig. 18.

Fig. 18
figure 18

An example of extracting secret messages

4 Experimental results

In our experiments, six 512×512 grayscale images as shown in Fig. 19 are used as input images. A secret data composed of bits “0” and “1” are generated by a random function. Capacity (bits) and PSNR (Peak signal-to-noise ratio) are performance measurements to estimate the embedding capacity and image quality, respectively. For two images I and K for both of the size M×N, the PSNR value is computed as follows:

$$\begin{aligned} \mathrm{MSE}\ (\mbox{mean squared error}) = \frac{1}{MN}\sum _{i = 0}^{M - 1} \sum_{j = 0}^{N - 1} \bigl[ I(i,j) - K(i,j) \bigr]^{2}, \end{aligned}$$
(17)
$$ \mathrm{PSNR} = 10 \times \log \biggl(\frac{255^{2}}{MSE}\biggr). $$
(18)
Fig. 19
figure 19

Six 512×512 grayscale input images

Table 1 shows the comparison in terms of PSNR for the cover image quality by the methods of NMI and ENMI. In our proposed ENMI method, we use different prediction equations to calculate the estimation points. In the right-bottom pixel of every block as shown in Fig. 10, the interpolation method refers to four neighbor pixels of the to-be-estimated point so that the prediction can be more correct. Thus, the PSNR of cover images is enhanced in our ENMI method.

Table 1 A comparison of cover image quality by NMI and proposed ENMI

Table 2 shows the improvement of embedding capacity and image quality after secret data have been hidden by the proposed histogram modification method. After embedding secret messages using ENMI, a set denoted as D 1 is calculated from the difference values between the stego-image and cover image. A histogram corresponding to the set D 1 is constructed for embedding more secret data by histogram modification method. Two peak points P 1 and P 2 are selected, where P 2<P 1. For the values greater than P 1 of the histogram are shifted to the right-hand side by 1 unit; similarly, for the values smaller than P 2 of the histogram are shifted to the left-hand side by 1 unit. The pixel-shifting makes the difference values of D 1 be increased or decreased at most one such that the stego-image is closer to its corresponding input image. By the way, the image quality is then significantly improved.

Table 2 A comparison of EMNI and histogram modification embedding on capacity and PSNR

Table 3 shows the pure payload and PSNR compared with that of Jung–Yoo-scheme. Only the secret data is considered on computing the capacity and pure payload. The extra information, such as peak value, is ignored on both two schemes. The image quality of proposed scheme is greatly enhanced. PSNR is therefore increased over 10 dB on the average for each input image. Actually, the proposed scheme is significantly better than the Jung and Yoo’s scheme in terms of PSNR regardless of whether the test image is smooth or complex. The reason why there is such a good effect in our scheme is that while embedding secret data, pixel values are changed, but we try to make the pixel values not too far from their corresponding pixels in the cover image. Moreover, the embedding capacity of the proposed scheme is enhanced about 10 % in most test images except for “Baboon” and “Gold” images. Since “Baboon” and “Gold” images are complicated images with irregular and complex patterns so that the amount of peak value is not that huge. Therefore, histogram modification does not perform well in the complicated images.

Table 3 A comparison of Jung and Yoo’s data hiding method on pure payload and PSNR

5 Conclusions

In this paper, we proposed a data hiding method with high capacity and high image quality. In the proposed scheme, we first sample an input image down to a small sized image and then scale it up to the same size as the input image by using proposed enhanced neighbor mean interpolation (ENMI). After embedding secret data, the histogram modification method is applied to increase up the embedding capacity. We also enhance the embedding methods in two stages mentioned above to maintain high image quality. The proposed scheme allows certain changes to hide secret in an image to go undetected by Human Vision System (HVS). As shown in Sect. 4, the proposed scheme performs well in terms of embedding capacity and image quality. The PSNR of proposed scheme are higher than that of the past works. This meets one of the requirements in data hiding with security issue. Also, the secret messages can be extracted completely so the goal of private communication is reached.