## Figures

## Abstract

Pixel Value Ordering (PVO) holds an impressive property for high fidelity Reversible Data Hiding (RDH). In this paper, we introduce a dual PVO (dPVO) for Prediction Error Expansion (PEE), and thereby develop a new RDH scheme to offer a better rate-distortion performance. Particularly, we propose to embed in two phases: *forward* and *backward*. In the *forward* phase, PVO with classic PEE is applied to every non-overlapping image block of size 1 × 3. In the *backward* phase, *minimum-set* and *maximum-set* of pixels are determined from the pixels predicted in the forward phase. The *minimum* set only contains the lowest predicted pixels and the *maximum* set contains the largest predicted pixels of each image block. Proposed dPVO with PEE is then applied to both sets, so that the pixel values of *minimum* set are increased and that of the *maximum* set are decreased by a unit value. Thereby, the pixels predicted in the *forward* embedding can partially be restored to their original values resulting in both a better embedded image quality and a higher embedding rate. Experimental results have recorded a promising rate-distortion performance of our scheme with a significant improvement of embedded image quality at higher embedding rates compared to the popular and state-of-the-art PVO-based RDH schemes.

**Citation: **Abdul Wahed M, Nyeem H (2022) Reversible data hiding with dual pixel-value-ordering and minimum prediction error expansion. PLoS ONE 17(8):
e0271507.
https://doi.org/10.1371/journal.pone.0271507

**Editor: **Zahid Mehmood,
University of Engineering and Technology Taxila Pakistan, PAKISTAN

**Received: **June 30, 2021; **Accepted: **July 2, 2022; **Published: ** August 16, 2022

**Copyright: ** © 2022 Abdul Wahed, Nyeem. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

