Sunteți pe pagina 1din 8

ICGST - GVIP Journal, ISSN: 1687-398X, Volume 10, Issue 1, February 2010

Color Image Enhancement in Compressed DCT Domain

J. Christopher Clement, M. Prabukumar, A. Baskar


School of Electronics Engineering, School of Information Technology and Engineering, VIT University,
Vellore, India,
Department of Computer Science and Engineering, Amrita Vishwa Vidypeetham University,
Coimbatore, India.
christopher.clement@vit.ac.in, mprabukumar@vit.ac.in, a_baskar@cb.amrita.edu
http://www.vit.ac.in, http://www.amrita.edu.

Abstract histogram equalization and spans widely to low


Novel algorithm for image enhancement in pass filtering, un-sharp masking, and high pass
compressed (DCT) domain is presented. Despite, filtering, etc. These enhancing techniques achieve
few algorithms have been reported to enhance desirable result in enhancing gray-level images. But
images in DCT domain, proposed algorithm differs in modern days, we are inspired with less storage
from previous algorithms in such a way that it space for data storage and speed up in data
enhances both dark and bright regions of an image transferring. Since all the previous mentioned
equally well. In addition, it outperforms in algorithms work in spatial domain [10], they fail to
enhancing the chromatic components as well as provide compression. However these algorithms
luminance components. Since the algorithm works could be used in pre-compression and post-
in DCT domain, computational complexity is compression stages as reported in [7] with
reduced reasonably. increased complexities and reduced computing
speed. Other drawback with these algorithms is
Keywords: JPQM, DCT, Y-Cb-Cr Space, and they work only with gray-level images.
Enhancement. Modifications to these algorithms have been
reported to work with color images as well, but still
1. Introduction in spatial domain.
Technique has been reported to enhance the
Enhancement is the technique which is most
contrast alone of the image by considering the DCT
required in the field of Image Processing to improve
coefficients as the different band sets [7]. This is
the visualization. Research in human Psycho-visual
one of radical technique which brought the
system yields an idea to compress an image by
attention of researchers to develop enhancing
removing redundant information without affecting
algorithms in DCT space. However this algorithm
its quality. One such widely used compression
speaks enhancement of contrast alone. Alpha
standard is JPEG [2] (Joint Photographic Experts
rooting [3, 9, and 11] and multi contrast
Group). Basic building block of JPEG compression is
enhancement [7] are other algorithms to work in
Discrete Cosine Transform [2] which transforms an
DCT domain. These algorithms did not report with
image from spatial domain to compressed domain.
processing on chromatic components.
2D DCT with quantization, zigzag alignment, and
Further they use non-uniform scaling constants for
run length coding are used to encode the data in
various bands of frequencies of DCT block.
JPEG.
With this motivation and background, we present
At this moment various techniques exist to
an algorithm in such a way
compress image both in spatial and DCT domain.
1) To enhance both dark and bright regions of an
Spatial domain enhancing technique originates from
image equally well.

31
ICGST - GVIP Journal, ISSN: 1687-398X, Volume 10, Issue 1, February 2010

2) To enhance chromatic components as like as Where  is the mean and is the standard deviation
luminance component. of DCT block respectively.
3) To enhance with uniform scaling coefficient for all In a block, mean is defined to be the DC coefficient
frequency band sets of DCT blocks. as
4) To enhance with complexity reduction because it
works in compressed domain. 0,0 (4)
We organize the paper in the following way. Section
2 explores the mathematics in 2D DCT and Section 3 And standard deviation is defined as
about Y-Cb-Cr color Space. Section 4 speaks about
proposed algorithm. Section 5 deals with   ,                         5
elimination of blocking artifact. Section 6 illustrates
about the metrics used to evaluate quality of JPEG
image. Section 7 gives the result of algorithm in
Where is the normalized constant defined to be
comparison with previous existing algorithm called
alpha rooting. Section 8 concludes the paper. ,
,                                 6
2. Theory
For a 2D image say, ,   DCT coefficients are From (4), and (5), it is verified that contrast is the
obtained as, ratio of high frequency coefficients to low frequency
coefficients.
2
,    
3. Y-Cb-Cr color Space
2x 1 πp 2y 1 πq
, . cos . cos Y the luminance component, Cb, and Cr the
2N 2N chrominance components are represented as the
0 , , , 1         linear combination of R, G, and B respectively.
(1) Relation is described as

Where 0.256 0.502 0.098


0.148 0.290 0.438
    0 0.438 0.366 0.071
  √ (2) 0
