Bull. Hiroshima Inst. Tech. Research Vol.49（2015）97-108

ArticleJPEG-Based Image Enhancement Method with Steganographic Data Embedding
and Its Performance Evaluation
Isao FURUKAWA* and Junji SUZUKI**（Received Oct. 31, 2014）

Abstract
We propose a concrete conﬁguration that enables a sender who has high resolution images to embed high frequency components of the images in the JPEG codes for lower resolution images using
steganographic data embedding method. In this conﬁguration, public receivers of the JPEG ﬁles
can decode low resolution images, while speciﬁc receivers who know the fact that the high frequency components are embedded in the JPEG ﬁles can obtain high resolution images by extracting theembedded enhancement codes. For this purpose, three key methods are developed: a construction
method for 16×16 higher frequency quantized DCT coefficients in the encoder, an embedding
method to 8 × 8 lower resolution quantized DCT coefﬁcients in the encoder, and an extraction method for the enhancement codes in the decoder. Moreover, it is clariﬁed that the embedding operation
for the enhancement codes can be omitted under speciﬁc conditions. As a result of simulation experiments that employ the proposed key methods are executed using natural images, the performance of the system is evaluated in terms of a total amount of enhancement codes, a relationshipbetween quantization quality factors for lower and higher frequencies, a payload for embedding enhancement codes, and SNR characteristics.
Key Words: steganography, image enhancement, JPEG compression, DCT, entropy coding

casting has to be selected.
In general, higher resolution image is morevaluable than lower resolution image. This can beseen in the trend that pursues high resolution images
in digital cameras and 4K broadcasting (3840×2160
pixels) as well as 4K speciﬁcation (4096×2160 pixels) of the digital cinema. The media communication of the present low resolution image in the Internet or HDTV broadcasting system have a possibility
that enhance the media quality for speciﬁc members
who know secret information of high resolution images, if the information of high resolution images
can be embedded in the compression codes used in
the existing communication systems and the resulting compression codes have a compatibility with the

1. INTRODUCTION

Currently, various kinds of images and videos are
distributed on the Internet, and high deﬁnition television (HDTV) is already implemented in digital
broadcasting. The compression methods such as
JPEG and MPEG are inevitable for the distribution
in the Internet and broadcasting because the images
and videos have very large data size in comparison
with the transmission speed or bandwidth in the line
and wireless communications. The important parameters that decide the size of the transferable image
data include image resolution, so that the image resolution suitable for the limit of the transmission capacity available to the communication and broad＊＊＊＊＊＊Department of Computer Science, Faculty of Applied Information Science, Hiroshima Institute of Technology
School of Information Science and Technology, Aichi Prefectural University― 97 ―

Isao FURUKAWA and Junji SUZUKI

original compression code format. In this paper, wecall such a mechanism an image enhancement method with steganographic data embedding.
Although a challenge toward the quality enhancement along with the above mentioned method
has been studied for speech signals [1], no investigations for images or videos are known so far. The image enhancement method that estimates a high resolution image from several frames of the an identicalscene [2], or makes higher frequency components
with non-linear ﬁltering [3] are studied recently, anda similar technique is also applied to the up-conversion to 4K video from HDTV content. These techniques are called SR (super resolution), and basicallythey are ill-posed problems. This means that it is notguaranteed to obtain the true high frequency components.
In this paper, we discuss the image enhancement
method with steganographic data embedding inwhich the sender, who has high resolution images,
embeds the higher frequency components to the lower frequency components, while the receiver recon-

structs high resolution images by extracting the embedded enhancement data. In Section 2 , basic
system conﬁguration to realize the above scenario ispresented. The embedding and extracting methods
for the enhancement codes are described in Section 3.
In Section 4, special conditions that can avoid embedding the enhancement codes are discussed when
the payload for the embedding is critical. The performance evaluation is demonstrated in Section 5,
and conclusions are given in Section 6.
2. SYSTEM CONFIGURATION

