1 Introduction

In this paper, a new approach called Multi-Pixel-Pair (MPP) is proposed for improving the classical Hybrid Near Maximum Histogram (HNMH) image steganography method known in the literature. Not only can it dynamically boost up the fixed HNMH data hiding capacity but also it can in return provide a reasonably low degradation in the Peak Signal to Noise Ratio (PSNR) and maintain the embedding efficiency beyond the conventional methods.

It is very important that any type of confidential information does not fall into the hands of third parties and that only the relevant authorized people can access it. Digital data hiding (steganography) is one of the leading scientific fields with applied studies carried out for this purpose [1]. It can be essentially performed on different types of digital media (video, audio, image, etc.). Amongst the others, image steganography is the key topic, which is used to hide data in an image of different forms. It fundamentally concerns with an input cover image, confidential information and an output stego (covered) image with hidden data. A cover image refers to the original image as a carrier medium used to hide confidential data. Stego image is the resulting covered image containing the hidden data [1]. The most essential goal in image steganography is to prevent third parties from feeling or perceiving the presence of the secret message. Both increasing the data hiding capacity and making the detection of hidden data difficult by means of least changes possible on the original cover image are important development goals.

The methods presented in the image steganography field can be grouped into frequency (transform) domain and spatial (bit) domain. In the former, different transform operations such as Discrete Wavelet Transform (DWT) and Discrete Cosine Transform (DCT) are initially applied to the pixels of a cover image whereas the pixel values of a cover image are explicitly changed in the latter to embed the secret data.

The spatial domain solutions are more favored due to their important advantages with regard to computation time and imperceptibility [2,3,4]. In the literature, there are many different approaches for embedding data in image files in the spatial domain. The Least Significant Bit (LSB) data hiding method is one of the most well-known techniques and stands out due to its low amount of change in the stego image and high data hiding capacity. It is simply based on replacing the LSBs of the cover image pixels with the bits of the secret data to be embedded. A very small amount of pixel change perceivable as noise occurs in the obtained stego image [5,6,7]. Different variations of the LSB data hiding technique have been proposed with focus on the challenging high data hiding capacity and excellent stego image quality issues [3, 478].

In addition to many theoretical image steganography studies in the literature, there are various professional and commercial applications in practice. When they are developed, data hiding capacity and PSNR parameters are considered as the key performance indicators in addition to the cost-effectiveness. PSNR practically reflects the similarity between the cover image and the stego image. A high PSNR result indicates that there is little change in the stego image [1]. In all of the methods proposed in image steganography, it is aimed to obtain high PSNR results and maximum embedding efficiency along with the ultimate goal of high data hiding capacity.

In many well-known research studies in the literature, different variations of the LSB method have been used to embed data into cover images [3, 4, 9,10,11]. A method that hides 8 bits of data in each pixel by using the LSB method was proposed in [3]. PSNR performance of the method was examined after hiding different number of bits in the color channels. In a similar study, a highly secure steganography solution was realized by combining LSB- and Pixel Value Difference (PVD)-based image steganography methods, also deploying the Advanced Encryption Standard (AES) encryption. With this hybrid approach, a reliable solution with both boosted security and high data hiding capacity that was increased by approximately 3% compared to the classical methods was introduced [9]. Another secure image steganography method based on LSB inverse transitions for color images was proposed in [10]. It was proved that if the secret data is embedded up to 1.5 bpp payload capacity, it cannot be detected; however, security vulnerabilities arise with increasing hidden data sizes. In [11], a prevailing secure data hiding method based on LSB and genetic algorithms was proposed to achieve high data hiding capacity as well as small processing times.

Another smart approach based on histogram information of a cover image for data hiding with LSB method was presented in [12]. It mainly makes use of a new algorithm in which the maximum frequency value of the image histogram is used to decide where to embed data. With its reversible data hiding approach, the values to the right of the maximum frequency value are shifted upwards and the secret data is embedded in this emptied part. In terms of performance evaluation, the PSNR results are unfavorable indeed due to the histogram shift in the method.

A method based on image histogram modification, where secret data is embedded directly on or near the maximum value by using contrast correction approaches, was proposed in [13]. The two highest histogram values are used to indicate the two brightness values next to the point where the secret data is to be embedded. This approach allows increasing the data hiding capacity such that the method is repeatedly applied on the outcome stego image created. There are two main drawbacks in this method: the image histogram is shifted and the receiver side needs to be provided with a reference information about the data embedded pixels.

