Embedding of binary image in the Gray planes

For watermarking of the digital grayscale image its Gray planes have been used. With the help of the introduced representation over Gray planes the LSB embedding method and detection have been discussed. It found that data, a binary image, hidden in the Gray planes is more robust to JPEG lossy compression than in the bit planes.


Introduction
The Gray code is well-known in the theory of information [1].It allows to reveal one of the main features of digital images, its redundancy that is of interest of the modern steganography.
The Gray planes of digital image obtained from its bit planes represent image in spatial domain.The great variety of the spatial domain watermarking techniques (see, for example, [2]) include LSB (Least Significant Bit) method, block and additive embedding for which binary representation is used.
Instead of bits there might be used trits achieved by pseudo-ternary encoding, that was developed for watermark [3].It is possible hiding information in audio files and it requires its own technique [4].
After the data is embedded, the achieved stego work frequently would be storied in some graphic format for further usage.It can destroy the watermark because some graphical formats as JPEG use lossy compression.
This problem is well-known.A simple solution is storing in a lossless format like TIFF or PNG.However JPEG is widely used in practice, so the robust to JPEG-compression steganography is much attended.Robust to lossy compression technique allows to achieve different problems including pattern recognition, image enhancement [5] and many others.Watermarking of JPEG file and its subsequent JPEG-compression is known as J2J (JPEGto-JPEG) transform [6].There is not unique solution for J2J and a large number of methods includes a trade-offs between hight compression level and watermark degradation.
In our work embedding of binary image into the Gray planes of a grayscale image under J2J transform considered.The Gray plane watermarking has been proposed in ref. [7] and developed by many authors [8,9,10], it showed its resistance to RS analysis [11], the χ 2 attack [12] and SPA (Sample Pair Analysis) [13,14].For steganoanalysis the SPA watermark detectors may be very efficiency [15], however its design is very complicated if the bit planes beginning from the second one are used [16].In our work the fourth Gray plane is watermarked, for this case detector is unknown to authors.In our paper we focus on the Gray plane watermarking that is robustness to JPEG compression.
The paper is organized as follows.First, hiding a binary image in the bit and Gray planes is considered and various detection procedures are introduced.Then a scheme included the lossy compression is analyzed and the distortion measures as P SN R and others are calculated.

Embedding and detection algorithms
The Gray code for pixel c is created from its binary representation , where all b V , g V ∈ 0, 1.From here and later all bits are added by modulo two.Binary digit b V has its weight 2 V −1 , V = 1, . . ., W , where the most significant bit is b W and LSB is b 1 .It is not true for the Gray code that has the unnatural weights.
The set B V from digits b V of all pixels is named bit plane, that is a binary image.As well the set G V of the codes g V is named Gray plane, which is also a binary image.Any grayscale image can be represented over the bit and Gray planes.Let C be a 8-bit grayscale image, then its representation over the bit planes has the forme From definition of the Gray codes it follows that where T < 8. Two important points may be made from these Eqs.First, any modification of a Gray plane, say G 5 , results in modification of the bit plane set {B 1 , . . ., B 5 }.Second, representation over the Gray planes has the form [17] Consider the problem of hiding a binary image M into cover work image C by watermarking its Gray planes.Assume the embedding algorithm be a bit addition Indeed, the least significant planes of any image look as a noise being a random binary arrays so that they can be considered as a secrete key of the embedding algorithm (??).As a result stego work reads where B T M , T = 1, . . ., V are bit planes with hidden image M : B V M = B V + M .This Equation tells, that embedding into a Gray plane is equivalent to embedding into a set of bit planes {B 1 , . . ., B V }.It is possible two ways of detection, the image M can be extract from both the bit plane and the Gray plane.Lets consider a non-blind detection for which the cover image C is required.The hidden image can be obtained from the Gray plane G V by addition M = G V M + G V .Introduce a function bitget(A, V ), it is known in Matlab and it calculates a bit plane V of an image A. Then detection procedure using the Gray plane takes the forme where the bit addition results in bitget(C, V + 1) + bitget(S, V + 1) = 0, because the plane V + 1 is not watermarked.In the same time image M can be extracted from the bit planes M = B T + B T M , and next detection procedure is possible where T = 1, 2, . . ., V .The image redundancy allows to modify several bit and Gray planes without introducing noticeable changing.This fact leads to the blind detection for which the cover image is not required.Next scheme can implement this solution.The plane V is replaced with the plane K including M and to get M the stego work planes K and V are extracted.For the Gray planes this scheme has the next steeps.
In contrast to non blind detection the presented scheme can't be rewritten with the use of the bit plane embedding options (3).So two detection procedures (4) and ( 5) are impossible.It can be illustrated by the next example.Assume V = 2, K = 3 and where Y = G 8 + . . .+ G 4 .Using expression for G 2M , then instead of (2) we find According to (6) the detection is defined by expression M = bitget(S, 2) + bitget(S, 4).