Figure 1 shows the basic conﬁguration for the image
enhancement method with steganographic data embedding. The encoder and the decoder have the following functions.
(a) Encoder:This is a special encoder that makes JPEG compressed file for N×N resolution image. In this encoder, a 2N×2N resolution image, namely original
image, is transformed with 16×16 DCT，and thequantized DCT coefﬁcients except 8×8 DCT coefﬁ-(a) Steganographic JPEG encoder(b) Standard JPEG and steganographic JPEG decoders
Fig. 1 Conﬁguration of steganographic JPEG encoder/decoder and standard JPEG decoder.

― 98 ―

JPEG-Based Image Enhancement Method with Steganographic Data Embedding and Its Performance Evaluationcients are entropy coded and then embedded into 8×
8 quantized DCT coefﬁcients.

the quality factor, QF2, for the quantization of higher
frequency DCT coefﬁcients. The payload available
for embedding the enhancement codes are also determined by the quality factor, QF1, for the quantizationof lower frequency DCT coefficients. In practice,
the balancing among quality factors, QF1, QF2, andnumber of scans, scan, is a prominent issue.

(b) Decoder:This decoder includes standard and special decoders.
・The standard decoder receives JPEG compressedﬁle for N×N resolution image, and reconstructs theimage conforming to the JPEG speciﬁcation.
・The special decoder receives JPEG compressed ﬁlefor N×N resolution image, and reconstructs a 2N×2N
resolution image. The 16×16 quantized DCT coefﬁcients are recovered with the extracted enhancement
codes from 8 × 8 quantized DCT coefﬁcients.

3. EMBEDDING ENHANCEMENT CODE

The ranges of DC and AC of the quantized DCT coefficients in JPEG are restricted within [ 2047, ...,
+2047] and [ 1023, ..., +1023], respectively. The LSB(least significant bit) embedding to DC coefficientdegrade the image quality [5]，so that the LSB embedding to and extracting from only AC coefﬁcients
is considered in the system. First of all, the bit embedding is applied to 1st LSB of all the available
quantized DCT coefficients. If there remain moreenhancement codes, then 2nd LSB of all the available quantized DCT coefﬁcients are used, and so on.
In this case, the following two points must be considered.
(1) Minimizes the distortion by embedding enhancement codes.
(2) The range of AC coefficients after embedding
enhancement codes should be within [ 1023, ...,
+1023].
Of these, (1) means the embedding must be done in
the order of 1st, 2nd, 3rd, ... LSBs, though what frequency range has high priority is an open problem.
On the other hand, (2) determines the maximum allowable number of LSBs for embedding. For example, DCT coefﬁcient of +1023 can be embedded up
to 9th LSB because + 1023D = 03FFH = 0000 0011
1111 1111B (the subscripts D, H, and B mean decimal，hexadecimal, and binary notations, respectively) for positive DCT coefﬁcients, and this value cannot exceed +1023 if 0s or 1s are embedded up to 9
LSBs. In the case of negative DCT coefﬁcients, if a
0 is embedded in 1st LSB then 1023D = FC01H =1111 1100 0000 0001B obviously becomes out of permissible range because 1024D = FC00H = 1111 1100
0000 0000B.
The theoretical allowable number of bits forembedding is determined in such a way that the resulting allowable number of bits after embedding

Fig. 2 Scan pattern for high frequency DCT coefﬁcients.

The encoder is divided into two parts: one encodes 8×8 quantized DCT coefficients obtained
from 16×16 DCT coefﬁcients, the other encodes 16
×16 quantized DCT coefficients except 8×8 DCT
coefﬁcients. The scanning pattern for the DCT coefficients of higher frequency in the latter encoder issimply along the L-shaped lines as shown in Fig. 2.
The numbers of higher frequency quantized DCT
coefﬁcients on scan = 1～8 are 17, 19, 21, 23, ..., 31,
respectively, and the total number of the higher
frequency DCT coefﬁcients is at most 192.
The enhancement entropy codes using runlength Huffman encoding are constructed with a default JPEG table for zigzag scanned AC coefﬁcients.
Note that the enhancement entropy codes include
only special EOB (end of block) code, if all the higher frequency quantized DCT coefficients are zeros.
Only the enhancement for the luminance component
is considered for the proposed system because it isshown that most of the enhancement codes comprisethe luminance component [4].
The amount of enhancement codes depends on― 99 ―

Isao FURUKAWA and Junji SUZUKI

