Abstract
Visual cryptography (VC) using bitplane decomposition improves the quality of the reconstructed image. The disadvantage of this scheme is that the decoder needs computation in order to reconstruct the secret image from its bitplanes. To solve this problem, we propose a nocomputation bitplane decomposition visual cryptography (NCBPDVC). In NCBPDVC, we convert the grayscale secret image into a multitone image by multilevel halftoning. Then, by exploring the difference between a digital pixel and a printed dot, we design different dot patterns to render a digital pixel. By doing so, we abandon the usual assumption that DPI (dots per inch) equals PPI (pixels per inch) during printing. By adopting the more realistic assumption that DPI can be larger than PPI as is supported by most printers, we use different patterns to render different tone levels. These patterns are carefully designed so that no computation is needed when one needs to reconstruct the multitone image from its bitplanes. Our algorithm is tested on a batch of twenty standard grayscale images. The experimental results confirm the correctness and advantages of the proposed scheme. Compared with the ordinary bitplane decomposition VC, NCBPDVC does not need computation. The security of the proposed algorithm is also analyzed and verified.
1. Introduction
As first proposed by Naor and Shamir [1], one advantage of VC (visual cryptography) is a lightweighted decoder, or even a computationfree decoder. The reconstructed image can be recognized by the HVS (human visual system) once the shares are stacked. This feature brings flexibility into applications involving secret sharing. Currently, most VC algorithms aim to solve two main issues. One is to reduce the size expansion; the other is to improve the perceptual quality of the reconstructed image.
Three types of VC schemes have been proposed to solve the poor perceptual quality of the reconstructed image in recent years:(1)Multipixels Encryption VC (MEVC). The main idea of MEVC is to reconstruct the average brightness of an image block [2–4]. The perceptual quality of the reconstructed image using MEVC is better than usual VC schemes [1, 5]. However, the MEVC scheme has the disadvantages of the line problem in the reconstructed image, and the suitable image to be encrypted is a binary image or coarse image.(2)Halftone VC. Halftone VC converts the grayscale secret image to a binary image by using halftoning and applies binary VC to halftone result [6–10]. Yan et al. proposed an ABS (analysisbysynthesis) framework by putting VC into an error diffusion loop [11]. Yan’s scheme diffused the error between the reconstructed image and the original secret image to the highfrequency band, thus can improve the perceptual quality of the reconstructed image. Sun et al. proposed an improved scheme by putting VC into direct binary search halftoning loop [12]. Halftone VC has the advantage of a better quality of the reconstructed image than MEVC. However, some fine details of the secret image are lost during the halftoning process, since halftoning is basically a lossy process.(3)BitPlane Decomposition VC. This kind of VC converted the grayscale secret image into bitplanes by converting decimal numbers of gray level into binary numbers. Each bitplane has a different weight. Then, each bitplane is encrypted using binary VC. Those schemes got a better perceptual quality of reconstructed image than MEVC and halftone VC [13, 14]. In [13], the secret image can be completely reconstructed. However, in the decoding process, the weight of each bitplane cannot be used directly without computation. Therefore, the decoding process of those schemes depends on computation.
VC via bitplane decomposition greatly improves the quality of the reconstructed image. However, this scheme needs computation for decoding. Specifically, the decoder needs computation to combine the weight of each bitplane with the binary image reconstructed in that bitplane. So, if we are able to combine the weight directly into the reconstructed binary secret image in each bitplane, then we can achieve computationfree decoding. A computationfree decoder is required for secure online transactions on a device controlled by a Trojan horse [15]. We propose a nocomputation bitplane decomposition visual cryptography (NCBPDVC).
The main contribution of this paper can be summarized as follows:(1)Combining weights into each bitplane so that the decoder uses simple stacking to decode the secret image. No computation is needed during decoding.(2)A set of patterns designed for the weights by exploring the difference between DPI (dots per inch) and PPI (pixels per inch). These patterns are complementary so that patterns for different bitplane do not interfere with each other once they are stacked.
This paper is organized as follows. In Section 2, we describe the background knowledge of our proposed NCBPDVC. Section 3 gives the general framework and details of the proposed NCBPDVC. Section 4 presents experimental results and discussions. Finally, we conclude this paper in Section 5.
2. Related Background
In this section, we briefly introduce the background knowledge on which the proposed algorithm is built, including usual (2, 2)VC, multilevel halftoning, and ordinary bitplane decomposition/reconstruction. Usual (2, 2)VC and multilevel halftoning can be used in NCBPDVC directly. The ordinary bitplane decomposition/reconstruction will be improved to achieve the purpose of computationfree in the decoding process in Section 3.
2.1. Conventional (2, 2)Threshold VC
The main idea of the (2, 2)threshold VC scheme is encoding one binary image into two shares through the codebook. Let L × W be the size of the input binary secret image B, and “×” be a separator. Let B_{i,j} be the current secret pixel, 1 ≤ i ≤ L, 1 ≤ j ≤ W. In Figure 1, we give the codebook of (2, 2)VC. The process of (2, 2)VC is described below.
If B_{i,j} is white, select a pair of combinations from the white column in Figure 1 and assign them to the subpixels at the corresponding positions in the shares S_{1} and S_{2}. Otherwise, select randomly a pair of combinations from the black element column and assign them to the subpixels at the corresponding positions in the shares S_{1} and S_{2}. The encoding process is repeated until all pixels in image B are processed. In Figure 2, we give an example of (2,2)VC process. Once the shares S_{1} and S_{2} are stacked, the secret image can be reconstructed.
(a)
(b)
(c)
(d)
A VC system should satisfy the contrast condition and the security condition. The contrast condition ensures that the reconstructed image can be visually revealed (or decoded). The security condition ensures that the secret images will not be leaked when an insufficient number of shares is obtained by attacker [1].
2.2. Ordinary BitPlane Decomposition
For an 8bit quantized digital image, the grayscale value of each pixel is usually an integer between 0 and 255. So, each pixel can be uniquely represented by an 8bit binary sequence. Therefore, binary bitplane decomposition can split the grayscale image into 8 binary bitplanes [13, 14].
Given a decimal number N, one can convert it into binary form bywhere b_{i} is the value of the ith bitplane with .
In Figure 3, we give an example of bitplane decomposition. This example shows how a fourpixel block is decomposed into eight bitplanes. Reverting the decomposition process, we can reconstruct the pixel block from the eight bitplanes.
2.3. Multilevel Halftoning
Multilevel halftoning converts a grayscale image into an image with a smaller number of levels. Typical algorithms include multilevel error diffusion [16, 17] and multilevel dithering [18]. Multilevel halftoning is an extension of binary halftoning [19–23]. Here, we briefly review the multilevel error diffusion method [17].
As is shown in Figure 4, we present the diagram of multilevel error diffusion. Multilevel error diffusion mainly includes multilevel quantization, error calculation, and error diffusion.
We define several symbols to better describe the process of multilevel error diffusion.(1)P is the number of tones(2) and are the hlevel quantization and output threshold with (3)K is the error diffusion kernel
Through the multilevel quantization, the multilevel output is represented aswhere M_{r,f} is the pixel intensity. Let G_{r,f} and be the current pixel and the cumulative sum pixel of error diffusion in neighborhood pixel, respectively. Then, M_{r,f} is represented as
We describe how to get . Through error calculation, one can calculate the error between M_{r,f} and by
Then, by K, the error is diffused to the surrounding pixels of the current pixel. As is shown in Figure 5, we give two common error diffusion kernels: Jarvis kernel [20] and FloydSteinberg kernel [21]. Compared with Jarvis kernel, FloydSteinberg kernel is small, and its computational complexity is small. Therefore, in this paper, we mainly use FloydSteinberg kernel [16, 23]. Through error diffusion, we get by
(a)
(b)
Multilevel quantization is important in multilevel error diffusion. We give an example of it. Let B be the bit depth of the input image. Let and , respectively, be the thresholds and tone levels interval. For example, when P = 4 and B = 8, we get
Through (2), we complete multilevel quantization. Therefore, the multilevel output is represented as
3. Proposed Scheme
In this section, we propose the NCBPDVC. Let one subpattern be a matrix. To realize computationfree bitplane reconstruction, we carefully designed a set of complementary subpatterns based on their weight.
In order to design a set of subpatterns, we need to describe what PPI and DPI are. PPI is usually associated with a digital pixel. For instance, the PPI of a computer displaying one image is 512 × 512 or 1024 × 1024. It means that this image contains 512 × 512 or 1024 × 1024 pixels. DPI is usually associated with a printed dot. For highquality printing, it is generally set to 600 DPI meaning 600 ink dots per inch. By adopting the more realistic assumption that DPI can be larger than PPI as is supported by most printers, we design printed subpatterns to render a digital pixel.
Through a set of subpatterns, a multitone image can be decomposed into independent bitplanes. Reverting the decomposition, a reconstructed multitone image can be obtained combining all bitplanes with their weight. By putting the binary VC encoding/decoding process into the bitplane decomposition/reconstruction, the proposed NCBPDVC solves the computational decoding problem compared with [13, 14].
3.1. NCBPDVC Framework
As is shown in Figure 6, NCBPDVC includes an encoder and decoder. Through the encoder, the grayscale secret image is encoded into shares in the form of independent bitplanes. Through the decoder, the shares are decoded into the reconstructed image.
Let us describe the working process of the encoder. The encoder includes bitplane decomposition and VC encoding. Multilevel halftoning transforms the grayscale secret image G into the multitone image . Through bitplane decomposition using a set of subpatterns, is decomposed into independent bitplanes. Then, by binary (d, n)VC encoding, we get the shares.
The working process of the decoder is described as follows. Let “⊕” be OR operation and “+” be stacking operation. The decoder includes VC decoding and computationfree bitplane reconstruction. Through the OR operation on all bitplanes in the same share, we get the reconstructed bitplanes. Simply stacking these, we get the reconstructed secret image R.
3.2. Multilevel Halftoning via Error Diffusion
As is shown in Figure 6, multilevel halftoning transforms the grayscale secret image G into the multitone image . The multilevel halftoning does not change the size of the secret image. We described the process of error diffusion multilevel halftoning in Section2.3. We summarize the multilevel quantification operation in error diffusion multilevel halftoning aswhere rounds M_{r,f} to the nearest integer towards 0, and “∗” represents the multiplication.
In Algorithm 1, we describe the error diffusion multilevel halftoning process. As is shown in Figure 7, we give an example of error diffusion multilevel halftoning on the airplane image. We can conclude that when P equals 16, the multitone airplane image has the best perceptual quality. Therefore, in NCBPDVC, we set the value 16 to P.
(a)
(b)
(c)
(d)