0 , 128                                           7
128
Since DCT is a linear transformation, scaling Since From (7)  , are not linearly related, we
and superposition applied in DCT domain will be take the space     . These are given as
reflected in spatial domain as well and vice versa. follows
Block DCT space is used in JPEG with a block                              128                                     8
size as 8 X 8 [2]. Human visual system is less
                              128                                    9
sensitive to high frequency components than low
Now the color space , ,   is linearly related
frequency components. JPEG takes advantage of
with color space R, G, and B linearly.
this, hence quantize, and loose unwanted high
frequency coefficients. Mean while, JPEG prefers Y-
Cb-Cr space to compress the image, since chromatic 4. Proposed Algorithm
components are less correlated in Y-Cb-Cr color Presented algorithm does the enhancement in two
space than R-G-B Space, [2]. passes and the idea here is to adjust the dynamic
In addition, as per human visual system, Contrast is range of the pixels. A function which rises
defined as the ratio of high frequency terms to low exponentially is used to adjust the dynamic range
frequency terms. In other words, contrast is the ratio during the first pass. This function is described in
of standard deviation over a block to mean of the (10). This function serves better in enhancing darker
block [Weber law]. region of an image. A function which decays
Weber law defines the contrast in DCT space as exponentially is used to adjust the dynamic range
during the second pass. This function is shown in
    (3) (11). This function enhances the bright region of an
image well.

32
ICGST - GVIP Journal, ISSN: 1687-398X, Volume 10, Issue 1, February 2010

multiplied by this to enhance spatial domain pixel


                                                                          10
2.7183 values. Since Multiplication is done with all DC and
AC coefficients by the same factor, over all contrast
And of the block is kept unvaried as can be verified from
(3). This could be written in equation as
                                                                                  11
    ,  . , ,          ,                   13

Similar procedure is used for chromatic


components as well. In processing the chromatic
components, we enhance the color details of an
image. As can be seen from (7), there exist a non
linearity between R-G-B and Y-Cb-Cr color space.
This non linearity can be removed by processing DC
coefficients separately from AC coefficients.
Equations (14), and (15) describes mathematically
how DC coefficients are processed. Relation
between (7), (8), and (9) helps to derive these
equations (14) and (15)

Figure 1.a. function 1


,
. . 128 128 , 0
         14
. ,   ,         ,  

,
. . 128 128 , 0
          15
. ,   ,          ,  

Care must be taken while doing the above


multiplications to avoid pixels range crossing
beyond their allowable representation. For example,
a pixel represented in 8 bit plane should be bound
within 0 and 255. To sustain this range, we limit the
factor within the boundaries as shown below
Figure 1.b. function2                                1                                          16  
Figure 1. Plot of functions in (10) and (11) Where   is the maximum allowable range, and is
Plots of these two functions are shown in the the maximum pixel value in a block.
figure.1.a and 1.b. The algorithm aims at finding the We have taken a test image shown in figure.2.
factor which is mentioned in [7] using both the Result obtained after first pass is shown in figure.3.
functions. DC coefficient of a block is normalized Result reveals that darker regions are well enhanced
and translated slightly higher in amplitude with the but with more artifacts.
help of function shown in (10). This translated value
is divided by actual value to find the factor as
shown in (12).

,
.
2.7183
                                                      12
0,0
.

Where is the maximum pixel value of all blocks.


Now, all the coefficients of luminance block are Figure 2. Original Test Image

33
ICGST - GVIP Journal, ISSN: 1687-398X, Volume 10, Issue 1, February 2010

techniques have been reported to eliminate


These artifacts need to be removed during the blocking artifact. In [4], it is proposed that by
second pass. Output image from first pass is given suppressing the block DCT coefficients, block
as input to the second pass. Procedure is same as artifacts are removed.
above, except it uses exponentially decaying In [5], local statistics of the quantized coefficients
function for range adjustment as already explained. are used in estimating the transform coefficients. Of
This explanation is supported with (17). Treatment many algorithms, one which is reported in [8] and
to chromatic components is also similar. Equations works directly in compressed domain drags our
(13), (14), and (15) support this theoretical attention, because of its less complexity and
discussion. effectiveness. The algorithm is as follows
High frequency DCT coefficients are eliminated to
,
. smooth the block at border. Two horizontally
                                                       17 adjacent blocks A and B are considered. Block C is
0,0
. introduced with four border pixels from block A and
four border pixels from block B. Altogether C has 8
X 8 pixels and hence it is a block. Let , is the
DCT coefficient of a block C. then for 0 and
N=8,

,
2 2 1
  , cos             18
2

,
9 11
8 8
13
Figure 3. Enhanced image after first pass 8
15
                                                                           19
8

Where ,   are same as defined in (1),


