In this section, we analyze each part of proposed framework in detail, and reliable techniques are introduced to achieve better performance. Furthermore, relationships between different parts and other perspectives are provided for better generalization.
3.2. Content Prediction
With a binary-map, the elements marked as “0” are used to predict those marked as “1”. The elements to be embedded may be randomly or content-adaptively distributed in the binary-map. We cannot directly use a fixed predictor depending on fixed neighbors. We propose to use a dynamic predictor for prediction. It means that a cover element is predicted from an indefinite number of its neighbors, e.g., a pixel is predicted from its four neighbors, and another one is predicted with its eight neighbors. There are two advantages: the security can be ensured, and the prediction accuracy may be improved.
For the latter, we take
Figure 2 for explanation. If P has been predicted from {x, y, z, w}, instead of {z, w, u, v}, Q could be predicted from {P, z, w, u, v}. It is seen that the traditional predictors could be considered as a special dynamic predictor. Accordingly, a most important problem for content prediction is to design the dynamic predictor. It is necessary to find an efficient method to orderly predict the cover elements. One may predict the cover elements by a row-by-row manner, which, however, has limited generality. We propose a method called
degree-first prediction (DFP), which consists of
element-wise selection and
element-wise prediction, to orderly predict the elements. As shown in Algorithm 2, in each time, the first step selects an element out according to its
degree. The second step determines its prediction value with a dynamic predictor. The degree of an element is a scalar that denotes the prediction priority. A larger degree means a higher priority. The degree of a cover element relies on its local context.
Algorithm 2 Degree-first prediction (DFP) procedure |
Input: A cover, a binary-map and a secret key.
|
Output: A prediction version of the cover. |
1: Initialization |
2: while exist an element to be processed do |
3: Choose an unprocessed element that has a largest degree |
4: Find the prediction value (with a dynamic predictor) |
5: Record the prediction value |
6: Mark the element as processed |
7: Update the degrees of the rest elements to be processed |
8: end while |
9: return the prediction version of the cover |
3.4. Data Embedding
After content selection, the data hider would perform data embedding. It is desirable to use HS or its variants to embed secret data since they can lead to superior payload-distortion performance. In detail, after generating an ordered pixel sequence, the data hider can determine out the corresponding PE sequence (PES). Thereafter, by using suitable histogram bin-pairs, the secret data can be easily embedded into the corresponding PEH. The traditional methods often empirically tune the shifting parameters, which is not desirable in applications. For a single-layer embedding, one may easily reproduce the reported simulation results. However, when adopting multi-layer embedding, it is actually time consuming and makes it hard for a reader to do the simulation due to the large space for searching suitable embedding parameters. To deal with this problem, in this paper, we propose a fast histogram shifting optimization (FastHiSO) algorithm to find near-optimal parameters. There are three advantages for the FastHiSO comparing with traditional operations: (1) the time complexity is relatively low; (2) a better payload-distortion performance can be achieved; and (3) the FastHiSO is deterministic, rather than empirical. In the following, we use digital image as the cover for detailing the FastHiSO algorithm.
Mathematically, we define
as the cover image after embedded with
t times. For simplicity, let
be an
n-pixel cover image with the pixel range
, e.g.,
for 8-bit grayscale images. For a given message, we use
and
to generate the marked image
by HS. Our goal is to find such HS parameters that both the distortion
D between
and
and the computational cost can be kept low at the same time. We limit ourselves to a commonly used
additive-distortion measure, i.e., mean squared error (MSE):
Let
represent the frequency of the PEH bin with a value of
v, where
. To embed data, with the generated PEH, we shift some PEs to vacate empty positions, and then embed secret bits by shifting the peak bins to the empty positions. Let
, be all the pixels to be embedded. We, respectively, denote the prediction of
and its marked version by
and
. Thus, we can determine the PEs
as follows:
For data embedding, we first select two peak points
and two integers
, where
,
,
. Then, secret bits can be embedded by using the HS operation, namely
where
Here, is the current bit to be embedded.
We use
to denote the original pixel values of
in
. For the pixels not belonging to
, the introduced distortion can be roughly considered as fixed since we will not embed secret data into these pixels (though we may alter some pixels prior to embedding, e.g., we may empty some LSBs to store the secret key). Therefore, for
-layer (
) embedding (i.e., to generate
), our optimization task is
where
C is a constant. We further have
where
and
.
Therefore, it is inferred that our final optimization task is
Obviously, all
are constants before embedding, meaning that they can be determined in advance. It can be seen that
for all
, which gives us the chance to quickly determine
for fixed
,
and
. In detail, we use a 2D histogram-matrix
to record the occurrence of every possible integer-pair
in advance, where
u represents the possible value of
, and
v shows the possible value of
. In this way, Equation (
7) is equivalent to
According to Equation (
4), we further have
where
b is the corresponding bit to be embedded.
Since the embedded bits are always encrypted, to keep the computational cost low, we will consider
and
Algorithm 4 shows the FastHiSO procedure. In Algorithm 4, the 2D histogram-matrix
can be determined with a time complexity of
, which is linear with respect to the number of cover elements to be embedded. For Line 6 in Algorithm 4, according to Equation (
9), the time complexity is
at the worst case for the fixed
. Since the PEH is Gaussian-like [
17], the optimal values of
and
should be close to zero. It indicates that, from the empirical point of view, the absolute values of
and
can be limited to a small range, e.g.,
. The values of
and
can be also limited to a small range, as well, e.g.,
. In this way, the near-optimal parameters can be quickly determined, and the corresponding complexity can be approximately expressed as
, where
is a relatively small integer.
With the proposed FastHiSO algorithm, one can easily embed secret data into the cover pixel-sequence. The embedding process is described in Algorithm 5. To avoid the underflow/overflow problem, we need to adjust the pixels with boundary values into the reliable range in advance. The preprocessed pixels should be recorded as side information, which will be self-embedded.
Algorithm 4 Fast histogram shifting optimization (FastHiSO) |
Input: The ordered cover sequence , the original sequence , the prediction sequence , and the payload size . |
Output:
|
1: Empty |
2: for
do |
3: Find and |
4: Set |
5: end for |
6: Find the near-optimal with Equations (8)–(11), subject to the payload size . |
7: return |
Algorithm 5 Data embedding procedure |
- Input:
The ordered cover sequence , the original sequence , the prediction sequence , the required payload , and the secret key . - Output:
The marked pixel-sequence . - 1:
Call FastHiSO to find near-optimal HS parameters - 2:
Embed into the corresponding PEH - 3:
Construct the marked pixel-sequence - 4:
return {thereafter, we further generate }
|
3.7. Other Perspectives
Next, two different types of dynamic predictors, i.e., raw-content-independent (RCI)-based predictor and raw-content-dependent (RCD)-based predictor are considered. RCI-based predictor uses the marked or predicted values of the neighbors of the present element as the prediction context. It means that the prediction process for an element may not affect the prediction process of another one directly. Thus, the content prediction order for a data receiver is probably identical to the sender. In contrast, RCD-based predictor uses the raw content, which can benefit prediction accuracy. Thus, we should ensure that the raw values of the context have been obtained before prediction.
Intuitively, a dynamic predictor enables us to predict different cover elements from different contexts. Actually, a general dynamic predictor also implies that:
Fusion of multiple subpredictors: The conventional methods use a single predictor. Actually, they can be treated as a fusion of multiple subpredictors. We take median edge detector (MED) [
13] for explanation, i.e.,
where
,
, and
are specific neighbors of
x. It can be seen that the MED essentially uses three subpredictors, i.e.,
,
, and
. Therefore, it is inferred that a dynamic predictor corresponds to a fusion of multiple subpredictors. A key work is to choose the suitable subpredictor according to the local context.
Fusion of multiple subhistograms: The histogram to be embedded also can be regarded as a fusion of multiple subhistograms as a subpredictor corresponds to a subhistogram. Though we may not directly use the subhistograms separately, it inspires us to divide a histogram into multiple subhistograms for payload-distortion optimization, which has been exploited by Li et al. [
18].
Fusion of multiple subcovers: Different subhistograms are corresponding to different subcovers even though the elements belonging to a subcover may be widely or near-randomly distributed in the original cover. In other words, we may divide the cover into subcovers for payload-distortion optimization since different subcovers may have different texture characteristics. For example, a cover image may be divided into disjoint blocks. Notice that this perspective no longer focuses on only the dynamic predictor, but rather the design of an RDH system, e.g., as in Reference [
19].
In addition, by default, we consider the cover element to be embedded as a single value for better understanding. Actually, the “element” can be a vector. For example, in Reference [
20], two pixels are grouped as a pair to carry the secret data.