3.3. ComputationFree BitPlane Reconstruction
In order to perform computationfree bitplane reconstruction on the multitone image , we carefully design a set of complementary subpatterns in this section.
3.3.1. Subpatterns and Composite Patterns
We describe how to design a set of complementary subpatterns. In this paper, let value 0 (1) be black (white). The process of designing the first subpattern is selecting half of the positions from a blank matrix. Then, we set the value of all selected blank positions 0. The second subpattern is based on the first subpattern to select half of its blank position to set 0. Repeat the above steps until only one position of the last subpattern is 0. Let Y_{k} be kth subpattern with . Let X be the total number of subpatterns that is related to P. In this paper, X correspondingly equals 2 and 4 when P, respectively, equals 4 and 16. In Algorithm 2, we give the process of designing subpatterns.

In Figures 8 and 9, we give two examples of designing two and four subpatterns when X, respectively, equals 2 and 4. We define the weight of this: all these subpatterns are ordered according to their weight, from high to low.
Let one composite pattern be a matrix that has the same size as one subpattern. Through subpatterns OR operation in the same set, we get the composite patterns. We define several symbols as follows:(1)Let y_{1}, y_{2}, …, y_{k} ∈ {0, 1}. Let “◦” be participation symbol that means when the value of y_{k} is 1, the subpattern Y_{k} can participate in the OR operation of obtaining one composite pattern.(2)Let B_{s} be the sth composite patterns, where s is positive integers with s ∈ {1, …, P}.
In Figure 10, we give an example of getting all composite patterns using subpatterns we designed in Figure 8. Therefore, the process of obtaining the composite patterns through different subpatterns combination is summarized as
In Figure 11, we give the four composite patterns obtained by using two subpatterns in Figure 8. In Figure 12, we give the sixteen composite patterns obtained by using four subpatterns in Figure 9. All composite patterns are ordered according to their weight in descending order.
3.3.2. BitPlane Decomposition
In Figure 12, we obtain sixteen composite patterns by applying four subpatterns to equation (10). Reverting equation (10), any composite pattern can be decomposed into a set of subpatterns. We refer to this reverting process as bitplane decomposition. We use an arbitrary digital image G to illustrate this decomposition.
Let the size of G be 1 × 1 with the pixel value 62. In Figure 4, through a 16level halftoning via error diffusion, G is converted into . In Figure 13, through a set of our subpatterns in Figure 9, is in form of four bitplanes. We summarize the process of bitplane decomposition in Algorithm 3. According to Algorithm 3, a set of bitplanes is ordered.

