A novel reversible data hiding based on adaptive block‐partition and payload‐allocation method

Funding information National Natural Science Foundation of China, Grant/Award Numbers: 61502007, 61572452; China Postdoctoral Science Foundation, Grant/Award Number: 2015M582015; University Natural Science Research Project of Anhui Province, Grant/Award Number: 1608085MF125; Doctoral Scientific Research Foundation of Anhui University, Grant/Award Number: J01001319 Abstract A reversible data hiding method based on partition is researched because it can effectively reduce shifting distortion in given embedding capacity. However, traditional partition is to divide an image into equal-sized blocks, which cannot be divided reasonably according to the content of the image. In order to achieve dynamic partition and effectively utilize the complexity of the image, this paper proposes a novel reversible data hiding based on adaptive block-partition and payload-allocation method. In this technique, instead of equal partition, adaptive block-partition is proposed to establish multiple histograms by dividing the cover image into several image blocks of different sizes dynamically, and the image blocks of different sizes are processed successively through multiple sorting and implement adaptive payload allocation according to complexity, then the data is embedded into two sides of prediction-error histograms to effectively reduce the shifting distortion. Experimental results show that the proposed method is superior to the state-of-the-art traditional fixed-sized blocking-based reversible data hiding methods.

less compression of the content of the cover medium, such as the least significant bit (LSB) and embed secret information in the space saved. Fridrich et al. [3] proposed to decompose the gray-image into binary bit plane, and then select the bit plane with the largest redundancy for compression, using the saved space embed information to achieve reversible embedding and extraction of image. However, in this approach the embedding capacity depends mainly on the lossless compression capacity, and the embedding capacity is insufficient. Then Tian [11] proposed a DE technique that divides an image into N pixel pairs and hides 1 bit of data with each legitimate pixel pair. Its embedding capacity can reach 0.5 bpp, but the uncompressed location map is 0.5 bpp, so that it is necessary to reduce the location map to improve the embedding capacity. Therefore, Hu et al. [16] proposed to improve the location map to greatly improve the embedding capacity. Affected by the DE [11], the prediction errors (PE) [17,18] is proposed to achieve better performance. This extended method is called PEE, which is the current research hotspot and the most powerful technique of RDH. The method uses the pixel prediction mechanism and the spatial redundancy of natural images, such as median edge detection [19], gradient adjusted prediction [20], interpolation prediction [21], rhombus prediction [22] and least square prediction (LS) [23] etc., to effectively implement RDH based on pixel prediction. In addition to DE, HS is also a far-reaching method. Ni et al. [24] first proposed an HS algorithm that generates a histogram based on the gray value of the image and hides the data reversibly by modifying the histogram. Then, Fallahpour et al. [25] proposed that by taking advantage of the spatial characteristics of medical images block, finding the maximum and minimum frequency of pixel intensity histogram for histogram shifting in image. Lee et al. [26] proposed to integrate HS into the PEH. Subsequently, most existing HS based RDH schemes build a single histogram, to take advantages of the correlation among image contents of different texture characteristics, Wang et al. [14,27] proposed the idea of multiple histograms to achieve better performance.
Recently, a high fidelity RDH method based on pixel value ordering (PVO) is widely studied [28][29][30][31]. PVO is a new prediction strategy based on partition. Cover image is divided into several image blocks, and then PVO and PEE are combined to implement information embedding. In 2013, Li et al. [28] first proposed the idea based on PVO, in Li's method, the image is divided into several non-overlapping image blocks equally, and then the pixel values of each image block is sorted in ascending order. When the PE is '1' and -1' embed the data and the PE is '0' is ignored. However, using only the maximum and minimum values as data bit carriers may lead to embedding capacity deficiency, in order to improve embedding capacity, Peng et al. [29] proposed an improved PVO(IPVO), which use the PE value of '0'. In [30], Ou et al. [30] proposed to extend the PVO method to PVO-K, where K is the number of pixels equal to the maximum/minimum values. Then in order to improve the embedding performance, Wang et al. [31] proposed to partition some smooth image blocks into four blocks according to the complexity of the image. Later on, the methods based on PVO have improved in many aspects [32][33][34][35], such as Weng et al. [32] proposed a flexible block-partition and adaptive pixel-modification strategy, more data bits can be embedded into smooth blocks by dividing smooth blocks into smaller sub-blocks. He et al. [36] proposed an optimized PVO-based pairwise PEE and combine with 2D PEH, design the high and low power version of PVO-based pairwise PEE. In [37], Weng et al. [37] proposed an improved PVO scheme based on K-pass, which calculated the PE by studying the position relationship between the largest and second largest pixels (or the smallest and second smallest pixels) to provide a large number of embeddable pixels. And Wu et al. [38] proposed to consider the PEs for the largest and smallest pixel values of each block are jointed as a pair, and then modify the PE pairs based on 2D histogram modification strategy. However, even if the block method is improved, this fixed and equal image partition still cannot efficient use of the smooth region of the image, especially for satisfying the embedding capacity, complex image blocks have to be subdivided, which will lead to a reduction in embedding performance. So in order to partition the image dynamically, we propose an adaptive block-partition method based on complexity.
In this paper, we propose a novel reversible data hiding based on adaptive block-partition and payload-allocation method. Firstly, we propose an adaptive block-partition method by dividing the image into several image blocks with different sizes to utilize the pixel correlation well and establish multiple histograms, thus effectively reduce shifting distortion. Secondly, we use the linear combination of multiple pixel values by integrating the rhombus prediction [22] and LS [23] method for effectively improving the prediction accuracy and having the ability of sorting. Thirdly, we propose an adaptive payload allocation by reasonably allocating the information of each image block according to the complexity to embed more information in the smooth region. Lastly, we propose a new embedding method by embedding on two sides of PEH to effectively reduce shifting distortion. Here, the main contribution of this paper are as follows: (1) Propose an adaptive partitioning method to effectively utilize the correlation between pixels; (2) Propose an adaptive payload allocation method, which embeds information based on image size and complexity instead of equally embedding; (3) Propose a new embedding strategy of two sides embedding to reduce the shifting distortion. Compared with the traditional fixed-sized blocking-based RDH methods, the proposed method can achieve better embedding performance, and its embedding capacity is higher than the traditional fixed-sized blocking-based RDH methods we compared.
The rest of the paper is mainly composed of the following parts: in the Section 2, the method we proposed is introduced in detail; Section 3 is the experiments and results, which gives the experimental results of the proposed method and the comparative analysis with other methods; the last part is the conclusion which will be shown in the Section 4.