random m bits is not different from that before
embedding. This condition has a role to carry possible number of bits for embedding from the encoder
to the decoder. For example, it can be decided in theencoder that m is 9 for the quantized DCT coefficients ranging from +1023 to +512. It also can be decided in the decoder that m is 9 because the quantized DCT coefficients ranging from +1023 from+512 are still within the same range even if random
bits are embedded up to 9 LSBs.
It is necessary to pay an attention that the resulting coefﬁcients after LSB embedding do not transit
beyond 1024 for negative DCT coefﬁcients. For example, the number of allowable bits for 1023 is zero
because the embedding to 1st LSB results in 1024,
and it is out of permissible range as described above.
The coefficients of 1022 and 1021 are allowed toembed up to 1st LSB because 2nd LSB is 1, and theembedding 0 to 1st LSB results in the coefficientfrom 1021 to 1022. This restriction is imposed tothe coefﬁcients less than 513, in which 10th LSB becomes 0. In this case, the allowable number of bits
should be 8 because 513D = FDFFH = 1111 1101 1111
1111B, and the coefficient transits to 1024 if 0s areembedded in all the 9 LSBs. A part of the allowable
number of bits, m, for embedding to the LSBs of thenegative DCT coefﬁcients is shown in Table 1.
Table 1 Example of allowable number of bits for embedding tonegative DCT coefﬁcients (D, H, and B mean decimal,
hexadecimal, and binary notations, respectively).

D

H

B

m

⋮

⋮

⋮

⋮

－256

FF00

1111

1111

0000

0000

7

－257

FEFF

1111

1110

1111

1111

8

⋮

⋮

⋮

⋮

－512

FE00

1111

1110

0000

0000

8

－513

FDFF

1111

1101

1111

1111

8

⋮

⋮

⋮

⋮

－768

FD00

1111

1101

0000

0000

8

－769

FCFF

1111

1100

1111

1111

7

⋮

⋮

⋮

⋮

Consequently, we have a formula that describes
the relationship between the permissible number ofenhancement bits, m, and the quantized DCT coefﬁcient value, DCTq, as (1).

(1)

Although the above formula shows a theoretical permissible number of bits for embedding, the embedding to higher LSBs leads to larger distortion inpractice. For positive DCT coefficients (except 0
and 1), maximum distortion for the quantized coefﬁcients, 2m ≤ DCTq ≤ 2m+1 －1, that allow embedding
up to m LSBs is 2m－1. Therefore, there is a possibility that m should have an upper limit because the image quality would be largely degraded in this case.
4. AVOIDING EOB CODE EMBEDDING

The visible quality of enhanced image will require
high SNR when the bit embedding is performed in
LSBs of lower frequency quantized DCT coefficients, and this requirement suggests the quality factor, QF 1, for lower frequency DCT coefficientsshould be higher than the default value of 50. Therefore, ﬁrst of all, we examine the total amount of entropy codes produced from lower and higher frequencies for two combinations of (QF1, QF2), i.e. (80,80) and (80, 50). The number of scans for higher frequency quantized DCT coefﬁcients is set to 8 for all
combinations.
Figure 3 shows the distribution of entropy codes
for the luminance component of lower and higher
frequencies per 16 × 16 block for two images (theseimages, L3 and H3, will be explained in Section 5).
The result demonstrates that the amount of enhancement codes for blocks having relatively low JPEG
entropy codes is only 4 bits that correspond to the
EOB code. Furthermore, it is not recognized that astrong dependency exists between the amount of entropy codes for lower and higher frequencies. Notethat the entropy codes for higher frequency, which
are embedded in the LSBs of the lower frequency
quantized DCT coefﬁcients, increase with the quality
factor, QF2, and the number of scans.

― 100 ―

JPEG-Based Image Enhancement Method with Steganographic Data Embedding and Its Performance Evaluation