3.4. Encoding Process of NCBPDVC
The main idea of the encoding process in NCBPDVC is to use VC to process the bitplanes of the multitone image . Each bitplane is encrypted using ordinary binary VC encode. NCBPDVC is flexible and suitable for any binary VC. According to a set of complementary subpatterns, there can be only one black pixel in the same position in a set of bitplanes. Therefore, as is shown in Figure 14, if the black pixel is at the same position in a set of reconstructed bitplanes, the final stacking result of that position dose not get affected by which level it is on. The reconstructed bitplanes are obtained by shares. Based on the above, the attacker cannot infer the order of bitplanes in shares.
Let E (i, j) be the stacking operation result of all the positions (i, j) in secret bitplanes. To get shares based on the (2, 2)VC codebook, suppose E (i, j) is black. In shares, the pair of bitplanes whose position (2 ∗ i − 1 : 2 ∗ i, 2 ∗ j − 1 : 2 ∗ j) is the black pixel codebook will be randomly determined by a random integer a. As is shown in Figure 15, we give the shares after encoding the secret bitplanes in Figure 13. In Figure 15, the three pairs of green dots represent three black pixels in shares. Supposing one case, the attacker has . Comparing with –, the attack cannot infer the first bitplane. And so on, it also applies in other cases. Therefore, we give the NCBPDVC encoding process in Algorithm 4.