2PROPOSED METHOD
Traditional RDH mainly generate single histogram, but it will cause more embedding distortion. So some researchers propose the method of multiple histograms [14,27] to minimize the length of the PE sequence such as partitioning, which can take advantage of the correlation between image content of different texture features, and then the smooth image block can be preferentially selected for information embedding. For optimizing partitioning performance, we propose an adaptive partitioning method to divide the image into multiple image blocks of different sizes. Then, we assign different sizes of payload to different blocks instead of equally embedding, and we propose an embedding method that can effectively reduce shifting distortion. The framework of the method we proposed is shown in Figure 1.

An adaptive block-partition method based on complexity
In order to improve embedding efficiency, some scholars propose the idea of image partition to minimize the length of the PE sequence while satisfying the embedding capacity. The traditional fixed-sized blocking-based RDH methods divide the cover image into equal-sized blocks, in order to improve the embedding capacity, a second partition is performed for some smooth blocks. However, this method only divides the image equally and does not divide the image reasonably according to the content of the image, so it cannot reflect the texture of the image reasonably. Actually, texture complexity of the image block directly affects the accuracy of the prediction, and the size of the block directly affects the embedding capacity of the information and the visual quality of the marked image. Therefore, in order to distinguish the texture of the image well and to partition the image dynamically, an adaptive block-partition method based on complexity is proposed. The partitioning method we proposed can take full advantage of the complexity to distinguish between smooth and complexity blocks. We know that the pixel values in the smooth region are similar, vice versa, and if a block is smoother than the other blocks, it will has sharper PEH, thus led to less distortion, so we choose to embed more information in the smooth region to keep the high PSNR value.
In the proposed partition method, we use the ideas of the quadtree. Quadtree is a data structure with up to four subtrees per node. We use the idea to design an adaptive block-partition method based on complexity, which can divide the image into several non-overlapping image blocks of different sizes. Next, we describe the details.
Let R (0) 0 of the size M × N represent the cover image, we find its maximum and minimum pixel values before partitioning, denoted as Rmax i, j , Rmin i, j respectively, the complexity C calculated by Equation (1) is expressed as the difference between the maximum and minimum pixel values: After obtaining the complexity C , compared it with the adaptive threshold T , T ∈ [0, 1] to determine whether to divide again, since the image R (0) 0 is 8 bits gray-image, the threshold T will be multiplied by 255, R (n) x where n represents the n-th partition, and x, x ∈ {0, 1, 2, 3} represents the x-th image block: x is small, which means the image block is smooth, then we will not divide it any more. Otherwise, divide it into four blocks R , and then calculate its complexity one by one in the same way until we can no longer divide. By the way, threshold T plays a crucial role in the partitioning effect, we will introduce how to choose the optimal T through adaptive method in Section 2.4.
Previously, we introduce the method based on complexity partitioning, now give an example to explain how to divide the block. As shown in Figure 2, randomly select an 8 × 8 image block from "Lena", denoted by R (0) 0 , assuming that T is 0.2, partition it according to the above method.
There are several steps for partitioning: 3 ) = 50, we find that only R (1) 1 needs to be subdivided from the Equation (2); 1 , R 2 , R 3 and the complexity of four image blocks is C (R (2) 3 ) = 19 respectively, the complexity is less than 51, so there is no need to subdivide, the method based on complexity partition is completed. Partitioning results as shown in Figure 3.