and , are the pixels of block C in spatial
domain. Similar procedure is repeated for adjacent
blocks in vertical direction also, with little overhead
in computing. As a result, reported algorithm [8],
eliminates blocking artifact. Result after eliminating
blocking artifact is shown in figure.5.a, and 5.b. One
could see from this figure 5 that block artifact is
eliminated to a great extent; hence smoother is the
Figure 4. Enhanced image after second pass
enhanced image. Proposed algorithm is shown as a
block diagram in figure 9.
Results obtained after second pass is shown in
figure.4. One could see from this figure that artifacts
which were more visible during the first pass are 6. Performance Metrics
removed (except blocking artifact) In addition; We have used two types of metric for quality
enhancement over bright and dark regions is analysis. One such is JPEG Quality Metric (JPQM) for
performed. We still need blocking artifacts to be JPEG images as reported in [6]. The other is PSNR.
removed. Forthcoming section illustrates removal of Wang et al. have suggested [6] a no reference
blocking artifact. metric for assuring the quality of an image. It is
important to note that the value of JPQM should be
as close as to 10 for good visibility. Procedure for
5. Eliminating blocking artifact
finding JPQM is described below.
Getting rid of blocking artifact is the vital step in
block processing, like Block DCTs. Blocking artifact
occurs due to block processing. So far, many

34
ICGST - GVIP Journal, ISSN: 1687-398X, Volume 10, Issue 1, February 2010

A. JPQM Horizontal ZC rate then can be estimated as


Let the test image signal be , for     1,
and       1, . Then the difference signal along 1
each horizontal line is denoted as,                       ,                 24
2

               , , 1 , ,  
                                1, 1                                        20    Similar procedure is applied in calculating vertical
features of  ,   ,   . Then the overall features
Average difference across block boundaries is are calculated as,
calculated horizontally as,
      , ,               25
2 2 2
1
    | , 8 |                       21 Then the performance metric JPQM is defined to be
1
8
                                                  26
Activity is measured using two factors. First is the
Average absolute difference between in-block Where , , 1, 2,   3 are the model parameters
image samples, which is defined as with values

1 8 245.9,
261.9, 1 0.024, 2
     | , |                22 0.0160,   3
7 1 0.0160                                      27
We have taken the standard values for these
Second activity measure is the zero crossing rates. parameters as in [6].
We define for 1, 2.

1                ,       
, 23   
  0                                               

a. Original Child Image b. Alpha rooting c. Proposed with artifact d. Proposed without artifact

e. Original Tower Image f. Alpha rooting g. Proposed with artifact h. Proposed without artifact

35
ICGST - GVIP Journal, ISSN: 1687-398X, Volume 10, Issue 1, February 2010

i. Original Mount Image j. Alpha rooting k. Proposed with artifact l. Proposed without artifact

Figure 6. Enhanced Images, Alpha Rooting Vs Proposed Algorithm

Metrics

JPQM PSNR
S.No Test Image
Proposed Proposed
Alpha Alpha
Rooting With Without Rooting With Without
artifact Artifact Artifact Artifact
1 Car Image 8.2736 9.9241 9.945 18.567 22.0512 22.3748

2 Tower 8.1736 9.6809 9.892 18.913 22.5657 23.7872

3 Mountain 8.2419 8.8794 9.2553 19.176 25.0622 24.30

Table 1 Comparison of Metrics

Figure.7 Comparison of JPQM between Alpha rooting and Proposed Algorithm

36
ICGST - GVIP Journal, ISSN: 1687-398X, Volume 10, Issue 1, February 2010

Figure 8. Comparison of PSNR between Alpha rooting and Proposed Algorithm

Figure 9. Block Diagram

B.PSNR which contain shadows and poor details have been


The second performance metric is PSNR. Calculation considered. Three images are shown along with
of PSNR needs estimation of error between actual enhanced images using alpha rooting algorithm and
image and enhanced image. proposed algorithm are displayed for comparison
Let the actual image be , and the enhanced purpose. It is obvious from figure 6.b, 6.c, 6.d that
image be , . The mean square error between proposed algorithm outperforms in enhancing color
these two image signal is details of an image than alpha rooting algorithm. In
addition, one could see from figure.6 that darker
                  | , , |                         28 and bright regions are enhanced equally well.
Performance metric is tabulated for various test
Then the PSNR is denoted mathematically as images. Table.1 compares the metric JPQM for alpha
rooting algorithm and proposed algorithm. The
255 same is plotted as a chart in figure.7 and figure 8
                  10                               29