In Figure 15, shares which are stored in the form of independent bitplanes are disadvantageous to management. Therefore, each bitplane is centrally stored in shares. For example, can be stored in Figure 16. This form makes the size of shares expand largely. However, after decoding, the size expansion of the (2, 2)NCBPDVC reconstructed image is still .
3.5. Decoding Process of NCBPDVC
As is shown in Figure 6, the decoding process of NCBPDVC includes two parts. Through the shares OR operation, we get the reconstructed bitplanes. The second part is the stacking of reconstructed bitplanes to reconstruct the secret image R. Therefore, we give the NCBPDVC decoding process in Algorithm 5. According to Algorithm 5, the reconstruction of R is stacking these reconstructed bitplanes with computationfree.

4. Experimental Results and Discussions
This section mainly includes the experimental setups, comparison in function, performance, and computational complexity, and the feasibility analysis of NCBPDVC.
4.1. Experimental Setups
The proposed NCBPDVC has the advantages of nocomputation in decoding and the better perceptual quality of the reconstructed image compared with [3, 6, 14]. We carried out experiments to prove the advantages. In Table 1, we give the used experimental setups. In Figure 17, we give the example of the reconstructed images through [3, 6] and NCBPDVC with [1, 5]. We can see that the reconstructed image of NCBPDVC is better than [3, 6]. We will give quantitative analyses in Section 4.2.1.
(a)
(b)
(c)
(d)
4.2. Comparison
4.2.1. Quality Comparison
To quantitatively evaluate the quality of NCBPDVC and other algorithms, we use metric parameters peak signaltonoise rate (PSNR) and mean structural similarity (MSSIM). Algorithms are tested on a batch of twenty standard grayscale images in Figure 18.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)
(m)
(n)
(o)
(p)
(q)
(r)
(s)
(t)
As is shown in Figure 19, we give four NCBPDVC reconstructed images of the secret images that are selected from the testing images. The encoding/decoding process of NCBPDVC combines binary VC with nocomputation bitplane reconstruction. According to the decoding rules, only black pixels can be completely reconstructed, and only half of the white pixels can be reconstructed. Therefore, the reconstructive image is obviously darker than the original image.
(a)
(b)
(c)
(d)
In Figure 20, we give the PSNR and MSSIM values of [3, 6] and NCBPDVC. We can conclude that NCBPDVC is superior to [3, 6] both in structure and tone. [3, 6] Algorithms are designed for binary images; however, NCBPDVC is designed for multitone image. Therefore, the perceptual quality of NCBPDVC is better than other algorithms.
(a)
(b)
4.2.2. Performance Comparison
We quantitatively tested the proposed scheme in Section 4.2.1. The quality of NCBPDVC is better than [3, 6]. In Table 2, we give the qualitative analysis. Therefore, compared with [14], NCBPDVC does not need computation in decoding.
4.2.3. Computational Complexity Comparison
Let be the time complexity of one scheme. of the proposed and others are linear functions of the secret image size. L and W denote the row and column width of the original secret image which can be estimated. Let the operation time of addition/subtraction be , anyone multiplication/division be , and one random number generation be .
In Table 3, we give the total time complexity of [3, 6], and NCBPDVC. The total time complexity of [3, 6] is both . The error diffusion kernel of [3, 6] and NCBPDVC are both FloydSteinberg error diffusion kernel. Compared with error diffusion used in [3, 6], the multilevel quantization in multilevel error diffusion of NCBPDVC brings extra computation. Therefore, the total time complexity of NCBPDVC is .
4.3. Feasibility Analysis
A VC system should satisfy the contrast condition and the security condition. The following analysis proves that NCBPDVC satisfies the two conditions. To describe the two conditions, we define some symbols as follows:(1)Let Q_{1} (Q_{2}) be the matrix codebook of encoding a white (black) pixel, such as in Figure 1. Each matrix size in Q_{1} (Q_{2}) is n × m.(2)Let q_{1} (q_{2}) be any pair of matrices chosen in Q_{1} (Q_{2}).(3)Let q_{11} (q_{21}), q_{12} (q_{22}) represent one matrix in q_{1} (q_{2}). H(q_{1}) is the weight of q_{1}.
Let d, n, m, ι, and ζ be nonnegative integers satisfying 1 ≤ ζ ≤ m and 2 ≤ d ≤ n.
We give the two conditions of (d, n)VC [1]as follows:(1)Contrast condition: In q_{1}, the OR operation result of any d rows in n rows satisfies In q_{2}, the OR operation result of any d rows in n rows satisfies(2)Security condition: In q_{1} and q_{2},
In the two conditions described above,(1)m is the number of pixels in q_{1} or q_{2}. We call it the pixel expansion and(2)ι represents the loss in contrast. It is the relative difference in weight between shares from a white pixel and a black pixel in the secret image.
As is shown in Table 4, we prove the usual (2, 2)VC satisfies the two conditions. In Figure 13, the bitplanes are independent. Therefore, the process of encoding each bitplane is noninterfered with each other. In Table 5, we give the two conditions analysis of NCBPDVC using the encoding process of the first bitplane. Through the results in Table 5, we proved this process satisfies the two conditions. It is independently encoded bitplanes; therefore, the whole encoding process of NC BPDVC satisfies the two conditions.
5. Conclusion
In this paper, we propose NCBPDVC, where a set of complementary subpatterns are designed based on their weight. Through the subpatterns, we directly combine the weight of each reconstructed bitplane into the reconstructed secret image. Therefore, NCBPDVC has the advantage of computationfree in reconstructing the secret image. The perceptual quality of the reconstructed image is also improved.
Data Availability
The data used to support the findings of this study are available from the corresponding author upon request.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
Acknowledgments
This work was funded by the Shandong Provincial Natural Science Foundation (No. ZR2021MF050), the MOE (Ministry of Education in China) Project of Humanities and Social Sciences (No. 18YJAZH110), and the National Statistics Science Project (No. 2021LY082).