Quad-layered prediction
In this section, we use Quad-layered prediction pattern to make prediction block by block. As show in Figure 4, divide the cover image into four sets [39]: the "Circle" set, the "Triangle" set, the "Square" set, and the "Star" set. Different from other predictions, this prediction incorporates the idea of rhombus prediction [22] and LS [23], using more pixels to make prediction, so the prediction will be more accurate.
Before data embedding, all pixels of the cover image are divided into four sets, therefore, this is a Quad-layered prediction embedding scheme, while each layer covers a type of set. In the first layer, use the surrounding eight pixels from the other three sets to predict the "Circle" set pixel, and then embed the message into PE of the "Circle" set. In the second layer, the modified "Circle" pixels and other surrounding pixel sets will be used to predict the "Triangle" set. After that, the same method will be used to predict and embed the third and fourth layers. Due to the operations in the Quad-layered embedding are basically the same, so we will introduce the prediction on the first layer (the "Circle" set) in detail.
As shown in Figure 4, the "Circle" set pixel b i, j in the cover image are collected as b = (b 1 ; b 2 ; … ; b N s ) from left to right and from top to bottom, where N s represents the total number of pixels in the "Circle" set of the image block, and the image block is to remove a row (column) on each side based on the cover image block. In order to pursue a sharper PEH, a content pixel predictor is estimated by optimizing the following problem: The matrix X and the vector b are as follows: In Equation (3), the reason why the L1-norm is used is that the goal of this paper is to optimize the coefficients A, and the L1-norm is more robust to some outliers. Another advantage of L1-norm is that when vector b is embedded with message and modified to b ′ , the coefficient changes slightly after L1-norm optimization, which is conducive to reducing the transmission of auxiliary information A = (A 1 , A 2 , … , A 8 ). When the prediction coefficients A = (A 1 , A 2 , … , A 8 ) is calculated according to Equation (3), and the prediction pixelb i, j is estimated by a weighted sum of eight pixels in the neighbour- Next, the prediction error e i, j of the current "Circle" set pixel b i, j is expressed as: Simultaneously, the predicted values of all the pixels b = (b 1 ; b 2 ; … ; b N s ) of the "Circle" set in the image block are also obtained by combining the coefficient A = (A 1 , A 2 , … , A 8 ) with the surrounding eight pixels. And note that A = (A 1 , A 2 , … , A 8 ) remains unchanged in a set.
Generally, Equation (3) is used to make little change to the modification vector b for the optimized coefficient A = (A 1 , A 2 , … , A 8 ), using the modified vector b ′ after embedding, Equation (3) is used again to obtain the modified coefficient If we limit the precision of the coefficients to d decimal places. Then, the coefficient residuals vector r can be expressed as: After getting the coefficient residuals vector, a variable length coding scheme is used to record the coefficient residuals vector. Here, the maximum absolute value of the coefficient residuals r will be checked. If the maximum absolute value of the coefficient residuals is greater than 2 t , no message will be embedded. Specifically, t is a predefine bit length.
For each coefficient residual r i , if the r i equals zero, we use one bit "0" to encode, otherwise we use t + 2 bits to encode, where t + 2 bits includes a bits "1", a symbol flag to record the symbol of r i , and t bits to record the absolute value of r i . Finally, the encoded bitstream will be embedded as part of the payload. Where the decimal place parameter d and bit length parameter t are set with d = 2 and t = 3.
Then, the prediction error e i, j is obtained by this method. When the "Circle" set is embedded, the "Triangle" set, the "Square" set, and the "Star" set will continue to be processed in the same way.
To illustrate the performance of the Quad-layered prediction, we compare prediction error histogram in "Lena" and "Barbara" images by using quad-layered prediction, rhombus prediction [22] and LS prediction [23]. The results are shown in Figure 5. It can be observed that the quad-layered prediction displays a better performance than the rhombus prediction [22] and the LS prediction [23].