The work presented in this paper has three important contributions about the proposed MPP data hiding approach. First of all, the HNMH [14] image steganography method, which is known in the literature and in practice, is firmly improved by deploying the proposed MPP approach developed. It is also possible to use the MPP approach by adapting it to the other solutions based on known or future HNMH-like data hiding schemes. Secondly, use of the proposed MPP approach together with the classical HNMH and detailed evaluation studies have shown that it is possible to achieve increasing the data hiding capacity about 37.48 times. In addition, use of the partitioning technique for the cover image together with the proposed MPP approach can additionally increase the data hiding capacity about 7.05%. Finally, while most of the emerging approaches to increase data hiding capacity in classical image steganography methods have undesirable PSNR and embedding efficiency results, an appealing performance is obtained considering these two crucial performance metrics by using the proposed MPP approach.

Rest of the paper is organized as follows. Section 2 describes in detail the classical HNMH image steganography method as well as the proposed MPP approach and the cover image segmentation technique. Section 3 presents the performance evaluation of the proposed MPP approach by means of data hiding capacity, embedding efficiency and PSNR results obtained from detailed experimental studies. The last section summarizes the MPP approach, its contributions and future directions.

2 The proposed Multi-Pixel-Pair (MPP) approach for improving data hiding capacity

In this section, the proposed MPP approach and its components are explained in detail to improve especially the data hiding capacity of the classical HNMH image steganography method [14]. First of all, the HNMH method is concisely described, followed by the data embedding/extraction algorithms and procedures of the proposed MPP approach with flow-charts. Then, the cover image partitioning technique well-known in the literature is highlighted for use in conjunction with the proposed MPP approach in order to maximize the data hiding capacity performance to the optimal level.

2.1 The classical HNMH image steganography method

The HNMH method is based on a fundamental algorithm in which hybrid use of cover image histogram distribution and LSB technique is essential [14]. It can be shortly explained that the histogram information of the cover image is used to determine pixel values of interest where secret data is to be embedded. The secret data is then hidden into the pixels of interest by using the LSB technique.

Firstly, brightness value (P) with the highest number of occurrences (vertex value) in the cover image histogram is determined. This is the key parameter in the HNMH method and also used as a reference value in the proposed MPP approach. Equation 1 is used to determine the pixels (pg) to be used in the data hiding phase. If the brightness value of the reference value P is odd, two brightness values bigger than P, otherwise two brightness values smaller than P are used for data hiding. Than the secret data is embedded by using the LSB technique only to the pixels of interest determined through Eq. 1.

