Binary Image Data Hiding Using Matrix Encoding Technique in Sensors

It is very important to protect the copyright of digital images in wireless transmission, because people often use a smart phone in their daily life. Traditional security schemes are computationally expensive, and they introduce overhead, which shortens the life of the image sensors. In this paper, we present an Improved Matrix Encoding (IME) scheme for hiding data into a two-color binary image. Our proposed scheme improved the CPT scheme. In the CPT scheme, each block F of q = m × n pixel of G is changed by at most two pixels for hiding data. CPT scheme's embedding rate is r = log 2 q + 1 . The IME scheme is shown approximately as a 2 r - 2 embedding rate, while Tseng-Pan's modified CPT scheme (MCPT) is an r - 1 embedding rate. Therefore, IME's embedding rate is higher than that of the MCPT scheme. In our experiment, we demonstrate that our proposed schemes are superior to those of the CPT and MCPT schemes.


Introduction
The fundamental requirements of Wireless Sensor Network (WSN) in sensitive areas are a secure [1][2][3][4][5][6][7][8][9] image transmission.Unlike the wired networks, it is highly possible for attackers to access sensor data via wireless networks.Authentication preservation with sensors and related applications is an important research field in recent years [10][11][12][13].Data hiding can be used for copyright, annotation, and communication and can be achieved by altering some nonessential pixels in the cover image.For example, in a given color image (including grayscale images), the least-significant bit (LSB) of each pixel can be changed to embed the hidden data.However, two-color images (including binary and halftone images) are very sensitive, as they can easily be detected by the human visual system.For stego images, one of the most challenging problems is hiding the secret data into binary images with a high ratio of secret data and low image distortion.Lower distortions of pixels in an image make it possible to resist steganalysis by the human visual system (HVS) [14].
Until now, there has been much research about data hiding based on binary cover images.Such research can be divided into four categories.The first category is pixel-wise: in this method, pixels can be chosen randomly [15]; therefore, the quality of the stego image is not good.In order to improve this problem, Kim [16] and Mei et al. [17] proposed improving the method based on some visual impact measures.The second category is pairwise: Tsai et al. [18] proposed this method based on pairwise logical computation (PWLC).The third category is block-wise: cover images are divided into blocks and modified by some characteristics of each block, including key and weight blocks.Some papers suggest changing the parity (or the quantization) of the number of black pixels in each block (Wu and Liu) [19], while others suggest flipping one specific pixel in the block [20,21].Finally, the fourth category is histogram: this method can be used for recovering the original image from the stego image using a histogram of an image.The histogram-based method was researched based on grayscale cover images.Guorong et al. [22] were the first to try to hide data in a binary image based on histogram.Ho et al. [23] later proposed a novel method International Journal of Distributed Sensor Networks for reversible data hiding and solved the problem of PWLC (i.e., binary image noise).
The CPT (Chen, Pan, and Tseng) scheme [24] was the first scheme based on the block-wise technique.This scheme is a good method for high-rate embedding of goodquality images.CPT is based on the pixel block scheme (its embedding rate is  = ⌊log 2 ( + 1)⌋ and secret bits can be hidden in each block  of size  =  ×  by flipping two pixels at most), which has been studied by many researchers [20,[24][25][26][27].The WL (Wu and Lee) scheme [25] can embed one bit in each block  by changing, at most, one bit in the block.Although CPT has several advantages, there are also some problems with this scheme.First, it is not easy to control the quality of an image with this method, because the pixels that are flipped are randomly selected.The second problem is that the key matrix is discretionarily constructed.Thus, the embedding performance largely depends on the choice of a key matrix.In order to solve the problem of CPT, a modified scheme (the MCPT scheme for short) was proposed.MCPT was derived from the CPT scheme, which was introduced by Tseng and Pan in 2001 (see [20,24,27]) to control the high quality of embedded binary images.
In general, the evaluation of data-hiding performance depends mainly on the visual quality of stego image and data-hiding capacity.In this paper, we propose a binary datahiding method based on a block-wise scheme: the Improved Matrix Encoding (IME) scheme.The reason why we propose IME is to show the maximum embedding rate of a block-wise scheme.
The advantages of the proposed scheme include improving CPT's data-hiding capacity.The CPT scheme's embedding rate is  = ⌊log 2 ( ×  + 1)⌋ while the IME scheme is about a 2 − 2 embedding rate in a block.In addition, the IME scheme is secure because the existence of hidden data is less detectable through the adjustment of block size.The rest of this paper is organized as follows: Section 2 reviews the CPT scheme; Section 3 presents our proposed IME scheme and considers the relationship between our approaches; Section 4 shows the experimental results of our evaluation; Section 5 presents a summary of our findings as well as future directions of study.

CPT Scheme
The CPT scheme is a pixel block-based method: given a binary image , which is partitioned into disjoint blocks   as binary matrices with the same size  × , 1 ≤  ≤  for some .Each entry in  is considered as a pixel of  and has a value 0 or 1.Combined with these blocks of the image are two matrices,  and , of the same size  × , where  is a binary secret key and  is the weight matrix of the integer shared by the sender and the receiver.The set of values of  , of entries in  satisfies {  : In each such block , by changing values of at most two entries, the number of bits to be embedded is .The operation  ⊕  is the bitwise exclusive OR (XOR) on two, equal-size binary matrices  and .The following operation ⊗ computes the sum obtained by taking pair-wise multiplications on two, equal-size integer matrices.The CPT embedding scheme is shown in Algorithm 1.In this case, it shows how to embed secret data  of  bits into .
Example 1. Assume that the size of  and  is 3 × 3 (see Figure 1).We consider a 3 × 3 block  (see Figure 1) of a host image  and show how to embed  = 2 bits  of data in , assuming, for example, that  is 11 2 .Next, compute  = SUM((⊕)⊗) = 1+2+3+1+2 = 9 mod 2 2 to get  = 1.Next, compute  =  −  = 11 2 − 1 = 2 mod 4. If  = 0, then there is no change in  and; otherwise; we have to increase or decrease  by  mod 4. In this case,  = 2. So,  must increase by  = 2 and therefore  22 should be flipped and we obtain the new   from , so that in the extracting phase, we compute

Data-Hiding IME Scheme
In this chapter, we propose an IME scheme to improve the quality of binary images using a new matrix encoding scheme.
3.1.System Architecture.In this section, we describe the configuration for the CMOS Image Sensor system that achieves watermark embedding in spatial domain.The system consists of a CMOS imager and IME. Figure 2 shows the data flow in this system.The CMOS imager output is a sequence of digital values; the watermark is a binary sequence.In order to rebuild the watermark data, information of the key is required.

Embedding Algorithm for IME.
In this section, we propose an embedding algorithm that can improve that in Chang et al. [21] for IME.The basic idea is to use an abelian group under an XOR ⊕ operation.
The inputs and notation to our scheme are as follows: (i) : a block of size  ×  of a host bitmap image; (ii) : a secret key shared by the sender and receiver.It is a randomly selected block of size  × ; (iii) : a secret weight matrix shared by the sender and receiver.It is an integer matrix of size  × ; (iv) : some critical information consisting of bits to be embedded in ; (v) : an embedded rate in each  ×  block of .The value of  satisfies 2  − 1 ≤ ;    , where ∧ is the bit-wise AND operation and ⊕ is the bit-wise XOR operation.That is,  1 has the  leftmost bits set to "0" and  2 has the  rightmost bits set to "0. " Algorithm 2 of the proposed scheme is described as follows.
We define a distance matrix dist() (3) with the same size  × : dist ()  is the smallness distance from   to an entry having completion value of   .This matrix is used to check whether a   can be inverted or not.For example, with  is given by Figure 3.
In applications, to avoid taking roots, we use (dist () 2  ) instead of dist(  ).We need to set extra conditions put on .(2) [⋅ ∼] mod 2 = 1, where ∼ denotes the completion matrix of  (taking completion on each entry).

Extracting Algorithm for IME.
In this section, we describe the extracting method with the binary stego image using the IME scheme.
The correctness of Figure 4 is based on following theorem, which is easily checked: Theorem 3. Given a block  of binary image , changing at most two pixels in  by Algorithm 2, one can hide () secret bits and extract exactly these bits by Algorithm 3.
Proof.By properties of XOR ⊕ operation and scalar multiplication ⋅, we have the evident fact: (1) flipping any entry  , in block  to obtain new block   implies flipping  , in matrix  to obtain the new matrix   , which satisfies the new sum   = [⋅  ] =  ⊕  , where  = [ ⋅ ]; (2) consider now in Algorithm 2,  =  1 ⊕ 2 and  = ⊕V.
For example, we check the following case: Hence, after flipping  , and  , using the above fact, we have a new block   and matrix   , satisfying   =   ⊕  and   78 .Let us remark that the number of key binary matrices  is 2 × = 2 30 .Keeping a total of all  , = 1 combining with odd  , also an odd number (so that the condition [⋅] = 1 is satisfied), the number of key binary matrices  remains 2 29 , a half of 2 30 .At last, these provide a total larger than 2 100 couples of secret matrices (, ).

Experimental Results
In this section, experimental outcomes are illustrated to show the feasibility of our proposed data-hiding mechanism.
Various binary images, such as Mickey, Cycle, Landscape, Man, and Truck were chosen as the testing image (see Figure 5).The quality comparison was based on PSNR, which is represented in ( 4) and ( 5), for two  ×  monochrome images  and   .The PSNR value can be calculated as follows: where MSE can be computed as where,  and  are the cover image's width and height, where  stands for the pixel value of the original binary image in (, ) and   represents the pixel value after modifications (, ).Table 1 can be used to prove the claim.Our proposed schemes use the block-wise method; thus, Table 1 shows the comparison of block-wise methods, such as Maximal Secret Data Ratio (MSDR), CPT, MCPT, and IME.  is a block of the cover image.For the IME scheme, we assume that matrix  is a block of size  × ,  =  × , and  > 1, which is the number of colors.If two pixels are changed in , there are at most ( − 1) 2 ×  × ( − 1)/2 ways to change two entries in .Therefore, in the IME scheme, there are at most 1 + ( − 1) ×  + ( − 1) 2 ×  × (−1)/2 configurations.This means that we can hide at most  = ⌊log 2 (1 + ( − 1) ×  + ( − 1) 2 ×  × (−1)/2)⌋ secret bits in .We call  the MSDR for the IME scheme.MSDR = ⌊log 2 (1 +  2 /2)⌋ secret bits that can be embedded in .This table compares the embedding capacity in a   between proposed schemes and previous schemes.The number of pixels in a   is increased from 6 to 94 in Table 1.When the number of size in   increases from 6 to 30 and 63, IME is the nearest neighbor to MSDR.Moreover, IME has better capacity than any other scheme except MSDR.Therefore, IME showed good performance in the aspect of embedding capacity.
Table 2 shows the experiment result.In this experiment, we used MCPT and IME schemes.The IME scheme's capacity is better than that of MCPT.
Table 3 shows the comparison between MCPT and IME at the same hiding-capacity levels.In Figure 6, we compare stego experimental images, which are generated by MCPT and IME, because we compare visual quality by the HVS.By carefully observing the experimental results, we find that the visual quality generated by the IME data-hiding scheme is better than that generated by the MCPT data-hiding scheme.
The IME scheme has very good image quality and a reasonable capacity.Compared with the well-known MCPT method (see Table 3 and Figure 6), the experimental results of the method proposed in this paper show that our method can offer not only a higher maximum data-hiding capacity but also better visual quality.

Conclusion
Binary images are not easy for data hiding compared with grayscale or color images, because a binary image is very sensitive, so that the HVS can detect some flipping pixels.We researched to solve such a problem.In this paper, we proposed novel data hiding methods, namely, the IME scheme.The IME scheme has larger embedding rates than the CPT scheme and is approximate to that of MSDR.The results of our experiment showed that our schemes prove to be good schemes for binary data hiding.

Figure 3 :
Figure 3: The block  and the distance map for .
as we need in Algorithm 2 for extracting secret data .Other cases can be checked similarly.The proof is completed.
Partition  into blocks, each of size  × .S2.For each block   , obtained in step S1, check whether the condition "0 < SUM(  ∧ ) < SUM(K)" holds true.If so, go to step S3 to embed one data bit in   ; otherwise, no data will be embedded in   and   , will be kept intact.S3.Let the bit to be embedded in   be .Then do the following to modify   : If (SUM(  ∧ ) mod 2 = ) then Keep   intact; Else if (SUM(  ∧ ) = 1) then Randomly pick a bit [  ] , = 0 such that [] , = 1 and change [  ] , to 1; Else if (SUM(  ∧ ) = SUM(K) − 1) then Randomly pick a bit [  ] , = 1 such that [] , = 1 and change [  ] , to 0; Else Randomly pick a bit [  ] , such that [] , = 1 and complement [  ] , ; End if; End {Watermark Embedding} Algorithm 1: Data embedding algorithm based on CPT scheme.

Table 1 :
Comparison of block-wise schemes, that is, MSDR, CPT, MCPT, and IME.(Compare a block,   is a block of a binary image).