It is impossible to embed the enhancement
codes to LSBs of quantized DCT coefﬁcients when
the 8×8 lower frequency DCT coefﬁcients consist of
only DC component, i.e. 63 AC components are all
zeros. We can reasonably assume that all the higher
frequency quantized DCT coefficients are zeros
when 8×8 lower frequency DCT coefficients consists of only DC component because the minimum
length of the enhancement code for luminance component is 4 bits (EOB code).
In general, there is a special case that can avoid
EOB code embedding to LSBs of 8×8 quantized
DCT coefﬁcients in the encoder and also can reconstruct all-zero higher frequency quantized DCT coefficients in the decoder: all the higher frequency
quantized DCT coefﬁcients are zeros (the enhancement code includes only EOB)，and the payload,
which represents the number of available bits forembedding, is less than 4. The decoder can easily
determine whether these conditions follow. Moreover a distortion that could be added to the 8×8
quantized DCT coefﬁcients by embedding EOB code
to the LSBs does not occur in this case. Notice thatthe permissible payload for 8×8 quantized DCT coefficients can be determined using the method described in Section 3.
Table 2 Possible combinations of lower and higher frequency

quantized DCT coefﬁcients.

Higher DCT coefﬁcients
Lower DCT
coefﬁcients

All zero

Not all zero

DC only

Case 1Case 2

DC + ACs

Case 31)

Case 4

1) Case 3 includes a payload less than 4 even if the higher fre-quency quantized DCT coefﬁcients are not all zero.

Table 2 shows the possible combinations between 8 × 8 lower frequency quantized DCT coefﬁcients and 16×16 higher frequency quantized DCT
coefﬁcients excluding 8×8 coefﬁcients. The state oflower frequency DCT coefﬁcients is divided into twocases: DC only and DC+ACs, and the state of higher
frequency DCT coefﬁcients is also divided into twocases: all zero or not all zero.
The four cases in Table 2 are explained as follows:◦ Case 1: The lower frequency quantized DCT coefﬁcients include only DC component and all thehigher frequency quantized DCT coefficients are
zeros, so that it is impossible to embed the enhancement codes.
◦ Case 2: The lower frequency quantized DCT coefﬁcients include only DC component and higher
frequency quantized DCT coefficients include
non-zero components, so that it is impossible toembed the enhancement codes. It is in questionthat the case 2 appears for real images because thecase corresponds to an extreme condition in which
the enhancement codes excluding EOB exist even
if the lower frequency quantized DCT coefﬁcients
include only DC component.
◦ Case 3: The enhancement codes (EOB code only)
can be embedded if the payload of the lower frequency quantized DCT coefﬁcients is greater thanor equal to 4. When the payload is less than 4, it is
impossible to embed the enhancement code, sothat the case 3 includes the situation. In this case,
all the higher frequency quantized DCT coefficients are forced to all zeros in the decoder even if
these coefﬁcients are not all zeros in the encoder.
This situation is similar to the case 2, and it is alsoin question that this situation appears for real images.
◦ Case 4: This is the most popular case. It is impossible to embed the enhancement codes if the
payload is less than enhancement code length.
The basic idea of above mentioned cases is asfollows. The enhancement codes are not embeddedin the encoder when cases 1, 2, and 3 follow. All thehigher frequency quantized DCT coefficients areforced to zeros as if the EOB code is extracted in the
decoder when the lower frequency quantized DCT
coefﬁcients include only DC component or its payload is less than 4. Therefore, cases 1, 2, and 3 canbe distinguished in the encoder, though the case 2
cannot be distinguished in the decoder despite thedistinguishability between cases 1 and 3. In the case3, all the higher frequency quantized DCT coefficients in a block having the payload less than 4 are
set to zeros because the decoder cannot decide
whether all these coefﬁcients are zeros or not in theencoder.

― 101 ―

Isao FURUKAWA and Junji SUZUKI(a) L3 image, (QF1, QF2) = (80, 50)(b) L3 image, (QF1, QF2) = (80, 80)(c) H3 image, (QF1, QF2) = (80, 50)(d) H3 image, (QF1, QF2) = (80, 80)

Fig. 3 Distribution of entropy codes for lower- and higher-band frequencies per 16×16 block.

5. PERFORMANCE EVALUATION

It can be impossible to embed the enhancement
codes according to the combination of quality factors, QF1 and QF2, and the number of scans of higher
frequency DCT coefficients, scan, when the 8×8
quantized DCT coefﬁcients include only DC component and it is not allowed to embed the enhancement
codes to the DC component. The method for avoiding EOB code embedding described in Section 4 alleviates the problem. We incorporate the proposed
techniques described in Sections 3 and 4 into the basic system conﬁguration shown in Fig. 1, and evaluate the performance of the image enhancement
method with steganographic data embedding for real