**Data Availability: **All relevant data are within the paper and its Supporting Information. Standard test images are available from the USC-SIPI database (http://sipi.usc.edu/database/). All the other illustrations are made available on the figshare: https://doi.org/10.6084/m9.figshare.19152617.v2.

**Funding: **The author(s) received no specific funding for this work.

**Competing interests: ** The authors have declared that no competing interests exist.

## Introduction

Reversible Data Hiding (RDH) is an evolving covert communication technology [1]. It can imperceptibly embed *data* in a given *cover* media to output an *embedded* media, and losslessly retrieve both the embedded data and cover image later on demand basis [2]. An RDH application framework aims at achieving different security properties like authentication and/or integrity verification of the multimedia information [3]. Those properties can be readily attained by using standard cryptographic techniques. However, such direct application of cryptographic techniques obliterates the semantic understanding of the media due to the (temporary) loss of the spatial information. An RDH scheme helps avoid this obliteration problem as such it can borrow the security properties of the cryptographic techniques by embedding a ‘secret’ data imperceptibly. Here, a pre processing of the data requires to employ a suitable cryptographic technique for a data hiding application, which is beyond the scope of this paper. Additionally, we also restrict our attention in this paper to the digital image application of an RDH scheme, which may principally be extended to different digital media (*e.g*., image, video, audio or speech).

Development of an RDH scheme is generally steered by a higher embedding capacity with the invertible and minimum possible distortion [4]. For example, the pioneering difference expansion (DE) based RDH scheme [5] with invertible distortion was immediately improved for higher capacity with generalized expansion [6], reduced location map [7, 8], sorting and prediction [9, 10], and adaptive embedding [11, 12]. On the other hand, for minimizing distortion, the histogram shifting (HS) based scheme [13] was improved using the difference-histogram [14–16] and multiple histograms [17, 18]. Other potential developments include the RDH schemes with prediction error expansion (PEE) [19–39], vector quantization [40, 41], interpolation [42–44], encryption [45, 46], and transform techniques [47, 48].

Among the varieties of RDH principle, PEE is much investigated for its efficient rate distortion performance [49, 50]. It can better utilize the combined principles of DE and HS to expand prediction errors for data hiding. Unlike the use of pixel-histogram in basic HS, it deals with the prediction errors to obtain a much sharper histogram with a set of higher peak beans resulting in higher embedding capacity. Additionally, unlike the direct change of pixels in basic DE, it expands the prediction errors to offer minimum possible changes in the pixels resulting in higher quality embedded images. Further developments of the PEE based schemes can also be tracked with the context modification [20, 21, 51], prediction error classification [22–24], adaptive image block size [25, 26], two-dimensional histogram modification [28], pair-wise PEE [27, 35] and pixel value ordering [19, 29–34, 36–38, 52–54].

Pixel value ordering (PVO) has been a prominent solution to minimize the prediction errors in PEE. Although the pixel value selection, grouping and sorting principles for prediction were utilized in [9, 19], the principle of PVO was well established by Li *et al*. [29]. That scheme predicted the maximum-minimum pixel pairs to embed with lower distortion. Peng *et al*. [30] improved the PVO with a new histogram-modification principle. Ou *et al*. [31] extended the basic PVO to PVO-*k* for adaptive embedding in the blocks according to the numbers of maximum- and minimum-valued pixels. Unlike the block-wise prediction in the original PVO, Qu *et al*. [32] then extended it to be a pixel-wise for a larger capacity and better image fidelity. Wang *et al*. [33] introduced a dynamic partitioning to construct image blocks for PVO according to the blocks’ complexity to improve the embedding capacity. Other recent developments include multiple histograms modification [55], pair-wise PEE [34, 56] and multi-pass adaptive PVO [38, 53, 54].

The PVO based RDH schemes mentioned above demonstrated a better rate-distortion performance for lower embedding capacity requirement. However, their rate-distortion performances sharply decrease with higher embedding rate. Their maximum embedding capacity limits are also lower and they mostly rely on the complex and recursive embedding conditions. Thus, an additional embedding level with counter balancing of the distortion caused by the expansion of prediction errors have been introduced in [52]. In this paper, we further investigate the counter balancing approach with substantial statistical analysis in developing dual PVO (dPVO) embedding for both the better image quality and higher embedding rate is introduced.

The main contribution of the proposed dPVO scheme is summarized as follows.

- Unlike the existing PVO based schemes, the dPVO is developed to embed in two phases: (
*i*) forward embedding, and (*ii*) backward embedding with minimal pixel grouping. While the forward embedding applies PEE with PVO to every non-overlapping image block of size 1 × 3, the backward embedding partitions the previously predicted pixels into*minimum-set*and*maximum-set*for embedding using our new embedding technique called dual PVO (dPVO) with pairwise PEE. - The proposed
*backward*embedding with dPVO and PEE is designed to counterbalance the distortion caused in the*forward*embedding phase. In other words, The pixels predicted in the first phase thus can be partially restored to their original values. As a result, unlike the conventional PEE based RDH schemes (where embedding capacity costs image quality), embedding capacity or rate is increased (*i.e*., 11.98% on average) in the backward embedding at a better embedded image quality (*i.e*., 2.16% on average) (see Table 1 in Section**Experimental results and analysis**). - The experimental results also demonstrate a significantly better image fidelity at the higher embedding rate (
*i.e*., above 10,000 bits), while it can also maintains competitive embedding rate distortion performance at the lower embedding capacity (*i.e*., up to 10,000 bits) over the popular and state-of-the-art PVO-based RDH schemes [19, 29, 30, 32–34, 36, 38] (see Section**Experimental results and analysis**).

The remainder of this paper is structured as follows. Related RDH schemes are briefly reviewed in Section **Related PVO-based RDH schemes**. Our new RDH scheme is presented with required computational details in Section **A new PVO-based RDH scheme**. Rate distortion performance of our scheme for different benchmark image-sets is evaluated, analyzed and validated in Section **Experimental results and analysis**. Conclusions are given in Section **Conclusions**.

## Related PVO based RDH schemes

We now briefly introduce the basic principle of PVO [29] and its successive development to the Jung’s minimum block PVO based RDH scheme [36]. In what follows, we present a generalized framework of PVO based embedding that is conventionally used to define the principle of PVO and its improvements in existing schemes [19, 29, 30, 32–34, 36, 38].

A PVO based embedding generally starts with partitioning a cover image *I* of size *M* × *N* into a set of non-overlapping image blocks, *i.e*., *I* = [*X*_{k}]. With each image block containing *n* pixels, *i.e*., *X* = (*x*_{1}, *x*_{2}, ⋯*x*_{n}), total number of image blocks is . For each image block *X*, its pixels, (*x*_{1}, *x*_{2}, ⋯*x*_{n}) are now sorted in ascending order using a sorting function *σ*(⋅) to output (*x*_{σ(1)}, *x*_{σ(2)}, ⋯*x*_{σ(n)}). The function, *σ*: {1, 2, ⋯*n*}→{1, 2, ⋯*n*} is a unique one-to-one mapping such that *x*_{σ(1)} ≤ *x*_{σ(2)} ≤ ⋯ ≤ *x*_{σ(n)} with *σ*(*i*)<*σ*(*j*) if *x*_{σ(i)} = *x*_{σ(j)} and *i* < *j*. Once the image block pixels are sorted, they are used for prediction with a suitable PEE based embedding of *data* leading to the development of different PVO-based schemes as follows. Without loss of generality, we illustrate different PEE based embedding conditions below for a data bit, *b* ∈ {0, 1}.

### Li et al.’s PVO based RDH scheme

Li *et al*. [29] proposed to use the second maximum block pixel, *i.e*., *x*_{σ(n−1)} to predict the maximum *x*_{σ(n)}. The prediction error, *e* is computed using Eq (1). PEE based embedding is then carried out with the histogram of *e*. Only bin 1 with *e* = 1 is used for embedding of a data-bit, *b*, and other bins are expanded with the condition of higher values of *e* in Eq (2a). With the modified error, , the maximum block-pixel is updated accordingly as in Eq (2c).
(1)
(2a)
(2b)
(2c)

This process of PEE embedding repeats for all the blocks (until the last data-bit is embedded assuming the embedding capacity requirement is attained) to output an embedded image, . It is apparent that this embedding does not change the pixel value order after embedding to ensure perfect data extraction and lossless recovery.

Embedded data are extracted with the inverse embedding conditions. Specifically, with the embedded image, , image blocks are obtained. For each block, , the prediction errors are re-generated using Eq (3a). The extracted data-bits and the original pixels are obtained using the reverse PEE conditions in Eq (3). (3a) (3b) (3c) (3d)

With the maximum possible change to a pixel value by 1, the embedded image quality also remains high. With the consideration of minimum block-pixels, this basic PVO based embedding is further improved in [30, 36].

### Jung’s minimum PVO-based RDH scheme

Jung [36] recently proposed a minimal case of the PVO based RDH scheme to embed 2 bits in an image block of size 1 × 3. Particularly, an image *I* is partitioned into a set of image blocks containing three pixels as such *I* = [*X*_{k}] with . This means that, with the general PVO framework presented at the beginning of this section, Jung’s scheme operates on each image block *X* with the number of block pixels, *n* = 3. Thus the sorting function, *σ*(⋅) is used to sort the block pixels (*x*_{1}, *x*_{2}, *x*_{3}) to be (*x*_{σ(1)}, *x*_{σ(2)}, *x*_{σ(3)}), where *x*_{σ(3)} and *x*_{σ(1)} are the maximum and minimum block pixels, respectively. A pair of prediction errors, *e*_{max} and *e*_{min} for each image block is calculated from the middle block pixel, *x*_{σ(2)} according to the Eqs (4a) and (4b). These errors are expanded with the embedding of a data bit, *b* or shifting by the value 1 with Eqs (4c) and (4d). The maximum and minimum block pixels are then predicted from the middle block pixel and the expanded errors with Eqs (4e) and (4f), respectively.
(4a)
(4b)
(4c)
(4d)
(4e)
(4f)

The data extraction and original block pixels’ recovery follow the inverse PEE embedding principle of the Jung’s scheme in Eq (5) like other PVO based RDH schemes. With the recovery of the maximum and minimum block pixels of all expanded pixels, the original image is recovered. At the same time, the data bits are extracted from each embedded image blocks and concatenated to get the original data. (5a) (5b) (5c) (5d)

With a single reference pixel in an image block, Jung’s scheme predicts the maximum and minimum block pixels as such in every three pixels of an image, two bits of data can be embedded. Thus, the embedding capacity is improved with a reasonably good embedded image quality. However, the overall embedding rate distortion performance at lower embedding rate is still much lower than the advanced PVO based RDH schemes [32, 34, 38]. In this paper, more effective use of the Jung’s PVO is investigated and thus the development of a higher capacity RDH scheme with a competitive visual quality of an embedded image is presented in the section below.

## A new PVO based RDH scheme

In this section, we introduce a new RDH scheme with *dual pixel value ordering* (dPVO) and PEE. A PVO based embedding has evolved to utilize image correlations for a better possible rate distortion performance, as mentioned in Sec. **Introduction**. With classic PVO, pixel values in an image block are kept unchanged or expanded (either for embedding or shifting) centering the reference pixel(s). This principle of embedding has been better utilized with the adaptive size of image block or multilevel embedding in the recent schemes for a better rate-distortion performance. However, expanded pixels have not been considered yet for reverse expansion to restore them to their respective original pixel values partially. In this paper, we attempt to utilize this reverse expansion property in the ‘backward embedding’ with a minimum PVO scenario of the Jung’s scheme [36]. Thereby, we show that such reverse expansion of the expanded pixels can further improve the rate-distortion performance.

Our RDH scheme constitutes two phases of embedding; namely, (*i*) forward embedding with PVO and PEE, and (*ii*) backward embedding with dPVO and pairwise PEE. These two phases of embedding are expected to improve both the visual quality of the embedded image and the embedding rate. Extraction of our scheme, on the other hand, follows the inverse processing of those two phases of embedding. A high level conceptual model of these phases of embedding is presented in Fig 1. The input image is first pre-processed modifying the boundary pixels with intensity values of 255 or 0 to tackle any overflow/ underflow situation. A location map is generated to keep track of the boundary pixels, which is compressed and appended with the data-bits.

The pre-processed image undergoes forward embedding yielding sorted embedding blocks. In the backward phase, block-wise pixel grouping is done for obtaining a minimum group and a maximum group of embedded pixels. A location map is generated for tracking the skipped pixels and its compressed version is appended with data. The minimum and maximum groups obtained then undergo pair-wise PEE. Finally, merging and de-sorting yields the final embedded image. Additionally, the auxiliary information required for extracting the compressed location map is embedded in the first LSBs of the border pixels. The original LSBs are recorded in a binary sequence and appended with data. For data extraction and image recovery, an exact reverse process is followed. Rest of this section explains the embedding and extraction processes with more computational details followed by a working example of the proposed scheme.

### Forward embedding

As mentioned above, for forward embedding with PEE, we employ the Jung’s PVO based scheme that starts with partitioning an input image, *I* into a set of non overlapping image blocks of size 1 × 3. This is discussed in Sec. **Jung’s minimum PVO-based RDH scheme**. Each block pixels (*x*_{1}, *x*_{2}, *x*_{3}) are sorted to obtain (*x*_{σ(1)}, *x*_{σ(2)}, *x*_{σ(3)}), where *x*_{σ(1)} and *x*_{σ(3)} are the minimum and maximum block pixels, respectively. With the computation and expansion of the pair of prediction errors, *e*_{min} and *e*_{max} using Eqs (4a) to (4d), either a data bit, *b* is embedded or error value is shifted by 1. The minimum and maximum block pixels are then predicted from the middle block pixel and the expanded errors with Eqs (4e) and (4f).

We note that the overflow and underflow problem is usually tackled with the conventional process of recording a location map *M*_{k} for the *k*-th image block (for example, see Ref. [37, 38]). The map is initialized as an empty-set for each *k* th image block, and for each pixel of the block, we append either a ‘1’ for a boundary pixel or ‘0’ for any other pixel to *M*_{k}, Continuing this for all *k*, a complete location map *M*_{ou} = {*M*_{k}} is obtained, losslessly compressed using arithmetic coding and appended to the embedding data bits. With an input image of bit depth 8-bit, for example, a boundary pixel, *x* in an image block is then updated using Eq (6).
(6)

Given the input image, *I* and a set of data bits, *D*_{f}, with this forward embedding, we thus obtain the embedded image, . For simplicity, we omit the notational difference between the original input image and its pre processed version with modified boundary pixels.

### Backward embedding

This embedding operates on and aims to restore the changes (*i.e*., expansion) made in the forward embedding. It is obvious that the maximum and minimum pixels of an image block, *i.e*. *x*_{σ(1)} and *x*_{σ(3)}, can experience a maximum expansion of value 1 either for embedding of a data bit ‘1’ or for shifting the pixel by the value 1. Thus, all the predicted pixels that experience this expansion are considered for minimum and maximum groups, and , respectively. Additionally, we locate the predicted pixels that remain unchanged in the first phase of embedding by recording their location map in *LM*. Computing of and is presented in Algorithm 1.

Particularly, our proposed dPVO first separates two sets of pixels expanded in the forward embedding. With a classic PVO on an image block of size 1 × 3, the lowest and highest pixels remain in the same order after their left and right ward expansion. So, the lowest and highest predicted pixels of all image blocks can be separated into two sets as such applying a pairwise PVO based backward embedding on these two sets can restore their original pixel values. For example, in the forward embedding, an embedded image, is obtained with the Jung’s scheme. In the backward embedding with dPVO, a set is computed with the lowest predicted pixels, {*x*_{σ(1)}} of all the blocks . Similarly, another set captures the largest predicted pixels, {*x*_{σ(3)}} of all the blocks . All pairs of pixel values in each of these two sets, and then follow a pairwise PVO based PEE for embedding.

**Algorithm 1** *dPVO* ⋅ *encode*(⋅)

**Require**:

**Ensure**: , , *LM*

1:

2:

3: *LM* ← *zeros*(2, *k*)

4:

5: **for** all *k* = 1 to **do**

6:

7: **if** **then**

8:

9: **else**

10: *LM*(1, *k*) ← 1

11: **end if**

12: **if** **then**

13:

14: **else**

15: *LM*(2, *k*) ← 1

16: **end if**

17: **end for**

18: **return** , , *LM*

Once and are obtained, we pairwise expand pixels of each set in the backward embedding. In other words, both and are individually pairwise partitioned, sorted and used for embedding. For example, a pixel pair with sorting becomes . These partitioning and sorting also apply to , and thus, for each pixel pair , . We then predict from for using Eqs (7a)–(7c), and predict from for using Eqs (8a)–(8c). This prediction will increase the value of by 0 or 1. Since all the pixel values in have already decreased in the forward embedding by the value of 0 or 1, the backward embedding thus can partially restore the effect of the forward embedding resulting in lower distortion in the embedded image. Contrariwise, for applying the backward embedding to the pixel-pairs in , the lower pixel value is predicted from . Thereby, we compute the set of expanded pixels, for and for to generate the expanded minimum and maximum groups, and , respectively. The final embedded image, is obtained by updating with and . (7a) (7b) (7c) (8a) (8b) (8c)

### Data extraction and image recovery

Data extraction and image recovery are inverse of embedding of our proposed RDH scheme. This means, data is first extracted with the inverse of backward embedding followed by the inverse of forward embedding. The input image to the decoder is partitioned into a non overlapping image block of size 1 × 3, and each block’s pixels are sorted in either ascending or descending order. From the reserved pixels, the location map, *LM* is extracted. From the sorted pixels of each block and using *LM*, the sets of maximum and minimum expanded pixels, and , respectively are determined using Algorithm 2.

**Algorithm 2** *dPVO* ⋅ *decode*(⋅)

**Require**:

**Ensure**: ,

1:

2:

3:

4:

5: **for** all *k* = 1 to **do**

6:

7: **if** **then**

8:

9: **end if**

10: **if** **then**

11:

12: **end if**

13: **end for**

14: **return** ,

Extraction of the embedded data bits, and recovery of and from and , respectively are carried out using Eqs (9) and (10). We start with computing the errors from each pixel pair in and using Eqs (9a) and (9b), respectively. Embedded bits are extracted using the error values and conditions in Eq (9c). The higher pixel, of each pixel pair in are restored to using Eq (10a). Similarly, is restored from using Eq (10b). Thereby, we can restore and from and , respectively to finally compute from . (9a) (9b) (9c) (10a) (10b)

The original image is finally restored with the inverse of our first phase embedding, which follows the extraction principle of Jung’s scheme (see Sec. Jung’s minimum PVO-based RDH scheme). This extraction phase starts with partitioning into non overlapping image blocks. For each block, its pixels are then sorted to . Respective errors, and are computed using Eq (11) followed by the data bit extraction and pixel recovery using Eqs (5b) to (5d). Upon the extraction of all data bits, they are marged to the data bits extracted in the earlier phase. Similarly, the original image *I* is obtained by updating with the restored values of and of each image block.
(11a)
(11b)

### An working example

We now illustrate the step by step processing of the proposed dPVO scheme with an simple example. The embedding and decoding processes for both the *forward* and *backward* phases are presented in Figs 2 and 4, respectively. Thereby we demonstrate the restoration potential of the *backward* embedding in Fig 3.

The example in Fig 2 operates on a tiny input image consisting a set of (1 × 3)-sized blocks that we call *input blocks* in the figure, which transforms to the *sorted blocks* after block wise sorting using *σ*(⋅). For instance, in Fig 2, the first *input block*, {161, 160, 162} becomes {160, 161, 162} as the *sorted block*, which is then processed for the expansion (*i.e*., *embedding* or *unit value shifting*) in both the *forward* and *backward* embedding. In *forward* phase, for the sorted bolck {160, 161, 162}, we get the prediction errors, *e*_{min} = -1 and *e*_{max} = 1 using Eqs (4a) and (4b). Based on the values of *e*_{min} and *e*_{max}, the expanded versions of the prediction errors, and are obtained either embedding a data-bit, b or by unit shifting of the error-values using Eqs (4c) and (4d). Let us consider a data as an example “11101…..” to be embedded. Using Eqs (4c) and (4d), we get = -2 and = 2 (embedding the first two bits of the data, “11”). Thus the sorted block after forward embedding is obtained as {159, 161, 163}. Similarly, the second block *input block*, {159, 161, 166}, after sorting and forward embedding becomes {158, 160, 161}, embedding two data-bits “10” as shown in the figure. Unlike the first and second block, no data is embedded in the third *input block*, [201, 205, 242]. Rather unit expansion as per Eqs (4c) and (4d) is done due to the values of *e*_{min} and *e*_{max} being “-4” and “37”, respectively. Thus corresponding the embedded block becomes {200, 205, 243}. Similarly, embedding one bit data in the maximum pixel and shifting the minimum pixel by unity, the forth *input block*, {242, 243, 199} becomes {198, 242, 244}.

The backward embedding operates on the forwarded embedded blocks with an aim to restoring the changes in forward phase. According to algorithm 1, from the forward embedded blocks, the minimum and maximum set of pixels, and are obtained based on the expanded prediction errors and , respectively. We get the minimum set = {159, 158, 200, 198} and = {163, −, 243, 244}. Now, and are pairwise partitioned, sorted and finally used for embedding. For example, the first sorted pair of the minimum pixels set, [, ] = {158, 159} and corresponding = 1, thus one bit of data will be embedded and will be 2 (as the data-bit is ‘1’), and finally will be 160 after embedding. In the similar fashion, all the pairs in the minimum and maximum sets are considered, sorted and after checking the value of corresponding or , new value of or are calculated and embedded minimum and maximum sets, and are determined. Finally, de-sorting the pixels block-wise, the final embedded image is obtained.

The ability of the backward embedding for restoring the changes occurred in the forward phase is demonstrated in Fig 3. In this example, it is clearly seen from Fig 3(a), *i.e*., *I*- that seven pixel values have been changed in the forward phase. From Fig 3(b), *i.e*., in *I*- the restored pixels are marked as blue and green cells. Our backward embedding could restore three pixels out of seven forward embedded pixels, which will surely increase the image quality with slightly higher embedding capacity.

The decoding process of the proposed scheme is illustrated in Fig 4 with the same tiny image block. The decoding process is exactly reverse to encoding. So, it starts with sorting the three pixels in each block. Using the sorted embedded blocks and the location map, the expanded minimum and maximum sets, and are determined. Then we find or from each consecutive pair of and . The value of or indicates whether any data-bit is embedded or not as per Eq (9c). The value of is calculated from using Eq (10a) and is obtained from, using Eq (10b). Thus from the sorted minimum embedded pixels group, {160, 158, 201, 198}, we obtain the forward embedded column {159, 158, 200, 198}. Similarly, from the sorted embedded maximum pixel group, {162, 161, 243, 244}, the forward embedded column {163, 161, 243, 244} is obtained. Combining these columns we obtain the backward recovered blocks which is identical to the forward embedded blocks. These recovered blocks are then utilized to determine the value of *e*_{min} and *e*_{max}, which in turn helps restore the original sorted blocks using Eqs (5b) to (5d) and to extract the embedded data-bits using Eq (5a). Finally a de-sorting process yields the original input image.

## Experimental results and analysis

In this section, we present the performance of our RDH scheme for its analysis and validation. We used the popular test images of size 512 × 512 × 8 from the USC SIPI [57] for this performance evaluation. All the other illustrations (figures and plots) are also available on Figshare [58]. We determine both the embedding capacity and embedding rate in terms of total embedded bits and bit per pixels (bpp), respectively. For embedding, a set of pseudo random bits is generated as *data*. Implementations are carried out using MATLAB R2016b with a 1.3 GHz Intel Core i5 CPU, 4 GB memory.

We have evaluated the embedded image quality in terms of a popular objective visual quality metric, peak signal to noise ratio (PSNR) defined in Eq (12). Here, *M* × *N* is the image size, and *I*(*i*, *j*) and *I*′(*i*, *j*) are the pixel values of position (*i*, *j*) in an original image and its embedded version, respectively. *L* is the dynamic range of the pixel values.
(12a)
(12b)

It is evident form Table 1, with the basic PVO, *i.e*., for forward embedding, an average PSNR of 50.90 dB is obtained. With the application of backward embedding, the embedded image is slightly restored to mitigate the distortion occurred in the forward phase. Consequently, the overall average PSNR is obtained as 52 dB with a significant improvement of 2.16%. Moreover, the backward embedding makes more room for data, thus the overall embedding capacity is increased as depicted from Table 1. The inclusion of backward embedding offers 11.98% increment in the embedding capacity in average for the test images.

The merit of backward embedding in improving the image quality and embedding capacity is further demonstrated graphically in Fig 5 for the test images. The improvement in PSNR and capacity is depicted with the inclusion of the backward phase in the embedding process. Example of embedded images and their decoded versions are illustrated in Fig 6. The decoded image, by definition of our decoding principle, should be identical to the input image, which is verified for all the test images and can be roughly observed with the given examples.

Overall embedding rate distortion performance of our scheme is evaluated and presented in Table 1. Average PSNR (dB) value of 50.90 with embedding capacity of 32.33 kbit is obtained for the test images. Table 2 represents a statistical count of pixels undergoing different operations in forward and backward phases, like shifting, expansion, embedding or remaining unchanged. From Table 2, it is observed that only 46% pixels in the forward embedded image remain unchanged in average with reference to the input image in terms of pixel intensity value. Backward embedding ensures 88% pixels unchanged in average with respect to the forward embedded image, while the rest 12% pixels are backward shifted or embedded with data-bits. This backward phase yields the restoration of a significant amount of pixels providing overall 58% pixels unchanged in average with respect to the input image. Therefore, the inclusion of backward embedding significantly helps to improve the image quality.

We compare the performance of our scheme with a number of popular and recent RDH schemes: He *et al*. (2021) [54], Kumar & Jung (2020) [53], He *et al*. (2018) [38], Jung (2017) [36], Ou *et al*. (2016) [34], Wang *et al*. (2015) [33], Qu & Kim (2015) [32], Peng *et al*. (2014) [30], Li *et al*. (2013) [29] and Sachnev *et al*. (2009) [19]. Embedded image quality for embedding 10 kbit and 20 kbit of data in the test images is evaluated and compared with the relevant PVO and PEE based RDH schemes in Tables 3 and 4, respectively. Generally, in contrast to all those schemes, in both cases of embedding 10 kbit and 20 kbit data, PSNR values of ours remain higher. A better average value of PSNR for our scheme is always obtained than that of the Jung’s scheme, which our scheme is directly built on. For example, an average PSNR value of our scheme remains about 7% higher than the Jung’s scheme in case of 10 kbit of embedding for USC SIPI image sets as shown in Table 3. Similarly, for embedding 20 kbit of data in different test images, this improvement in the average rate distortion performance is also evident in Table 4.

The percentage improvement in image quality offered by our scheme for embedding both 10 kbit and 20 kbit data is also graphically compared with other schemes in Fig 7. For example, for 10 kbit data embedding, our scheme offers 4.3%, 1.6%, 0.8%, 0.3%, 0.3%, 0.7%, 7%, 0.3%, 2.8% and -0.9% higher PSNR value than Sachnev *et al*. [19], Li *et al*. [29], Peng *et al*. [30], Qu & Kim [32], Wang *et al*. [33], Ou *et al*. [34], Jung [36], He *et al*. [38], Kumar & Jung (2020) [53] and He *et al*. (2021) [54], respectively. With a similar trend, 4.5%, 2.5%, 1.9%, 1.1%, 1.2%, 1.7%, 6.7%, 1.2%, 2.2% and 1.2% better PSNR is obtained with our scheme for embedding 20 kbit data compared to the schemes in [19, 29, 30, 32–34, 36, 38], Kumar & Jung (2020) [53] and He *et al*. (2021) [54], respectively. It is observed that in most of the cases, improvement rate for embedding 20 kbit data is higher than that for embedding 10 kbit. This means, ours scheme has a tendency to improve image quality for a higher embedding rate.

Additionally, to visualize the trend of the overall performance of our scheme, embedding rate distortion curve is compared with a few recent and popular RDH schemes [19, 30, 32–34, 36, 38, 53, 54] in Fig 8. We observe that our scheme has a trend to improve embedded image quality over the higher embedding rate. This is because a higher rate of embedding requires a higher number of pixels to be embedded. Once the number of pixels becomes higher, the sizes of *X*_{min} and *X*_{max} in the second phase of embedding tend to be higher resulting in more restored pixels and better embedded image quality. The average performance in Fig 8 also evidences the trend of improvement. We note that this trend of improvements in the rate distortion performance of our RDH scheme discussed and illustrated above for a few test images also holds for the other test images we experimented with.

On the location map, despite embedding in two phases, the proposed scheme requires two location maps of total size of a single plane like a PEE based scheme. For example, the location map size for forward embedding in an image of size 512 × 512 is bits to mark any image block of size 1 × 3 containing the boundary pixel(s). Besides, in the backward embedding, pair based-PEE is used requiring a location map of size bits. Thus, the total location map size is 512 × 512 bits, which is an implicit requirement of a typical PEE based RDH scheme as also seen in the schemes considered for the performance comparison. We also note that having the similar requirements of the location map, it holds similar effects on the embedding capacity of the concerned RDH schemes including the proposed one.

In summary, considering the overall rate-distortion performance, our proposed RDH scheme outperforms its baseline schemes: Jung (2017) [36], Peng *et al*. (2014) [30] and Li *et al*. (2013) [29]. Our scheme is based on the classic PVO and uses a simple scenario of image partitions of size 1 × 3, and thus we reasonably considered those schemes for baseline comparison. Moreover, a promising performance of our scheme is also observed, while we compared it to the other popular state-of-the-art PVO based RDH schemes [19, 32–34, 38, 53, 54].

## Conclusions

In this paper, we introduced a new RDH scheme with dPVO based backward embedding. With two phase embedding, our RDH scheme first applies classic PVO based PEE on each non overlapping image block of size 1 × 3. The second phase embedding with dPVO based backward embedding is designed to partially restore the pixels predicted with expansion or embedding in the first phase. Our substantial experimental results demonstrated a promising performance of our proposed scheme and its improvement over the popular and state-of-the-art PVO-based RDH schemes. Particularly, our scheme demonstrated significantly better rate distortion performance at the higher embedding rate compared to the state-of-the-art PVO-based RDH schemes.

Better embedded image quality at higher embedding rates means to have more potential for the applications that usually require high embedding capacity like electronic patient record hiding in medical images. In addition to the study of its specific application scenarios, future investigation on the proposed dPVO based principle of backward embedding may be worthwhile, for example, in the following areas: (*i*) its information theocratic analysis, (*ii*) optimization of its computational requirements for multi level embedding, and (*iii*) developing its generalized framework for multi level embedding and dynamic image block partitioning.

## References

- 1. Shi YQ, Li X, Zhang X, Wu HT, Ma B. Reversible data hiding: advances in the past two decades. IEEE Access. 2016;4:3210–3237.
- 2. Nyeem H, Boles W, Boyd C. Digital image watermarking: its formal model, fundamental properties and possible attacks. EURASIP Journal on Advances in Signal Processing. 2014;2014(135).
- 3.
Cox IJ, Kilian J, Leighton T, Shamoon T. Secure spread spectrum watermarking for images, audio and video. In: Proc. IEEE ICIP’96. vol. 3. IEEE; 1996. p. 243–246.
- 4.
Nyeem H, Boles W, Boyd C. Watermarking Capacity Control for Dynamic Payload Embedding. In: Recent Advances in Information and Communication Technology 2015. Springer; 2015. p. 143–152.
- 5. Tian J. Reversible data embedding using a difference expansion. IEEE Transactions on Circuits and Systems for Video Technology. 2003;13:890–896.
- 6. Alattar AM. Reversible watermark using the difference expansion of a generalized integer transform. IEEE Trans Image Processing. 2004;13:1147–1156. pmid:15326856
- 7. Kim HJ, Sachnev V, Shi YQ, Nam J, Choo HG. A novel difference expansion transform for reversible data embedding. IEEE Transactions on Information Forensics and Security. 2008;3:456–465.
- 8. Hu Y, Lee HK, Li J. DE-based reversible data hiding with improved overflow location map. IEEE Transactions on Circuits and Systems for Video Technology. 2009;19:250–260.
- 9. Kamstra L, Heijmans HJ. Reversible data embedding into images using wavelet techniques and sorting. IEEE Trans Image Processing. 2005;14:2082–2090. pmid:16370461
- 10. Thodi DM, Rodríguez J. Expansion embedding techniques for reversible watermarking. IEEE Transactions on Image Processing. 2007;16:721–730. pmid:17357732
- 11. Hu Y, Lee HK, Chen K, Li J. Difference expansion based reversible data hiding using two embedding directions. IEEE Transactions on Multimedia. 2008;10(8):1500–1512.
- 12. Lee CC, Wu HC, Tsai CS, Chu YP. Adaptive lossless steganographic scheme with centralized difference expansion. Pattern Recognition. 2008;41(6):2097–2106.
- 13. Ni Z, Shi YQ, Ansari N, Su W. Reversible data hiding. IEEE Trans CSVT. 2006;16:354–362.
- 14. Lin CC, Tai WL, Chang CC. Multilevel reversible data hiding based on histogram modification of difference images. Pattern Recognition. 2008;41:3582–3591.
- 15. Tai WL, Yeh CM, Chang CC. Reversible data hiding based on histogram modification of pixel differences. IEEE Transactions on Circuits and Systems for Video technology. 2009;19(6):906–910.
- 16. Kim KS, Lee MJ, Lee HY, Lee HK. Reversible data hiding exploiting spatial correlation between sub-sampled images. Pattern Recognition. 2009;42:3083–3096.
- 17. Li X, Zhang W, Gui X, Yang B. Efficient reversible data hiding based on multiple histograms modification. IEEE Transactions on Information Forensics and Security. 2015;10(9):2016–2027.
- 18. Wang J, Ni J, Zhang X, Shi YQ. Rate and distortion optimization for reversible data hiding using multiple histogram shifting. IEEE Transactions on Cybernetics. 2017;47(2):315–326. pmid:26829812
- 19. Sachnev V, Kim HJ, Nam J, Suresh S, Shi YQ. Reversible watermarking algorithm using sorting and prediction. IEEE Transactions on Circuits and Systems for Video Technology. 2009;19(7):989–999.
- 20. Coltuc D. Improved embedding for prediction-based reversible watermarking. IEEE Transactions on Information Forensics and Security. 2011;6(3):873–882.
- 21. Dragoi IC, Coltuc D. Local-prediction-based difference expansion reversible watermarking. IEEE Transactions on image processing. 2014;23(4):1779–1790. pmid:24808346
- 22. Coatrieux G, Pan W, Cuppens-Boulahia N, Cuppens F, Roux C. Reversible watermarking based on invariant image classification and dynamic histogram shifting. IEEE Transactions on Iinformation Forensics and Security. 2013;8(1):111–120.
- 23. Li X, Yang B, Zeng T. Efficient reversible watermarking based on adaptive prediction-error expansion and pixel selection. IEEE Transactions on Image Processing. 2011;20:3524–3533. pmid:21550888
- 24. Hong W. Adaptive reversible data hiding method based on error energy control and histogram shifting. Optics Communications. 2012;285(2):101–108.
- 25. Wang X, Li X, Yang B, Guo Z. Efficient generalized integer transform for reversible watermarking. IEEE Signal Processing Letters. 2010;17(6):567–570.
- 26. Leung HY, Cheng LM, Liu F, Fu Q. Adaptive reversible data hiding based on block median preservation and modification of prediction errors. Journal of Systems and Software. 2013;86(8):2204–2219.
- 27. Ou B, Li X, Zhao Y, Ni R, Shi YQ. Pairwise prediction-error expansion for efficient reversible data hiding. IEEE Transactions on Image Processing. 2013;22(12):5010–5021. pmid:24043388
- 28. Li X, Zhang W, Gui X, Yang B. A novel reversible data hiding scheme based on two-dimensional difference-histogram modification. IEEE Transactions on Information Forensics and Security. 2013;8(7):1091–1100.
- 29. Li X, Li J, Li B, Yang B. High-fidelity reversible data hiding scheme based on pixel-value-ordering and prediction-error expansion. Signal Processing. 2013;93(1):198–205.
- 30. Peng F, Li X, Yang B. Improved PVO-based reversible data hiding. Digital Signal Processing. 2014;25:255–265.
- 31. Ou B, Li X, Zhao Y, Ni R. Reversible data hiding using invariant pixel-value-ordering and prediction-error expansion. Signal Processing: Image Communication. 2014;29(7):760–772.
- 32. Qu X, Kim HJ. Pixel-based pixel value ordering predictor for high-fidelity reversible data hiding. Signal Processing. 2015;111:249–260.
- 33. Wang X, Ding J, Pei Q. A novel reversible image data hiding scheme based on pixel value ordering and dynamic pixel block partition. Information Sciences. 2015;310:16–35.
- 34. Ou B, Li X, Wang J. High-fidelity reversible data hiding based on pixel-value-ordering and pairwise prediction-error expansion. Journal of Visual Communication and Image Representation. 2016;39:12–23.
- 35. Dragoi IC, Coltuc D. Adaptive pairing reversible watermarking. IEEE Transactions on Image Processing. 2016;25(5):2420–2422. pmid:27046899
- 36. Jung KH. A high-capacity reversible data hiding scheme based on sorting and prediction in digital images. Multimedia Tools and Applications. 2017;76(11):13127–13137.
- 37. He W, Zhou K, Cai J, Wang L, Xiong G. Reversible data hiding using multi-pass pixel value ordering and prediction-error expansion. Journal of Visual Communication and Image Representation. 2017;49:351–360.
- 38. He W, Xiong G, Weng S, Cai Z, Wang Y. Reversible data hiding using multi-pass pixel-value-ordering and pairwise prediction-error expansion. Information Sciences. 2018;.
- 39. Hasib SA, Nyeem H. Pixel Grouping of Digital Images for Reversible Data Hiding. Acta Cybernetica. 2020;24(4):663–678.
- 40. Chang CC, Tai WL, Lin CC. A reversible data hiding scheme based on side match vector quantization. IEEE Transactions on Circuits and Systems for Video Technology. 2006;16(10):1301–1308.
- 41. Qin C, Chang CC, Chiu YP. A novel joint data-hiding and compression scheme based on SMVQ and image inpainting. IEEE transactions on image processing. 2014;23(3):969–978.
- 42. Yang CN, Hsu SC, Kim C. Improving stego image quality in image interpolation based data hiding. Computer Standards & Interfaces. 2017;50:209–215.
- 43. Wahed MA, Nyeem H. Reversible data hiding with interpolation and adaptive embedding. Multimedia Tools and Applications. 2018; p. 1–25.
- 44. Wahed MA, Nyeem H. High capacity reversible data hiding with interpolation and adaptive embedding. PloS one. 2019;14(3):e0212093. pmid:30840659
- 45. Zhang W, Ma K, Yu N. Reversibility improved data hiding in encrypted images. Signal Processing. 2014;94:118–127.
- 46. Cao X, Du L, Wei X, Meng D, Guo X. High capacity reversible data hiding in encrypted images by patch-level sparse representation. IEEE Transactions on Cybernetics. 2016;46(5):1132–1143. pmid:25955861
- 47. Ma B, Shi YQ. A reversible data hiding scheme based on code division multiplexing. IEEE Transactions on Information Forensics and Security. 2016;11(9):1914–1927.
- 48. Muhammad N, Bibi N, Mahmood Z, Akram T, Naqvi SR. Reversible integer wavelet transform for blind image hiding method. PloS one. 2017;12(5):e0176979. pmid:28498855
- 49. Kaur G, Singh S, Rani R, Kumar R. A comprehensive study of reversible data hiding (RDH) schemes based on pixel value ordering (PVO). Archives of Computational Methods in Engineering. 2021;28(5):3517–3568.
- 50.
Nyeem H, Boles W, Boyd C. Utilizing least significant bit-planes of RONI pixels for medical image watermarking. In: Proc. DICTA’13. IEEE; 2013. p. 1–8.
- 51. Tseng HW, Hsieh CP. Prediction-based reversible data hiding. Information Sciences. 2009;179(14):2460–2469.
- 52.
Nyeem H, Hasib SA. Can the Expansion of Prediction Errors be Counterbalanced in Reversible Data Hiding? In: Proceedings of International Joint Conference on Computational Intelligence. Springer; 2020. p. 97–109.
- 53. Kumar R, Jung KH. Enhanced pairwise IPVO-based reversible data hiding scheme using rhombus context. Information Sciences. 2020;536:101–119.
- 54. He W, Cai Z, Wang Y. High-Fidelity Reversible Image Watermarking Based on Effective Prediction Error-Pairs Modification. IEEE Transactions on Multimedia. 2021;23:52–63.
- 55. Ou B, Li X, Wang J. Improved PVO-based reversible data hiding: A new implementation based on multiple histograms modification. Journal of Visual Communication and Image Representation. 2016;38:328–339.
- 56. Aziz F, Ahmad T, Malik AH, Uddin MI, Ahmad S, Sharaf M. Reversible data hiding techniques with high message embedding capacity in images. PLoS One. 2020;15(5):e0231602. pmid:32469877
- 57.
USC-SIPI. Image Database; [Online; last accessed 23-Jan-2022]. http://sipi.usc.edu/database/.
- 58.
Nyeem H, Wahed MA. Illustrations (figures and plots) for a new reversible data hiding with dual pixel-value-ordering and minimum prediction error expansion; 2022.