Lossy compression
The JPEG format includes lossy compression, this is an complicated procedure we will describe by mapping where q = 1, 2, . . ., 100 is named a quality parameter.It refers to the JPEG quantization matrixes.The lager q is the higher the compressed image quality is.
Next scheme includes lossy compression is considered.A binary image M is embedded into a bit plane B V and a Gray plane G V of a grayscale cover C. Two obtained stego works S B and S G also cover image are compressed To extract M it is possible four detection procedures namely the blind and non-blind detection, also D 1 and D 2 procedures.Then we have four watermarks: M b , M gb , M g , M gc defined as where T = 1, . . ., V .Here watermark M b is obtained after embedding and detection from a bit plane by non-blind detection, M gb and M g are obtained after embedding into a Gray plane by detection from a bit plane and from a Gray plane by non-blind detection, finally M gc is obtained after embedding into a Gray plane by blind detection.

Experiment
The main goal of our experiment is to compare watermarking of the bit planes and Gray planes and to find efficient detection.
For this purpose the distortion measures d(M, X) between the initial watermark M and the extracted after the compression watermarks X = M b , M gb , M g , M gc have calculated.It has been used the Euclidean distance e(M, X), Peak Signal-Noise Ratio P SN R(M, X) and relative entropy Q(M ||X).For two matrices M and X these measures are defined as follows where Ω is a total number of elements, p M [j], p X [j] are histograms of brightness of M and X.

Embedding in the bit and the Gray planes
The binary image M and the grayscale cover work C are represented on the Fig. 1.The fourth bit plane B 4 and the fourth Gray plane G 4 were selected.This choice results from the next trade off.The less significant bit plane is the higher distortion level due from lossy compression is and it would be better to hide data into more significant planes in which the hidden data becomes visible.In our case if V = 4 the cover and the stego image are visually indistinguishable.Note that for V = 4 the simple attacks like χ 2 might be ineffective.Fig. 2 shows watermarks M b and M g extracted from the bit plane and the Gray plane after compression with the quality parameter q = 90.These watermarks are obtained by non-blind detection.The M g has better visual quality and better distortion measures.For example, Fig. 2 presents PSNR averaged on 80 images.Indeed, these images are from the collection of Caprichos by de Goya.They have a complicated texture and it allows watermarking of significant bit planes.For the quality parameter q > 50, this range has the most interest, PSNR of M g is in the range from 15 to 30 dB that refers to satisfactory visual quality.
The found results shows that Gray planes are more preferable for watermarking if the image would be store in jpeg file.

Detection from the bit plane and the Gray plane
Here we consider the blind and non-blind detection for set of 200 grayscale images.The watermark was embedded in the Gray planes planes G 2 , G 3 , G 4 with q = 70, 80, 90 and the set of distortion measures d(M, X) defined by (7) were computed.Fig. 3 shows Euclidean distance and relative entropy averaged on 200 images for various V .All functions are decreasing monotonically.The treason it that the less significant plane is the larger its redundancy destroyed by the compression.The measures are represented for the quality parameter q = 80, which is not the most preserving mode of compressing.It follows that the the non-blind detection has better distortion measures between M and M g as for Euclidean distance and relative entropy.This is true for P SN R also.Fig. 3 presents two histograms of Euclidean distance and relative entropy.They describe distribution of its value found from the base of 200 images.These distributions are well distinguishable distributions, it means that the embedding methods have significant difference.
It follows from the found results that non-blind detection shows less distortion of the extracted watermarks after compression.

Conclusion
The Gray planes of digital image can be suitable for hiding information.In spatial domain the LSB embedding has the same features as for bit as for Gray planes and results in difference if the image will be storied in a graphical format that has lossy compression as JPEG.There are various detection procedures to extract the hidden data after compression, particular a blind detection is possible.By analyzing a set of distortion measures as Euclidian distance, P SN R, relative entropy it has been found that embedding and detection of watermark from the Gray planes is better than for the case of bit planes.

Figure 1 :PSNRFigure 2 :
Figure 1: Embedding into the bit plane and the Gray plane: the binary watermark (a); the grayscale image (b); the watermark detected from the bit plane, q = 90 (c); the watermark detected from the Gray plane, q = 90 (d).W