$${p}_{g}=\left\{\begin{array}{c}If\; P\; is\; even, (P-1)\; and\; (P-2)\\ If\; P\; is\; odd, \left(P+1\right)\; and\; \left(P+2\right)\end{array}\right.,$$
(1)

where P is the maximum number of brightness values and pg is the pixel values to be used for data hiding [14, 15].

In the classical HNMH method, since secret data is embedded into the pixels at different regions of the cover image, resulting pixel changes are spread throughout the stego image. Consequently, the changes are highly imperceptible thus making it difficult to perceive whether any data is hidden in the stego image.

Figure 1 shows the determination of the brightness values to be used in the data hiding process depending on whether the P value is even or odd. In the HNMH method, only one pixel-pair is used for data hiding [14, 15]. This indeed leads to inefficient utilization of the cover image, resulting in relatively low data hiding capacity. Considering this challenging weakness point, the proposed MPP approach has been developed and deployed to increase the data hiding capacity of the classical HNMH method while keeping the consequent PSNR changes relatively small.

Fig. 1
figure 1

Determining the brightness value of the pixels (P) to be used for data hiding in the classical HNMH method [14]

2.2 The proposed MPP approach and its deployment for the classical HNMH method

As explained in the previous sub-section, since only one-pixel pair is used for data hiding in the HNMH method, the cover image is utilized inefficiently; therefore, the data hiding capacity is usually low for common application types in the field. The proposed MPP approach, which aims at eliminating this key drawback and is developed for use in the HNMH method to dynamically increase or optimize the limited data hiding capacity, is presented below.

In the proposed MPP approach, first of all, the brightness value (P) with the maximum vertex value (frequency of occurrence) in the image histogram is obtained. After that, the pixel brightness values to be used in the data hiding process are determined as defined in Eq. 2. If the P value is odd, the brightness values at its right side are used for data hiding, and if the P value is even, the brightness values at its left side are used for data hiding.

$${p}_{g}=\left\{\begin{array}{l}\left(P-1\right)\dots \left(P-2n\right)\;\; if\; P\; is\; even\\ \left(P+1\right)\dots \left(P+2n\right) \;\;if\; P\; is\; odd \end{array}\right.,$$
(2)

where P is the maximum number of brightness values, pg is the pixel pairs to be used for data hiding and n is the number of pixel pairs to be used.

Figure 2 shows the brightness values to be used for three pixel-pairs depending on whether the P value is even or odd. The brightness values where the secret data is to be embedded according to the P value are determined by using the Eq. 2. When the number of pixel-pairs used for data hiding needs to be transmitted to the receiver side, it leads to various disadvantages in similar techniques as explained in the previous section. Considering this fact in the proposed MPP processes, if the maximum number of pixel-pairs is used, the pixel brightness values where the secret data to be embedded is determined according to Eq. 3, which indeed already eliminates the need to send the number of pixel-pairs to the receiver side. It consequently enables that the maximum data hiding capacity can be dynamically achieved.

$$p_g=\left\{\begin{array}{lc}\left(P-1\right)\dots0&if\;P\;is\;even\\\left(P+1\right)\dots255&if\;P\;is\;odd\end{array}\right.$$
(3)
Fig. 2
figure 2

Determining the brightness value of the pixels to be used for data hiding in three pixel-paired MPP approach

With regard to secret data, initially the American Standard Code for Information Interchange (ASCII) equivalents of the characters in the text message are converted into binary numbers (Fig. 3). Each character is represented in 9-bit binary numbers, considering different characters in other language alphabets. The fundamental rules that form the center of the proposed MPP approach and the procedures applied for data embedding are summarized step by step as follows:

  1. Step 1.

    Each character of the secret text message is converted to its 9-bit ASCII equivalent. NULL (000000000)2 is then appended to this obtained ASCII equivalent to indicate end of the message.

  2. Step 2.

    The “P” value with the highest number of occurrence (Vertex) in the cover image histogram distribution is obtained.

  3. Step 3.

    The number of pixel pairs (n) to be used for data hiding is pre-defined. If the maximum number of pixel pairs is to be used, this step is skipped.

  4. Step 4.

    Depending on both the “n” value and whether the “P” value is odd or even, the brightness values of the pixels, where the secret data is to be embedded, are determined (Eqs. 2 and 3).

  5. Step 5.

    The bit (binary) value of the secret data to be embedded into the cover image is read.

  6. Step 6.

    The pixels of the cover image are scanned sequentially. When the pixel values determined according to Eqs. 2 and 3 are encountered, the secret data bit value obtained in Step 5 is placed in the relevant pixel by using LSB method.

  7. Step 7.

    Return to Step 5 until all bits of the secret data are embedded into the cover image.

Figure 3 shows the flowchart of the proposed MPP approach for the data hiding phase. Yellow colored parts represent the different or newly added functions and processes of the new MPP approach with respect to the classical HNMH method.

Fig. 3
figure 3

Flow chart diagram of the proposed MPP approach for the data hiding phase

At the receiver side, the embedded data bit sequence is recovered from the stego image without any further information or prerequisite other than the embedded data extraction algorithm of the proposed MPP approach (Fig. 4). Hidden data extraction is performed according to Eq. 4 as follows:

$$b_i=\left\{\begin{array}{l}P\;is\;EVEN,\;p_t<P,\;0\;if\;p_t\equiv0\left(mod\;2\right)\\P\;is\;EVEN,\;p_t<P,\;{1\;if\;p}_t\equiv1\left(mod\;2\right)\\P\;is\;ODD,\;p_t>P,\;{0\;if\;p}_t\equiv0\left(mod\;2\right)\\P\;is\;ODD,\;p_t>P,\;{1\;if\;p}_t\equiv1\left(mod\;2\right)\end{array}\right.,$$
(4)

where pt is the pixel value encountered during covered image scanning step, bi is the ith element of the hidden data bit sequence, and P is the maximum brightness value (Vertex). The fundamental rules that form the proposed MPP approach and its procedures for data extraction are summarized step by step as follows:

  1. Step 1.

    The “P” value with the highest number of occurrence (Vertex) in the stego image histogram distribution is obtained.

  2. Step 2.

    The number of pixel pairs (n) used for data hiding is determined. If the maximum number of pixel pairs is to be used, this step is skipped.

  3. Step 3.

    Depending on both the “n” value and whether the “P” value is odd or even, the brightness values pointing out the pixels with hidden data are determined (Eq. 4).

  4. Step 4.

    The pixels of the stego image are processed sequentially. Based on Eq. 4, the embedded data bits are determined and extracted into the secret data bit sequence array.

  5. Step 5.

    Return to Step 4 until the NULL (000000000)2 embedded bit pattern on the stego image is reached finally.

  6. Step 6.

    The final array of secret data bits obtained in the extraction process is grouped into 9-bit blocks and ASCII coded characters are obtained. After all, the secret message is obtained by performing the necessary inverse conversion.

Figure 4 shows the flowchart of the proposed MPP approach for the hidden data extraction phase. The yellow colored parts represent the different or newly added functions and processes of the proposed MPP approach with respect to the classical HNMH method.

Fig. 4
figure 4

Flow chart diagram of the proposed MPP approach for the data extraction phase

2.3 Cover image segmentation usage together with the proposed MPP approach

When the HNMH method is used together with the proposed MPP, only the pixels with brightness values to the left or right of the P value are utilized for data hiding, i.e., not all of the cover image pixels. In other words, the pixels where data is to be embedded are generally located in a specific region of the cover image. That is data hiding can be performed in some parts of the cover image while a remaining large part cannot be utilized efficiently by using the proposed MPP approach. In order to enable the data hiding in an almost all homogeneous manner over the entire cover image and thus to increase the total data hiding capacity, the cover image is divided into small equal parts (partitioning) then the proposed MPP approach is applied separately by considering the histogram of each distinct part independently [16]. Thus, data hiding can be performed on pixels with various brightness values in different parts of the cover image. This also contributes positively to the improvement of the data privacy and security results.

The cover image segmentation algorithm employed to increase data hiding capacity of the proposed MPP approach is presented in Fig. 5. After the cover image is divided into small equal parts, the secret data is embedded in these parts based on the Raster Scan Order direction [17] as shown by the red arrows. Since the “P” value of the histogram of each distinct cover image segment is different, the secret data is embedded into different pixels of a certain brightness value in the corresponding cover image part. As a result, in addition to a significant increase in total data hiding capacity, a high diversity of data embedding pixels can be well achieved with respect to the standard image data hiding method.

Fig. 5
figure 5

Scan order direction for a sample 4 × 4 cover-image partitions

3 Experimental studies

MATLAB was used both to implement the proposed MPP approach together with the classical HNMH image data hiding method and to determine its effectiveness with detailed performance tests carried out on different cover images. At the experimental study phase, well-known 8-bit grey-scale 512 × 512 Baboon, Airplane, Barbara, Fruits, House, Lena, Peppers and Zelda test cover images were used (Fig. 6). Variable-length secret text messages were embedded by using the proposed MPP approach on the cover images just after the segmentation process if any.

Fig. 6
figure 6

Gray-scale cover images used in the experimental test phase

The performance evaluation study of the proposed MPP approach for the HNMH method is carried out based on data hiding capacity, embedding efficiency and PSNR metrics. As it is well-known in analysis of image data hiding methods, the comparison of PSNR results for the cover image and stego image provides important information about the visual quality assessment and reflects the trade-off with the achieved data hiding capacity. As the visual difference between a cover image and its stego image version decreases, the PSNR value increases and converges to infinity [18]. The evaluation of the ratio of changing cover image pixels’ value is called embedding efficiency, which is defined as the number of secret bits embedded per one embedding change. An increased embedding efficiency clearly implies less detectable traces in the stego image, resulting in better robustness against steganalysis techniques [3, 19].

Figure 7 shows the data hiding capacity and PSNR results for the test cover images, obtained by using the proposed MPP approach, which will be used as a reference in the following comparison and evaluation explanations. As it can be seen from the graphs, the proposed MPP approach increases the data hiding capacity 4.74 to 37.48 times. On the other hand, the PSNR results slightly decrease between 6.62 and 13.75 dB reflecting a reasonable trade-off but more degradation in the stego image quality. When the experimental results for all test cover images are considered together, it can be stated that the data hiding capacity increases 16.69 times on average compared to the classical HNMH method.

Fig. 7
figure 7

Data hiding capacity and PSNR results for the proposed MPP approach

Figure 8 shows the experimental results for the cover images that are first divided into 8 × 8 equal parts then each one employs the proposed MPP approach. Considering the data hiding capacity results for all of the test stego images together, 7.05% increased performance on average is achieved while the PSNR results reasonably decrease about 1.02 dB on average. When these results and the Fig. 7 are analyzed together, it is understood that the partitioning technique does not increase the data hiding capacity much, compared to the classical HNMH method relatively [14]. This is due to the fact that almost all of the pixels are used for data hiding in the proposed MPP approach when the “P” value of the cover image is too high or too low. However, when the cover image is partitioned, the value of “P” for each equal part is different, which leads to a relative decrease in the amount of data that can be hidden, since the value of the pixels that the secret data to be hidden will change in each part. On the other hand, as an effortless consequence, the change in the value of “P” for each cover image partition contributes significantly to the security of the embedded data.

Fig. 8
figure 8

Data hiding capacity and PSNR results for the proposed MPP approach with 8 × 8 cover image partitioning

The obtained experimental results for improved data hiding capacities are given in Table 1 for the proposed MPP approach and classical HNMH method with and without image partitioning. Table 2 also provides comparative results with respect to some of the current counterpart methods. It can be summarized that the data hiding capacity results of the proposed MPP approach are higher than those of the classical HNMH. However, partitioning the cover image into very small parts (especially for 64 and above) does not necessarily increase the data hiding capacity of the MPP approach linearly. As a result, it is possible to use the partitioning process for the purpose of increasing data hiding capacity, but it only works up to a certain extend effectively with the proposed MPP approach, totally depending on the cover image distinctly. Besides, it is observed that the data hiding capacity performance of the proposed MPP approach deployed together with the cover image partitioning process may be worsen for some test cover images (e.g., Baboon). That is simply because the “P” values of these kind of cover images are not close to the extreme points. Moreover, while the total data hiding capacity is expected to increase by dividing the cover image into small equal parts, this process may lead to a degradation in the stego image quality especially after 8 × 8 segmentation.

Table 1 Experimental results for the proposed MPP approach and classical HNMH method
Table 2 Maximum data hiding capacity assessment results with respect to PSNR for the proposed MPP approach and its counterparts

Considering the embedding efficiency metric given in Eq. 5, which should be maximum, to reflect the cover image degradation and to highlight the stego image quality [3, 19], the overall average of obtained results for the proposed MPP method is 4.38 and clearly better than that of the classical HNMH (Table 1). On the other hand, increasing the number of partitions in the cover image up to 8×8, obviously extremely high data embedding capacities (Table 2) are achievable with a reasonable embedding efficiency trade-off.

$$\text{Embedding Efficiency}=\frac1{\text{Ratio of Modified Pixels}}$$
(5)

Considering the fact that steganography and cryptography methods jointly have well proven extremely effective in enabling secure connectivity, the proposed MPP approach can be accompanied with emerging solutions such as EGCrypto [22] in order to increase its deployment in real practical networking environments.

4 Conclusion

Increasing or maximizing the data hiding capacity has been one of the most challenging goals in contemporary image steganography research as well as preventing confidential information from falling into the hands of third parties. With regard to this difficult task, the MPP approach is proposed to improve the data hiding capacity of the classical HNMH method known about its high performance in the literature.

In the classical HNMH method and similar ones in the literature, only the pixels with two values to the right or left of the “P” value in the cover image histogram are used for data embedding. This obviously results in inefficient utilization of the cover image potential, and hence the data hiding capacity is insufficient or low for many applications. In the development stages of the proposed MPP approach, this crucial drawback has been taken into account such that pixels with all values to the right or left of the “P” value in the cover image histogram can be used for data embedding. Thus, the cover image can be utilized much more efficiently and the data hiding capacity increases considerably.

Experimental study results of the proposed MPP approach on different test cover images show that the data hiding capacity can be improved up to 37.48 times with well-trading of the PSNR results while maintaining the embedding efficiency. It is also concluded that an 8×8 cover image segmentation can provide about 7.05% additional increase in data hiding capacity for the proposed MPP approach.