^
p
i
¼
b
i
; if p
i
P b
i
a
i
; if p
i
6 a
i
;; if a
i
< p < b
i
8
>
<
>
:
ð1Þ
where ; indicates that the pixel cannot be predicted and will be
skipped during data embedding. For the case of a
i
¼ b
i
, the predic-
tion
^
p
i
is calculated as
^
p
i
¼
a
i
; if p
i
P a
i
a
i
1; if p
i
6 a
i
1
: ð2Þ
The prediction-error e
i
is then computed as e
i
¼ p
i
^
p
i
if there
exists a prediction for the pixel. By counting the occurrences of
prediction-errors, the corresponding PEH is generated as
hðkÞ¼#f1 6 i 6 N : e
i
¼ kgð3Þ
where N denotes the number of pixels, and k 2½255; 255 for an
8-bit gray-scale image. Evidently, as some rough pixels cannot be
predicted by the context in (1), the total occurrences of
prediction-errors
P
255
k¼255
hðkÞ is less than N. This can also explain
why the PVO embedding can achieve a high-fidelity performance,
as the data embedding mainly occurs in the smooth areas. Based
on the PEH, the marked prediction-error e
0
i
is obtained as
e
0
i
¼
e
i
þ m; if p
i
¼ b
i
e
i
m; if p
i
¼ a
i
e
i
þ 1; if p
i
> b
i
e
i
1; if p
i
< a
i
8
>
>
>
<
>
>
>
:
ð4Þ
where m is a binary bit. To embed a data bit, the prediction-error 0
is added/subtracted by 1 or kept unchanged, respectively. The
reversibility is guaranteed by the fact that the prediction of a pixel
is invariant before and after embedding. Thus, at decoder, one can
recover the original value and extract the data bit by comparing
the marked pixel with its prediction.
Considering that p
0
i
¼
^
p
i
þ e
0
i
, the histogram modification can
also be interpreted in terms of pixel value. The marked pixel value
p
0
i
is obtained as
p
0
i
¼
p
i
þ m; if p
i
¼ b
i
p
i
m; if p
i
¼ a
i
p
i
þ 1; if p
i
> b
i
p
i
1; if p
i
< a
i
p
i
; if a
i
< p
i
< b
i
8
>
>
>
>
>
>
<
>
>
>
>
>
>
:
: ð5Þ
Accordingly, the illustration of histogram modification based on (5)
is given in Fig. 1, where x-axis denotes the pixel value. In the figure,
it is clearly that the pixels in the range ½a
i
þ 1; b
i
1 are not used
for data embedding.
2.2. MHM framework for PVO embedding
Once a specific histogram is given, the embedding performance
is determined by the selection of expansion bins. So, the optimiza-
tion of PVO algorithms can be simplified as a function of
expansion-bin-selection parameterized by the two offsets r and t.
Taking the minimum and maximum values a
i
and b
i
as benchmark,
two new histograms can be defined as
g
1
ðrÞ¼#f1 6 i 6 N : p
i
a
i
¼ rgð6Þ
and
g
2
ðsÞ¼#f1 6 i 6 N : p
i
b
i
¼ sg; ð7Þ
respectively. For the sake of reversibility, the parameters r; s should
satisfy that b
i
þ s > a
i
þ r for all i 2½1; N. Suppose that the bins r
and s are selected for expansion, the capacity ECðr; sÞ and the
embedding distortion EDðs; t Þ can be generalized as
ECðr; sÞ¼g
1
ðsÞþg
2
ðtÞ; ð8Þ
and
EDðr; sÞ¼
1
2
g
1
ðrÞþg
2
ðsÞðÞþ
X
255
k
1
¼r1
g
1
ðk
1
Þþ
X
255
k
2
¼sþ1
g
2
ðk
2
Þ; ð9Þ
respectively. Evidently, without considering the case of a
i
¼ b
i
, the
modification manner shown in Fig. 1 is a special case of the new
framework, where ðr; sÞ is chosen as ð0; 0Þ. One can obtain that
the capacity ECð0; 0Þ¼g
1
ð0Þþg
2
ð0Þ, indicating that the to-be-
expanded pixels are chosen as the ones equaled to the maximum
or minimum in the context.
In addition, the new framework can be extended for MHM. To
modify the smooth pixels at first, a pixel-selection technique is
usually used to distinguish the smooth ones by measuring the
noise level. For the PVO algorithm, the noise level NL
i
of a pixel
can be calculated as the difference between the maximum and
the minimum in the context, i.e., NL
i
¼ b
i
a
i
P 0. Here, by means
of noise level, the histograms defined in (6) and (7) can be further
classified into multiple sub-histograms as
g
1
ðr
t
; tÞ¼#f1 6 i 6 N : p
i
a
i
¼ r
t
; b
i
a
i
¼ tgð10Þ
and
g
2
ðs
t
; tÞ¼#f1 6 i 6 N : p
i
b
i
¼ s
t
; b
i
a
i
¼ tg; ð11Þ
respectively. Since the parameter t 2½0; 255, let the parameter
vectors for the multiple histograms be r ¼ðr
0
; r
1
; ...; r
255
Þ and
s ¼ðs
0
; s
1
; ...; s
255
Þ, respectively, where the element in the vector
specifies the expansion bin for a histogram. For example, r
0
¼1
and s
0
¼ 0 represent that, for the histogram with t ¼ 0, the two
expansion bins are chosen as 1 and 0, respectively. Considering
the vectors of MHM, the capacity ECðr; sÞ and the embedding distor-
tion EDðr; sÞ are obtained as
ECðr; sÞ¼
X
255
t¼0
g
1
ðr
t
; tÞþ
X
255
t¼0
g
2
ðs
t
; tÞ; ð12Þ
and
EDðr; sÞ¼
1
2
X
255
t¼0
g
1
ðr
t
; tÞþ
X
255
t¼0
g
2
ðs
t
; tÞ
!
þ
X
255
t¼0
X
255
k
t
¼r
t
1
g
1
ðk
t
; tÞ
þ
X
255
t¼0
X
255
k
t
¼s
t
þ1
g
2
ðk
t
; tÞð13Þ
Fig. 1. Histogram modification used in PVO embedding, where x-axis denotes the values of pixel p.
330 B. Ou et al. / J. Vis. Commun. Image R. 38 (2016) 328–339