with similar inference. Figure.7 and 8 plots JPQM
and PSNR values of all test images for various
7. Results and Comparison algorithms. The table insists that quality metric
We have taken few test images which are shown in JPQM is good for proposed algorithm. table also
figure.6.a, 6.e, and 6.i. Comparison is made with compares PSNR value between alpha rooting and
other DCT domain enhancing algorithm called alpha proposed algorithm. One could realize that PSNR
rooting. Results are shown in figure 6.b, 6.c, 6.d etc… values are too good for proposed algorithm than
with the comparison between proposed algorithm alpha rooting algorithm.
and alpha rooting algorithm. Three test images

37
ICGST - GVIP Journal, ISSN: 1687-398X, Volume 10, Issue 1, February 2010

8. Conclusion -Rooting method in wavelet domain”, in


This paper presented an algorithm to enhance proceedings of the 23th Inational Conference
images in the compressed domain. Proposed on circuits/system computers and
Algorithm is less complex and it outperforms in communications, 2008.pp 17-20.
enhancing chromatic and luminance components
equally well. The values from JPQM and PSNR
metrics insist that quality after enhancement is J. Christopher Clement received his
improved. Bachelor of Engineering Degree
from University of Madras, India
and Masters Degree in
9. References Communication Systems from
[1] R. Gonzalez and P. Wintz, Digital Image
Anna University, India. He is presently working for
Processing. MA: Addison-Wesley, 1987.
VIT University, India where he is pursuing Ph.D. His
[2] Gregory K. Wallace, “The JPEG still picture
research interests are Image Processing, CODEC
compression standard,” in IEEE transactions on
design, adaptive signal processing for wireless
consumer electronics, vol ,pp. dec 1991.
communication, Channel Estimation, OFDM, and
[3] S. Aghagolzadeh and O. K. Ersoy, “Transform
MIMO wireless systems.
image enhancement,”Opt. Eng., vol. 31, pp.
614–626, Mar. 1992.
M. Prabukumar received his
[4] T.Tadashi Kasezawa, “Blocking artifacts
Bachelor of Engineering Degree
reduction using discrete cosine transform,” IEEE
from Periyar University, India and
Trans.Consumer Electron., vol. 43, no. 1, Feb.
Masters of Technology in
1997.
Computer Vision and Image
[5] S. S. O.Steven S. O. Choy, Y.-H.Yuk-Hee Chan,
Processing from Amrita Vishwa
andW.-C.Wan-Chi Siu, “Reduction of block-
Vidyapeetham University, India.
transform image coding artifacts by using local
He is presently working for VIT University, India
statistics of transform coefficients,” IEEE Signal
where he is pursuing Ph.D. His research interests
Processing Letters, vol. 4, no. 1, pp. 5–7, Jan.
are Video Image Processing, Hexagonal Image
1997.
Processing, Computer Vision, Digital Signal
[6] Z. Wang, H. R. Sheikh, and A. C. Bovik, “No-
Processing and Digital Systems Design.
reference perceptual quality assessment of
JPEG compressed images,” in Proc. Int. Conf.
A. Baskar received his Bachelor of
Image Processing, Rochester, NY, Sep. 2002, vol.
Engineering Degree from Periyar
I, pp. 477–480.
University, India and Masters of
[7] J. Tang, E. Peli, and S. Acton, “Image
Technology in Computer Vision
enhancement using a contrast measure in the
and Image Processing from
compressed domain,” IEEE Signal Process. Lett.,
Amrita Vishwa Vidyapeetham
vol. 10, no. 10, pp. 289–292, Oct. 2003.
University, India. He is presently
[8] Ying Luo and Rabab K. Ward , “Removing the
working for Amrita Vishwa Vidyapeetham University,
Blocking Artifacts of Block-Based DCT
India. His research interests are Video Image
Compressed Images”, IEEE transactions on
Processing, Image Processing, Computer Vision,
Image Processing, Vol. 12, No. 7, July 2003.
Multimedia & Data Compression and Computer
[9] Yasuyuki Shibuya, etal,”Alpha E- and Alpha N-
Graphics.
catenin Expression in Dorsal Root Ganglia and
Spinal Cord”, Kobe J. Med. Sci., Vol. 49, No. 4,
pp. 93-98, 2003.
[10] Chi-Farn Chen, Hung-Yu Chang, Li-Yu Chang,
“A Fuzzy-based method for remote sensing
image contrast enhancement,” The
International Archives of the Photogrammetry,
Remote Sensing and Spatial Information
Sciences, Vol. XXXVII. Part B2. Beijing 2008.pp
995-999.
[11] Md Foisal Hossain, Mohammad reza
Alsharif,”Image enhancement using splitting

38

S-ar putea să vă placă și