Inter-block sorting and intra-block sorting
Previously, we have partitioned the image according to its complexity, next, the image blocks will be sorted in this section. Sorting is widely applied in RDH, it is proved that this technique can effectively reduce shifting distortion when given an embedding capacity, especially in low embedding capacity. We hope that by sorting, information can be embedded into the smooth region first, and only need to modify some pixels to satisfy the given embedding capacity. Therefore, we introduce inter-block sorting and intra-block sorting.
For inter-block sorting, calculate the complexity of each image block firstly, and then the image blocks of the same size will be processed one by one and sorted in an ascending order. The complexity computed [40] representation of this block is  Figure 6, which is calculated as the sum of the vertical and the horizontal absolute difference of each two adjacent pixels in the context. Since we do not modify the edge pixels in the prediction and embedding process, therefore, the complexity of image block remains unchanged after data embedding, which ensures the reversibility.
For intra-block sorting, the sorted image blocks are processed sequentially. As shown in Figure 4, we use the method proposed by Sachnev et al. [22] to calculate the local variance i, j : where We arrange the local variances i, j in ascending order when the local variance is obtained. Due to the decoding scheme is inverse of the encoding scheme, the value of local variance i, j remains unchanged after data embedding, the reversibility is guaranteed.

Adaptive payload allocation
In general, an image often has different textures, to improve the embedding performance, we assign different sizes of payload to different blocks based on the complexity of the image instead of equally embedding, so how to allocate different sizes of payloads to different blocks is the key problem. After adaptive partitioning, three types of image blocks are obtained, namely 64 × 64, 32 × 32, 16 × 16, the number of the corresponding blocks is represented as num64, num32 and num16 respectively, the reason for this partition will be explained in the experiment. Assume the total embedding capacity is EC, according to the Equation (10), the embedding capacity of each type of image block is obtained, where E c64 , E c32 , E c16 is expressed as the embedding capacity of size 64 × 64, 32 × 32, and 16 × 16 respectively.
In the Equation (11), the coefficients x, y and z represent the embedding proportion of image blocks in different sizes. From the Equations (10) and (11), we can see that P 64 : P 32 : P 16 = (16x × num64) : (4y × num32) : (z × num16), that is, the embedding capacity ratio of each image block in different sizes is 16x : 4y : z. For embed more information in the smooth regions while satisfying the embedding capacity, set the ranges of x, y, z to x, y, z ∈ {10, 9, 8, 7, 6, 5, 4, 3, 2, 1}, and we are adhering to the idea of embedding more information in smooth regions, that is x > y > z. However, for different images, image blocks of different sizes will be allocated different embedding capacities, so the optimal x, y, z allocation parameters need to be adaptively determined based on the experimental PSNR.
However, the complexity of image blocks with the same size are still different, especially for a large number of image blocks. Therefore, in order to embed more information in the smooth region, we will further allocate capacity for each sorted image block before embedding. First, divide the capacity E c64 , E c32 , E c16 of each type of image block into two parts: cap1 and cap2. We know that after inter-block sorting, image blocks will be sorted in ascending order of complexity, so we define the first M image blocks as smoother blocks and allocate cap1 embedding capacity, similarly, the rest of the image blocks are complex blocks and we allocate cap2 embedding capacity, and then allocate capacity E i dim , dim ∈ {64, 32, 16} for each image block, i represents the i-th image blocks.
According to Equation (13), the value of M is determined by the number of image blocks of each type. In order to achieve the best embedding performance, the final coefficients x, y, z, M must be determined by exhaustive search.
As mentioned in Section 2.1, since the image content is different, the threshold T is different, the result of partitioning is different, and the embedding distortion is different. Therefore, to further improve performance, an adaptive method to choose the optimal T by minimizing the embedding distortion is proposed, as shown in Equation (14).
Where ED i dim , dim ∈ {64, 32, 16} are the corresponding embedding distortion, i represents the i-th image blocks. According to Equation (14), the number of each type of image block greatly affects the embedding result. Therefore, we adopt the adaptive method to find the optimal block-partition method and obtain the most appropriate T by minimizing the embedding distortion.