images.
The performance evaluation is focusing on thefollowing measures using various combinations of(QF1, QF2, scan).
◦ Rate of enhancement codes against JPEG codes◦ JPEG compression ratio◦ SNRs of JPEG image and enhanced image◦ Embedding capability of enhancement codes
Six real images [4] are chosen for the experiment,
and here, only the results for L3 image (672×544
pixels) and H3 image (2048×2048 pixels) are demonstrated for explanations. These original images
are shown in Figures 4 (a) and 5 (a).
Figures 4 and 5 ((b), (c), and (d)) shows the rateof enhancement codes against JPEG codes, JPEG

― 102 ―

JPEG-Based Image Enhancement Method with Steganographic Data Embedding and Its Performance Evaluation

compression ratio, SNRs of JPEG image (SNRlow)
and enhanced image (SNRhigh), respectively, for images L3 and H3 in case of scan=1. In all these Figures, the horizontal axis is for the lower frequency
quality factor, QF1. The rate of enhancement codes
against JPEG codes is shown for various higher frequency quality factors, QF2s. In the Figure of JPEG
compression ratio, the blue arrows show that it is impossible to embed the enhancement codes if thehigher frequency quality factor is greater than thevalue attached beside the arrow. SNRlow and SNRhigh
are SNRs when the higher frequency quality factor isset to 40. The properties for each image can be estimated from the data using scan=1 because abovemeasures do not change widely for the number ofscans except images having much higher frequency
component such as L2 image.
The simulation results are summarized as follows:
1) The selection of QF1 has a great impact on SNRlow
and JPEG compression ratio, while the selectionof QF2 has a little contribution to SNRhigh.
2) The range of parameter selections that enables toembed the enhancement codes is expanded widely. These area include situations that the lower
frequency quantized DCT coefficients has only
DC component, and all the higher frequency
quantized DCT coefﬁcients are zeros or the payload is less than 4 when lower frequency quantized DCT coefﬁcients has non-zero AC compo-

nents.
3) The upper limits of the amount of enhancement

codes that can be embedded in the LSBs of thelower frequency quantized DCT coefficients are
1.5～4.5%, 2.9～4.5%, 2.1～7.0%, 2.2～11.0%, 1.2～4.7%, 1.6～5.4% for L1, L2, L3, H1, H2, H3 images, respectively (including all scanning cases)．
In particular case of scan=8, the upper limits arearound 2% against the JPEG code length. The
images L2 and L3 need the quality factor, QF2,
less than 40 in order to enable the enhancement
code embedding with scan=8.
4) If the QF1 is ﬁxed, then the range of the combination (QF1, QF2, scan) that enables the enhancement code embedding becomes narrower, though
SNRs of JPEG and enhanced images do not virtually change (the former degrades a little, while
the latter improves a little, and this matches theintuition).
Figures 6 and 7 show enlarged partial scenes of
JPEG and enhanced images for images L3 and H3
using two combinations of parameters, (QF1, QF2,scan), shown in Table 3.

(a) L3 image,(QF1, QF2, scan) = (95, 55, 4)

Table 3 Simulation parameters for Figs. 6 and 7.

image

Combinations of (QF1, QF2, scan)
Combination-1

Combination-2

L3(95, 55, 4)(80, 45, 2)

H3(95, 65, 8)(80, 55, 3)(b) H3 image,(QF1, QF2, scan) = (95, 65, 8)

Fig. 8 Enhancement code length embedded to LSBs of 8×8 quantized DCT coefﬁcients (The luminance values have a range from 0 to 255
in such a way that the maximum enhancement code length corresponds to 255).

― 103 ―

Isao FURUKAWA and Junji SUZUKI

