Chapter 2 Review of Related Works and JPEG XR Standard
2.4 Review of JPEG XR Standard
2.4.3 Process of decoding of JPEG XR file
The JPEG XR decoder consists of two major parts: the parsing process and the decoding process, described as follows.
(1) The parsing process consists of steps described as follows:
i. image layer and tile layer codestream parsing;
ii. macroblock layer codestream parsing which includes parsing the transform coefficients and inverse scanning; and
iii. adaptation of VLC table selection and context models.
(2) The decoding process consists of steps described as follows:
i. coefficient remapping;
structures such as image header and compressed data of the frequency domain. These data will be inversely transformed into the original coefficients of the frequency domain by inverse scanning and the VLC table selection.
After the parsing process, the decoder re-maps the original coefficients to correct positions in the image. And the transform coefficients may be predicted from the neighboring coefficients in the coefficients prediction process. Then, the transform coefficients are scaled by the quantization parameter in the de-quantization process.
The decoder takes a two-level inverse transform from the frequency domain to the spatial domain. The inverse transform process consists of the following steps.
The coefficients of DC and lowpass bands are grouped into a DC_LP array as input data for the first-level transformation including the following steps:
− first-level inverse transform;
− when indicated, a first-level overlap filtering.
The resulting coefficients of the first-level transformation are combined with the highpass coefficients into the new input data for the second-level transformation including the following steps:
− second-level inverse transform;
− when indicated, a second-level overlap filtering.
An inverse core transform (ICT) is applied to 4×4 blocks, which is an inverse transform function of the FCT. The ICT operation transforms the frequency domain into the spatial domain, whose function is like the IDCT operation.
The overlap filtering is an inverse function of the pre-filtering, which is also optionally applied to 4×4 areas evenly straddling blocks in two dimensions. On the boundary, the overlap filtering operation is applied to 4×2 or 2×4 areas. And the overlap filtering operation does not work in four 2×2 corners.
Finally, the decoder converts the coefficients into OUTPUT_COLOR_FORMAT
for image display. The flowchart of JPEG XR decoding process is shown in Figure 2.5. In this study, we focus on the color conversion of the YUV model to the RGB.
The function of converting the YUV to the RGB is shown as follows:
2
2
t U
G Y t
R t G V
B V R
= −
= −
= + −
= +
(2.2)
Figure 2.6 Block diagram of JPEG XR format decoding process.
Chapter 3
Covert Communication via JPEG XR Images by Variable Macroblock Quantization
3.1 Introduction
Because of the rapid expansion of the Internet, the message transmitted through the Internet is not confidential nowadays. Private messages may be subject to sniffing attack by malicious people. To solve this problem, a common method is to use cryptography to protect the secret message. However, it is hard to conceal the action of secret communication via cryptography because the resulting stego-message usually is noise-like and often arouses suspicion from attackers. For the purpose of data confidentiality and covert communication, we propose a method to hide secret data via JPEG XR images.
In this chapter, we will describe the proposed data hiding technique via JPEG XR images. The major idea of the proposed method will be described n Section 3.1.2.
The detailed data hiding and extraction processes will be given in Sections 3.2.2 and 3.2.3, respectively. In addition, some security enhancement measures for the proposed method will be proposed in Section 3.3.2. And some experimental results will be shown in Section 3.4. Finally, we will give a brief summary of this chapter in Section 3.5.
3.1.1 Problem definition
The JPEG XR images have become more and more popular nowadays, but researches of data hiding via them are not found yet according to a survey conducted in this study. Therefore, it is desired to develop a data hiding technique via JPEG XR images. The goal is to embed the secret message into a cover image without causing noticeable distortion. It is hoped that when the stego-image is transmitted to a receiver, other people will consider the behavior of transmission just as an activity of image sharing rather than secret communication. Only the receiver can extract the secret message from the stego-image with a secret key. Therefore, the aim of data hiding in JPEG XR images is how to design a method for embedding data imperceptibly and extracting the embedded data correctly. In addition, even a person knows the algorithms of the method, he/she still cannot extract the secret data without the secret key.
3.1.2 Major idea of proposed method
The proposed method is essentially based on the utilization of certain special characteristics of the JPEG XR format in the quantization of the FCT (forward core transform) coefficients in the frequency domain. In this aspect, the quantization process of the JPEG XR standard is different from that of the old JPEG standard. In the latter, a fixed 8×8 quantization table is used to quantize the DCT coefficients of every 8×8 blocks. Unlike this, the new JPEG XR standard supports variable quantization parameters for image quantization.
More specifically, before an image is compressed with tiles as units according to the JPEG XR standard, the following three sets of quantization parameters must be provided by the system for each color channel, called a component, of each tile for the
purpose of quantizing the FCT coefficients yielded by the compression process:
(1) a DC quantization parameter;
(2) a lowpass quantization parameter set SL; (3) a highpass quantization parameter set SH.
After these parameter sets are used to quantize the FCT coefficients, four quantization value for smooth areas and a small one for sharp areas will reduce data volumes and improve image qualities.
Additionally, each of the highpass and the lowpass parameter sets SH and SL is allowed to include at most 16 parameters, each of which is user-selectable for use in quantizing the FCT-coefficients for various application requirements. Use of these 16 parameters variably means that we may use them to encode 4 message bits for the purpose of data hiding. And this is just the idea of using variable quantization in JPEG XR image compression we propose for data hiding in this study.
Furthermore, for the purpose of reducing distortion, only the highpass band is used in the proposed data hiding method. This way provides an advantage which is not gained by the standard JPEG XR compression (such as by the compression
operation offered by the application software Adobe Photoshop) which quantize all bands of frequencies, not just the highpass band --- that is, the distortion coming from re-quantization using the proposed method is smaller than that produced by the standard compression provided by commercially-available JPEG XR software.
3.2 Proposed Method for Covert Communication
3.2.1 Information hiding by variable macroblock quantization
A configuration of the proposed system for covert communication is shown in Figure 3.1. As can be seen from the figure, the proposed method adopts a strategy of after-encoding and before-decoding secret processing (including hiding and extraction). That is, the secret is embedded into a cover image after the image is encoded to become a JPEG XR file, and the hidden secret is extracted from the JPEG XR file of a stego-image before the file is decoded for display. Note that this is not the strategy adopted in some other methods for covert communication [11-12].
Owing to the above-mentioned strategy of secret processing, we have to design a special JPEG XR file data extractor for use in this study to extract the image information from the bitstream of the cover image and a special data embedder to insert secret data into the bitstream. Furthermore, the information of the cover image has been changed after data hiding. We therefore also need to design a special JPEG XR file data encoder to re-encode the bitstream into a stego-image. In short, to design
“devices” in it: (1) a JPEG XR file data extractor; (2) a data embedder, and (3) a JPEG XR file data encoder.
Figure 3.1 The flowchart of data embedding and extraction via the un-decoded JPEG XR file format.
After the devices are designed, we increase the number of quantization parameters of the highpass bands to be 16 for hiding 4 bits per macroblock, as mentioned previously. Because the distortion of the stego-image depends on the quantization parameters, how to select the new quantization parameter values to yield less distortion is an important issue. According to the experimental results of some compression distortion test conducted in this study as shown by Figure 3.2, Table 3.1, and Figure 3.3, we found four facts about the relationships between the distortion and the selected quantization parameter value, which are described in the following.
i. Smaller quantization parameter values have a tendency to cause less distortion.
ii. If a new quantization parameter value is one of the factors of the original
one, the re-compressed image will have a slight distortion.
iii. The distortion will be rapidly raised when a quantization parameter value is larger than a multiple of the original quantization parameter value.
iv. The trend line of distortion is smooth between the original quantization parameter value and its double.
Based on the above observations, candidate values for use as selected quantization parameters are classified into four groups according to the priority of being used as new quantization parameters. The first group has a top priority, being composed of the factors of the original quantization parameter value. The second group has the second highest priority, consisting of the candidate parameter values which are other than the candidate values in the first group and are smaller than the original quantization parameter value. The third group has the third highest priority, which contains candidate parameter values between the original quantization parameter value and its double. And the last group has the lowest priority, which includes candidate parameter values larger than a double of the original quantization parameter value.
It is observed in this study that using larger quantization values will cause smaller volumes of compressed image data. For this reason, the priority of the candidate parameter values in each group is sorted according to their magnitudes; a larger parameter value is given a higher priority. However, the distortion of the last group is rapidly raised in accordance with the growth of the magnitude of the parameter value. So in the last group, a smaller parameter value instead is given a higher priority.
After new quantization parameters are selected for use, we can start to embed secret data in the cover image. At first, the new quantization parameters are inserted
standard. Next, the secret data are converted into 4-bit segments, and each segment is transformed into a decimal number ranging from 0 to 15. Then, in order to improve the security of the secret data, we use a one-to-one mapping function controlled by a secret key to transform the decimal numbers into new ones randomly. The result of the one-to-one mapping also ranges from 0 to 15 and forms a set of new quantization parameter values, called parameter indexes. Finally, these indexes are inserted into the bitstream to specify the corresponding quantization parameter in each macroblock.
After these steps, the secret data are completely embedded into the cover image, and people who do not know the secret key cannot extract the secret data.
Figure 3.2 The original image used for compression distortion test, for which the applied quantization value is 15. In this study, we call this image
“Two_dogs.”
Table 3.1 The relationship between compression ratios and PSNRs. The quantization value of the original image is 15. QP is the quantization parameter used for compression. QP = 0 means that the quantization parameter value 1 when encoded by the JPEG XR standard.
QP 0 1 2 3 4 5 6 7
PSNR 68.524 68.490 56.450 68.396 52.798 68.221 52.799 54.299
QP 8 9 10 11 12 13 14 15
PSNR 47.473 48.971 50.105 49.130 49.844 51.136 54.049 66.430
QP 16 17 18 19 20 21 22 23
PSNR 41.101 41.363 41.578 41.623 41.819 41.734 41.875 41.069
QP 24 25 26 27 28 29 30 31
PSNR 41.192 41.344 41.325 41.427 41.525 41.661 41.745 38.476
QP 32 33 34 35 36 37 38 39
PSNR 38.476 38.541 38.645 38.541 38.639 38.685 38.751 37.039
Figure 3.3 The scatter plot with smooth lines of relationship between compression ratios and PSNRs. The quantization value of the original image is 15. The quantization parameter is used for compression.
However, if we only change the quantization values of each macroblock without re-quantizing the highpass coefficients, it will cause large distortion in the resulting image. To solve this problem, we also quantize the highpass-band coefficients by the selected quantization parameter values. More specifically, we decode first the bitstream of each macroblock to extract the original quantization parameter values and the highpass coefficients. Then, the coefficients are de-quantized by the extracted original quantization parameter values and re-quantized by the newly-selected quantization parameter values. In this way, the distortion of stego-images is found to be under control. Finally, we encode the coefficients into bitstreams according to the JPEG XR standard and the result is transmitted to the receiver. The above-described secret data embedding process is illustrated by Figure 3.4.
In the data extraction process, we extract the quantization parameter indexes of each macroblock and transform the indexes into decimal numbers. Then, the secret key is used again in the previously-mentioned one-to-one mapping function to recover the original input numbers. Finally, all the numbers are transformed into 4-bits strings and combined together to get the embedded secret message. The extraction process is similar to the embedding process but conducted in a reverse order, as illustrated in Figure 3.5.
3.2.2 Algorithm for data embedding
In this section, the detailed algorithm of data embedding will be introduced. We give a brief description of the algorithm and its input and output parameters here first.
A secret message S which, with the data length of l bytes, will be embedded into a cover JPEG XR image I. The length l is transformed into a 16-bit unsigned integer, which will then be embedded into the first four macroblocks M1, M2, …, M4 of a tile.
The message S will be separated into 2×l 4-bit segments and embedded into the
remaining macroblocks M5, M6, …, M2×l + 4. And the method uses a secret key K and a random number generator f to conduct random 1-to-1 mappings from the range of 0, 1, …, 15onto the same range of 0, 1, …, 15 in the algorithm. The detail is described in the following.
Algorithm 3.1. Data embedding for covert communication.
Input: a user key K, a random number generator f, a secret message S with character length l, and a cover JPRG XR image I with N macroblocks.
Output: a stego-JPEGX XR image I'.
Steps:
Step 1. Check if 2×l − 4 ≤ N; if so, continue; otherwise, regard S as too big to be embedded into I and exit.
Step 2. Transform l and S into a series of decimal numbers l1, l2, …, l4 and i1, i2, …, i2×l according to the following steps, where 0 ≤ l1, l2, …, l4 ≤ 15, 0 ≤ i1, i2, …, i2×l ≤ 15.
2.1 Separate l and S into a series of 4-bit segments s'1, s'2, …, s'4 and s1, s2, …, s2×l, respectively.
2.2 Transform s'1, s'2, …, s'4 and s1, s2, …, s2×l into a series of decimal numbers d'1, d'2, …, d'4 and d1, d2, …, d2×l, respectively, where 0 ≤ d'1, d'2, …, d'4 ≤ 15 and 0 ≤ d1, d2, …, d2×l ≤ 15.
2.3 Use K and f to conduct random 1-to-1 mappings from d'1, d'2, …, d'4
and d1, d2, …, d2×l to l1, l2, …, l4 and i1, i2, …, i2×l, respectively.
Step 3. Extract the original highpass quantization parameter value Q from the bitstream of the JPEG XR file of I.
Step 4. Select new quantization parameter values q0, q1, …, q15 according to the selection priority described in Section 3.2.1, perform the following steps
with M used as a counter.
4.1 Get all the factors of Q, and perform the following steps:
i. sort the factors;
ii. select the largest 16 ones for use as q0 through q15 and set M = 16, if there are more than 16 factors; otherwise, select all of them, say m ones, as q0 through qm−1; select 0 as qm, and set M = m + 1 (where 0 means that the quantization parameter value 1 in the highpass band when encoded by the JPEG XR standard).
4.2 If M ≠ 16 (i.e., not all of the 16 qi’s are selected already), then perform the following steps; otherwise, go to Step 5:
(a) sort all the integer numbers smaller than Q and other than the qi’s selected in Step 4.1, and denote the number of these integers as the following steps; otherwise, go to Step 5:
(a) sort all the integer numbers which are smaller than 2Q + 1 and larger than Q, and denotes the number of these integers as N2Q; (b) select the largest 16 – M ones for use as qm+n+1 through q15 and set
M = 16 if N2Q – 1 > 16 – M; otherwise, select all of the sorted numbers, say o ones, as qm+n+1 through qm+n+o and set M = m + 1 + n + o.
4.4 If M ≠ 16 (i.e., not all of the 16 qi’s are selected already), then select the smallest 16 – M integers larger than 2Q for use as qm+n+o+1 through
q15; otherwise, continue.
Step 5. Insert q0, q1, …, q15 into the correct places in the bitstreams of the JPEG XR file of I to be a new quantization parameter set of the highpass frequency band.
Step 6. For each macroblock Mi into which 4-bit secret data are to be embedded, perform the following steps, where 1 ≤ i ≤ 2×l + 4.
6.1 Select the new quantization parameter value QPi of each Mi by the following rule.
a. If i ≤ 4, then
use l1, l2, …, l4 as indexes to decide the new quantization parameter values QP1, QP2, …, QP4 from q0, q1, …, q15 for M1, M2, …, M4, respectively, in the following way, where 1 ≤ i ≤ 4:
if li is the value k, then QPi is the value qk;
b. else,
use ij as an index to decide a new quantization parameter value QPi from q0, q1, …, q15 for each Mi, respectively, in the following way, where j = i – 4, 5 ≤ i ≤ 2×l + 4 , 1 ≤ j ≤ 2×l:
if ij is the value k, then QPi is the value qk.
6.2 Extract all the coefficients h1, h2, …, h240 of each Mi,and de-quantize them into h'1, h'2, …, h'240 by Q, where 5 ≤ i ≤ 2×l + 4.
6.3 Quantize h'1, h'2, …, h'240 into h''1, h''2, …, h''240 by QPi where 5 ≤ i ≤ 2×l + 4.
6.4 Repeat the above steps if 2×l + 4 ≥ i.
Step 7. Encode all new highpass coefficients into bitstreams according to the JPEG
XR standard to generate a stego-JPEG XR image I'.
Transform l and S into a series of 4-bit binary segments Separately
Figure 3.4 The flowchart of the proposed data embedding process.
Combine l1, l2, l3, l4, into length
Figure 3.5 The flowchart of the proposed data extraction process.
3.2.3 Algorithm for data extraction
The detail of the proposed secret message extraction process is described as an algorithm in the following.
Algorithm 3.2. Proposed data extraction process for covert communication.
Input: A stego-JPEGX XR image I', a user key K, and a random number generator f with K and f being identical to those used in Algorithm 3.1.
Output: A secret message S.
Steps:
Step 1. Extract the length l of the embedded data by performing the following steps.
1.1 Extract l1, l2, …, l4 by decoding the quantization parameter indexes of macroblocks M1, M2, …, M4, respectively, from the JPEG XR file of I′.
1.2 Use the key K and f to conduct random one-to-one mappings from l1, l2, …, l4 to d'1, d'2, …, d'4, and combine the mapping results to form l.
Step 2. If l = 0 or 2×l > N – 4, show an error message saying that “Wrong Key!!”;
otherwise, continue.
Step 3. For each macroblock Mi, perform the following steps to extract 4-bit secret data, where 5 ≤ i ≤ 2×l + 4.
3.1 Extract the value xi-4 by decoding the quantization parameter index of Mi from the JPEG XR file of I′.
3.2 Use K and f to conduct random one-to-one mappings from all xi-4 to all xi−4 themselves to get di-4, where 5 ≤ i ≤ 2×l + 4.
3.3 Transform di-4 into a 4-bit value si-4. 3.4 Repeat the above steps if 2×l + 4 ≥ i.
Step 4. Concatenate s1, s2, …, s2×l to form S.
Step 5. Output the desired secret message S.
3.2.4 Resuming original file size
The size of the stego-image will be changed after data hiding. For example, the file size of stego-image shown in Figure 3.8 was raised from 234572 bytes to 236623 bytes. As a result, it is necessary to resume the size to the original file in order to reduce the possibility of arousing notice from attackers during the secret communication process. In this study, we propose a method to generate a stego-image whose file size is kept to be the original one of the cover image based on the JPEG XR standard.
The JPEG XR standard uses an index_table in the JPEG XR format to indicate the start position of every tile packet. The data length L1 of each tile packet P1 is equal to the distance between its start position, denoted as T1, and the start position T2 of the next tile packet P2. If we modify T2 (i.e., increase the value of T2) of P2 in the index_table to give a larger space to P1 without changing its data length L1, there will
The JPEG XR standard uses an index_table in the JPEG XR format to indicate the start position of every tile packet. The data length L1 of each tile packet P1 is equal to the distance between its start position, denoted as T1, and the start position T2 of the next tile packet P2. If we modify T2 (i.e., increase the value of T2) of P2 in the index_table to give a larger space to P1 without changing its data length L1, there will