Embedding algorithm
In order to pursue a higher PSNR value, the traditional RDH method based on fixed-size blocks usually leads to a low embedding capacity. It can be found that most of the current methods, such as PEH, PEE or PVO, mainly embed the information in a certain scanning order, without considering the texture information of the image. In fact, the previous methods often embed data into the middle of the PEH, which lead to more shifting distortion in low embedding capacity. Therefore, different from the other RDH methods which embed the data into the middle PEH firstly, we consider embedding on two sides of the PEH because it can effectively reduce shifting distortion, resulting better embedding effect and higher PSNR value in low embedding capacity. This embedding method mainly satisfies two conditions: (1) the bin capacity must satisfy allocated embedding capacity; (2) the bin selected must be in the two sides of PEH. For the i-th image block, assuming that the embedding capacity is E i dim , dim ∈ {64, 32, 16}, specific embedding steps are as follows: 1) Firstly, the PEH can be easily generated by enumerating the number of PEs that is obtained by the Equation (7). Then express the number of PE =' f ' as hist( f ) which is the height of bin ' f '; 2) Select the most lateral bin with the smallest absolute value as the initial bin, such that Equation (15); 3) If the two sides bin cannot reach the E i dim , we continue to expand to the inside bin to reach it. In order to expand the embedding capacity, we carry out the L round, select the last bins T P based on the embedding capacity, T P ∈ {0, 1, 2, … , T m }, if f does not appear, we will set it to hist ( f ) = 0; 4) To get the modified prediction error e ′ i, j , we embed the information according to Equation (17), in which PEs belonging to e i, j > f (or e i, j < − f ) are shifted to right (left) by a shifting distance s, then data are embedded into the bin ± f with keeping other bins unchanged.
Where s is the shifting distances, e ′ i, j is the modified PEs, and w is the message bit(w = {0, 1}).
For better understand the embedding process, an example is given in Figure 7. Assume that 170 bits pseudo-random sequence are hidden as secret message, and the "0" and "1" have the same probability that is 1∕2. We can see from Figure 7(a), the PEH is generated according to Equation (7); then the initial bins T m = 6 and last bins T P = 5 are obtained based on the given embedding capacity. As shown in Figure 7(b), PE s = ±7 are vacant, according to Equation (17) PE s = ±6 these two bins are used to embed information in Figure 7(b). When the embedding capacity does not meet the preset capacity, we continue to expand inwards. In order to guarantee reversibility, we will move the outer bins to create vacant bin as shown in Figure 7(c). And then, the other data are embedding according to the Equation (17) again as shown in Figure 7(c). Finally, the modified PEH is obtained, as shown in Figure 7(d). From the Figure 7, the PEH is modified two rounds that is L = 2. Actually, the capacity E i dim is proportional to the number of rounds L.
In order to solve the overflow/underflow problem, a location map will be used to deal with pixels that may overflow/underflow, we use "0" to label the value of 0∕255 of the original pixel, and when the modified pixel value is 0∕255, we label it with "1". Then the location map is compressed using the JBIG2 method [41], the compressed location map is denoted as LM and the size of the compressed location map is denoted as L LM . For achieving reversible recovery, the same result of partition needs to be obtained, so the results after adaptive partition will be reserved as an index and recorded it as B to embedded into the first 64 × 64 image block, and record the location of the image block as the LSB's replacement in the first row of the cover image. Simultaneously, the embedding capacity E i dim , the coefficients x, y, z, M , precision d , t will be replaced as auxiliary information in the first row of the cover image. In addition, the parameter L, r will be used as auxiliary information, therefore, the compressed auxiliary information will replace the LSB of the first row (column) of each image block without first two pixels, the number of LSB planes is instead of the LSB of the first two pixels which have been embedded into image, if there is more auxiliary information, select two or more LSB planes to embed more information [42], and the original LSBs will be embedded as part of the payload.

