will be revealed. In a general (k, n) threshold VCS, a secret
image is divided into n random shares (also called shad-
ows) which, respectively, reveals nothing about the secret.
The n shares are distri buted to n associated participants.
Stacking any k or more shares can visually reveal the secret
image based on human visual system (HVS) without any
computation, but any k 1 or less shares cannot recover
the secret [3]. Better or lossless visual quality can be
obtained as well, by applying the XOR-based VSS schemes
with lightweight devi ce [9]. In an (2, 2) RG-based VCS,
the secret is encrypted into two random shares of the secret
image. Although some contrast [19] loss appears, the
recovered image is clearly identified. In an (2, 2) XOR-
based VCS, the secret image is recovered lossless and can
be recognized as the same with the original secret image
with lightweight device.
In gener al, the visual quality of the recovered secret
image is evaluated by contrast in VCS. It means that when
contrast is equal to zero, the recovered secret image could
not be recognized as the original secret image, while the
reconstructed secret image can be recognized as the orig-
inal secret image when contrast is greater than zero. The
larger the cont rast, the better the visual quality. Some
definitions used in this paper are presented.
Symbols and denote the Boolean OR and XOR
operations. The binary secret image S is shared among n
shadow images and the reconstructed secret image S
0
is
reconstructed from t (2 t nÞ shadow images. Here 1
denotes black pixels, 0 denotes white pixels.
The probability of pixel color is transparent or white (0)
and the same for the probability of pixel color is opaque or
black (1) for a certain pixel a in binary image A with size of
M N: AS
0
(resp., AS
1
) is the white (resp., black) area of
original secret image A defined as A
0
¼fði; jÞjAði; jÞ¼
0; 1 i M; 1j Ng (resp., A
1
¼fði; jÞjAði; jÞ¼1; 1 i
M; 1 j Ng)
Definition 1 (Contrast) The visual quality, which will
decide how well human eyes could recognize the recovered
image, of the recovered secret image S
0
corresponding to
the original secret image S is evaluated by contrast defined
as follows [9, 20]
a ¼
P
0
P
1
1 þ P
1
¼
PðS
0
½AS
0
¼0ÞPðS
0
½AS
1
¼0Þ
1 þ PðS
0
½AS
1
¼0Þ
ð2Þ
In this paper, contrast which is defined in Definition 1
would be applied to evaluate the visual quality of the
recovered secrete image and it is also widely used in VC-
related schemes, whe re a denotes contrast, P
0
(resp., P
1
)is
the appearance proba bility of white pixels in the recovered
image S
0
in the corresponding white (resp., black) area of
original secret image S, that is, P
1
is the wrongly decrypted
probability corresponding to the black area of original
secret image S and P
0
is the correctly decrypted probability
corresponding to the white area of original secret image S.
Definition 2 (Visually recognizable)[9, 20] The recov-
ered secret image S is recognizable as original secret image
S by a [ 0 when t k.
Based on Definition 2, we can recognize the recovered
secret image as the original secret image by a [ 0, while
the revealed secret image could not be recognized as the
original secret image if a =0.
VSS can be applied in many scenes, such as social
computing security, authentication and identification,
watermarking [21], and information hiding and transmit-
ting passwords. In this paper, we use the so-called (2, 2)
scheme. One ( k, n) RG-based applied in our article and the
algorithmic steps are described in Algorithm 1 [22].
Algorithm 1 (k, n) RG-based VSS
Input: A MN binary secret image S, the threshold
parameters (k, n)
Output: n shadow images SC
1
,SC
2
,…SC
n
Step 1: For each position
ði; jÞ2fði; jÞj1 i M; 1 j Ngrepeat Steps 2–6.
Step 2: Select b
1
; b
2;
...b
k
2 0; 1
fg
randomly.
Step 3: If Sði; jÞ¼b
1
b
2
...b
k
;go to Step 5; else go to Step 4.
Step 4:
Randomly select p 2 1; 2; ...; kfgflip b
p
¼ b
p
(that is
0!1or1!0).
Step 5: Select b
kþ1
; b
kþ2
; ...b
n
2 0; 1
fg
randomly.
Step 6: Randomly rearrange b
1
; b
2
; ...b
n
to
SC
1
ði; jÞ; SC
2
ði; jÞ; ...SC
n
ði; jÞ.
Step 7: Output the n shadow images SC1,SC2,…SCn.
3 Proposed visual secret sharing based on QR
codes (VSSQR) scheme
In this section, we propose a novel scheme which deeply
integrates the error correction mechanism of QR code with
the theory of VSS. The errors can be corrected by the error
correcting code which uses the strict mathematical rela-
tions of information bits and then checks bits to locate the
wrong positions, so that the QR code can be correctly
decoded while manipulated some of the code words but
still maintaining a QR code sym bol. In this paper, the
scheme proposed is for (k, n) threshold which will be
referred to as VSS based on QR code. The scheme pro-
posed is to use the highest level of QR code error correc-
tion. According to the different application scenarios, two
different recovered ways of the secret image are given.
J Real-Time Image Proc
123