For both images, although JPEG images are coarser
than the enhanced images, the combination-2 in Table 3 leads to some degradation such as block noise.
Therefore, much attention should be paid for selecting the parameters to prevent perceptual image degradation.
Figure 8 shows the amount of enhancement
codes (run-length Huffman codes) embedded to
LSBs of 8×8 quantized DCT coefﬁcients with theparameter combination-1 shown in Table 3 for images L3 and H3. In this figure, the luminance values
have a range from 0 to 255 in such a way that the
maximum enhancement code length corresponds to255, so note that the amount of enhancement codes
differs between these images. It can be seen that the
textured scene produces large enhancement codes forboth images, and the enhancement code length also
depends on the color for H3 image (green generates
larger enhancement codes).

ables enhancement code embedding. These parameter combinations cannot be much lower because
coarse quantization or lack of many DCT coefﬁcients
could cause the aliasing distortion when viewing thissystem as a DCT-IDCT ﬁlter bank. This aliasing distortion is perceives as block noise or pseud-contour.
Our future topics are to study how much aliasing distortion can be permissible and how to embedthe enhancement codes efficiently from the view
point of perceived quality.

REFERENCES[1] N. Aoki, ＂Band extension of telephony speech using
steganography,＂ IEICE Technical Report, SP2006-81,
pp.31-36, Nov. 2006.
[2] A. Katsaggelos, R. Molina, and J. Mateos, Super
Resolution of Images and Video: Chapter 2 Bayesian
formulation of super-resolution image reconstruction,
pp.13-17, Morgan & Claypool, 2007.
[3] Y. Takada and K. Urahama, ＂ Super-resolution of

6. CONCLUTION

single image with interactive reconstruction using

In this paper, we proposed the image enhancement
method with steganographic data embedding. The
proposed embedding scheme for the enhancement
codes enlarged possible parameter combinations tothe case that the 8×8 quantized DCT coefficients
have only DC component. Under this condition, we
measured the rate of enhancement codes against
JPEG codes, JPEG compression ratio, and SNRs of
JPEG and enhanced images for relatively low andhigh resolution real images. In addition, examplesof JPEG and enhanced images were shown with twoparameter combinations of (QF1, QF2, scan) that en-

anisotropic bilateral filter,＂ IEICE Technical Report,
IE2009-114, pp.89-94, Nov. 2009.
[4] I. Furukawa and J. Suzuki, ＂ A novel approach ofimage enhancement using steganographic data
embedding and JPEG scheme,＂ Bull. Hiroshima Inst.
Tech. Research, Vol.48, pp.93-103, Feb. 2014.
[5] A. Westfeld, ＂High capacity despite better steganalysis― 104 ―

(F5 - a steganographic algorithm),＂ In I. S. Moskowitz,
editor, Information Hiding, 4 th Int. Workshop,
Vol.2137 of LNCS, pp.289-302, Springer-Verlag, New
York, 2001.

JPEG-Based Image Enhancement Method with Steganographic Data Embedding and Its Performance Evaluation(a) L3 original image(b) Rate of enhancement codes(c) Compression ratio for JPEG image(d) SNRlow and SNRhigh

Fig. 4 L3 original image and experiment results of embedding enhancement codes.

― 105 ―

Isao FURUKAWA and Junji SUZUKI(a) H3 original image(b) Rate of enhancement codes(c) Compression ratio for JPEG image(d) SNRlow and SNRhigh

Fig. 5 H3 original image and experiment results of embedding enhancement codes.

― 106 ―

JPEG-Based Image Enhancement Method with Steganographic Data Embedding and Its Performance Evaluation(a) Original image (160×160 pixels)(b) JPEG image,(QF1, QF2, scan) = (95, 55, 4)(c) Enhanced image,(QF1, QF2, scan) = (95, 55, 4)(d) JPEG image,(QF1, QF2, scan) = (80, 45, 2)(e) Enhanced image,(QF1, QF2, scan) = (80, 45, 2)

Fig. 6 Enlarged partial scenes of JPEG and enhanced images for L3 image.

― 107 ―

Isao FURUKAWA and Junji SUZUKI(a) Original image (160×160 pixels)(b) JPEG image,(QF1, QF2, scan) = (95, 65, 8)(c) Enhanced image,(QF1, QF2, scan) = (95, 65, 8)(d) JPEG image,(QF1, QF2, scan) = (80, 55, 3)(e) Enhance image,(QF1, QF2, scan) = (80, 55, 3)

Fig. 7 Enlarged partial scenes of JPEG and enhanced images for H3 image.

― 108 ―