Extraction and recovery processing
After receiving the marked image, data extraction is the reverse process of data embedding. Because the recovery process of the "Star" set, the "Square" set, the "Triangle" set, and the "Circle" set are basically the same, we will take the "Circle" set as an example, and then specific extraction and recovery steps are as follows: 1) Read the number of LSB planes from the first two pixels, and then read the first row pixel's LSB planes to get index B, the size L LM of the compressed location map, the compressed location map LM, the parameter L, r, and the embedding capacity E i dim . According to the obtained information, partitioning the image to obtain the same block result as the cover image.
2) Since the edge pixels are not modified, so the block complexity has not changed. After receiving the block complexity in an ascending order, we decode it block by block.
According to Equation (3) obtain the optimal pixel predictor coefficients , and combine with the coded residual bit stream r, recover the original optimal pixel predictor coefficients A = (A 1 , A 2 , … , A 8 ). Then obtain the predicted pixel valueb i, j of the marked image, the modified prediction error e ′ i, j is: Then calculate the local variance i, j by Equation (9), the sorted prediction error e ′ i, j is obtained.
3) Suppose l is the number of modifications changes from 0 to L − 1, the modified prediction error goes H from T P to T m , decreasing by one each time. At this time, the prediction error e i, j is: . (20) For the modified prediction errors e ′ i, j that less than −T m or larger than T m , the prediction error e i, j is represented by Equation (21): 4) The cover image is recovered to: 5) Finally, replace the LSB of the first row (column) pixels by extracted original LSBs, so that the cover image is completely recovered.

EXPERIMENTS AND RESULTS
This section presents experiments and results of the proposed method. The experiments are tested in Windows 7 by Matlab 2016 and with Intel(R) Core(TM) i5 1.70 GHz 4.0 GB RAM. Eight 512 × 512 gray-images, "Lena", "Baboon", "Air-plane", "Barbara", "Boat", "Elaine", "Lake", and "Peppers" are selected as test images are shown in Figure 8. The performance of the proposed method will be demonstrated in the following aspects: (1) In order to explain the effect of threshold T on partition effect, we use different T to introduce partitioning result intuitively; (2) In order to verify the best performance of the adaptive block-partition, we select image blocks of different sizes for comparison; (3) In order to evaluate the proposed method more objectively, we will compare with Weng

Image partitioning results in different thresholds T
In Section 2, we mentioned that Threshold T plays a crucial role in the partitioning effect, so what does threshold T mean.
To show the effect of T , taking "Lena" as an example, four different thresholds T are selected to obtain different partitioning results, as shown in the Figure 9, which can intuitively see the influence of different threshold T .
It can be observed from Figure 9 that different T values lead to different partitioning results. In general, the threshold T is inversely proportional to the number of image blocks after partitioning, the smaller the value of T , the smaller the complexity of the image block is required, that is the value of C (R (n) x ) is small, the more image blocks will be obtained after partitioning, such as Figure 9(a). Similarly, with the increases of T , the number of image blocks after partitioning becomes relatively small, as shown in the Figure 9(d).
Previously, we mentioned that the threshold T range is T ∈ [0, 1], we make a selection of T for each image to ensure that the image block size of each image is within these three types of 64 × 64, 32 × 32 and 16 × 16. Then embed the information of each image in an adaptive way, and select the corresponding threshold according to the final embedding distortion. The change range of T of the eight cover images is shown in Figure 10.

Experimental results for different block sizes
In the proposed partitioning method, image blocks are divided into three different size categories: 64 × 64, 32 × 32, 16 × 16. The reason why the minimum block is set to 16 × 16 is that we have to maintain high visual quality and large enough capacity of embedding. If the image block is set too small, too many border pixels cannot be computed in the image block and the required auxiliary information is too large to meet these two requirements, at the same time, if the size is too large, the smooth block cannot be distinguished correctly, with the relative balance of the two requirements, we chose the To illustrate the advantages of adaptive block-partition, six different partitioning methods are listed, namely 16 × 16, 32 × 32, 64 × 64, 32 × 32 and 16 × 16, 64 × 64 and 32 × 32, and the partition method we proposed. Most of the partition methods compared are equal partition, which are relatively fixed, so it is not flexible to use the texture features of the image. As shown in Figure 11, adaptive blocking is significantly better than the other partitioning methods. Since we use an adaptive method based on complexity partitioning, this method can get FIGURE 10 Threshold T changes in different images different numbers of image blocks according to different T , and then given an embedding capacity, we can allocate the embedding capacity reasonably for the image block at each size, and then get the optimal visual quality.

Performance comparison
Next, according to the phenomenon in Figure 12, this paper will analyse why the eight methods of PVO have poor performance compared with the proposed method, for the following reasons: Firstly, generally the embedding methods based PVO embed at most 2 bits data in each block, even though some scholars are improving, there are still a large number of embeddable pixels that are not fully utilized in the smoother block; Secondly, in order to pursue a relatively high embedding capacity, the PVO methods have to not only divide image into

FIGURE 11
Performance comparison for different block sizes small blocks, but also employ rough blocks for data embedding. However, larger block sizes for higher prediction accuracy, so when the block size is smaller, its prediction accuracy will be greatly reduced. Thirdly, a series of PVO partitioning methods are actually the traditional fixed-sized blocking-based RDH methods. This method does not divide the image reasonably according to the content of the image, and cannot reflect the texture of the image reasonably. It cannot exploit the correlation well between the adjacent pixel values of the image, especially in high embedding capacity. Lastly, most PVO methods embed information on PE = ±1, 0, for some more complex image blocks, it will lead to more shifting distortion. The proposed method is better than a series of PVO methods for the following reasons: Firstly, we propose an adaptive block-partition method based on complexity, which can fully consider the characteristics of the image, and divide the image into blocks of different sizes according to the principle of minimum distortion. Secondly, the predictor we use is a linear combination of multiple pixels, which can predict more accurately. Thirdly, besides the effective predictor, the superiority is mainly dependent on the strategy of embedding, we propose an embedding method based on two sides bin of embedding, which has less shifting distortion and greatly improves the visual quality, at the same time, by embedding capacity allocation, the capacity of each image block can be allocated more reasonably, and fully utilize the advantages of the partitioned image block is one of the reasons for maintaining high PSNR.
To further demonstrate the superiority of the proposed method, the average performance of different methods in the same embedding capacity will be compared as shown in Figure 13, and give several tables with the same embedding capacity, such as Tables 1-3. As shown in Figure 12, the embedding capacity starts from 5000 bits, in order to quantify experimental results, three different embedding capacities were selected, namely 5000, 10,000 and 20,000bits, and show the corresponding average PSNR in the table. From the table, it can be seen that the average PSNR of the proposed method is better than that of other methods regardless of the embedding capacity. From Tables 1 and 2, when the EC is 5000 and 10,000 bits respectively, the average PSNR of the proposed method is 64.52, 60.72 dB. In particular, for "Baboon", we can see clearly from Table 3 that when EC is 20,000 bits, the eight methods of PVO cannot reach this embedding capacity, but the method we proposed can achieve. The reason is that the texture of  "Baboon" is complex, it cannot exploit the advantages of pixel correlation well. In addition, due to the smooth image block is not enough, it's necessary to use appropriate number of rough blocks to embed data, which will lead to inaccurate prediction. As can be seen from Table 3, the average PSNR of the proposed method is written as 57.33/56.41 dB, where the result on the left is counting "Baboon", and the result on the right is excluding "Baboon". In order to show the influence of auxiliary information on the embedding capacity more intuitively, this paper investigate the auxiliary information of different embedding capacities. As shown in Table 4, we enumerate the auxiliary information capacity of eight test images. It can be seen from the Table 4 that the auxiliary information of the proposed method will not increase as the embedding capacity increases, which shows that the proposed method can achieve better embedding performance as the embedding capacity increases. This is because when the embedding capacity increases, although the value of coefficient residual r increases, but the index B and the number of embedding rounds L decrease again due to the adaptive partitioning scheme. Generally, in order to increase the embedding capacity, large-size image blocks will be added, so the number of image blocks will be reduced. When the embedding capacity increases and the number of image blocks decreases, the number of embedding rounds L and image block index B will decrease, and as the embedding capacity increases, the value of the residual coefficient r will increase. Therefore, regardless of the capacity of the embedded information, the capacity of the auxiliary information does not fluctuate greatly.

CONCLUSION
In this paper, a novel reversible data hiding based on adaptive block-partition and payload-allocation method is proposed. In contrast with the traditional fixed-sized blocking-based RDH methods, an adaptive block-partition based on complexity is taken into account. In addition, by designing a new embedding method which embedding on two sides of PEH and an adaptive payload allocation method, the proposed method can effectively reduce shifting distortion. Compare with series PVO methods, the method we proposed can achieve a high PSNR in the same   embedding capacity, and the embedding capacity is higher than other methods. In the future, using inter-channel correlations of colour image to design RDH methods based on partition is the goal of our work.