You are on page 1of 7

Abstract Novel algorithm for image enhancement in compressed (DCT) domain is presented.

Despite,few algorithms have been reported to enhance images in DCT domain, proposed algorithm differs from previous algorithms in such a way that it enhances both dark and bright regions of an image equally well. In addition, it outperforms in enhancing the chromatic components as well as luminance components. Since the algorithm works in DCT domain, computational complexity is reduced reasonably. Keywords: JPQM, DCT, Y-Cb-Cr Space, and Enhancement. 1. Introduction Enhancement is the technique which is most required in the field of Image Processing to improve the visualization. Research in human Psycho- visual system yields an idea to compress an image by removing redundant information without affecting its quality. One such widely used compression standard is JPEG [2] (Joint Photographic Experts Group). Basic building block of JPEG compression is Discrete Cosine Transform [2] which transforms an image from spatial domain to compressed domain.2D DCT with quantization, zigzag alignment, and run length coding are used to encode the data in JPEG. At this moment various techniques exist to compress image both in spatial and DCT domain. Spatial domain enhancing technique originates from histogram equalization and spans widely to low pass filtering, un-sharp masking, and high pass filtering, etc. These enhancing techniques achieve desirable result in enhancing graylevel images. But in modern days, we are inspired with less storage space for data storage and speed up in data transferring. Since all the previous mentioned

algorithms work in spatial domain [10], they fail to provide compression. However these algorithms could be used in precompression and post compression stages as reported in [7] with increased complexities and reduced computing speed. Other drawback with these algorithms is they work only with graylevel images. Modifications to these algorithms have been reported to work with color images as well, but still in spatial domain. Technique has been reported to enhance the contrast alone of the image by considering the DCT coefficients as the different band sets [7]. This is one of radical technique which brought the attention of researchers to develop enhancing algorithms in DCT space. However this algorithm speaks enhancement of contrast alone. Alpha rooting [3, 9, and 11] and multi contrast enhancement [7] are other algorithms to work in DCT domain. These algorithms did not report with processing on chromatic components. Further they use non-uniform scaling constants for various bands of frequencies of DCT block. With this motivation and background, an algorithm is designed in such a way 1) To enhance both dark and bright regions of an image equally well. 2) To enhance chromatic components as like as luminance component. 3) To enhance with uniform scaling coefficient for all frequency band sets of DCT blocks. 4) To enhance with complexity reduction because it works in compressed domain. The paper is organised in the following way. Section 2 explores the mathematics in 2D DCT and Section 3 about Y-Cb-Cr color Space. Section 4 speaks about proposed algorithm. Section 5 deals with elimination of blocking artifact. Section 6 gives the result of algorithm . Section 7 concludes the paper.

2. Theory
For a 2D image say,I(x,y) DCT coefficients are obtained as,

coefficients.

III. THE PROPOSED ALGORITHM The proposed algorithm performs the color image enhancement operation in three steps. First, it adjusts the background illumination. The next step preserves the local contrast of the image and the last one preserves the colors of the image. Moreover, in a block DCT space, the algorithm attempts to exploit the advantage of having localized information from the DCT coefficients. The algorithm is designed in such a way that each block (of size 8 8) for all the components could be handled independently.This makes it more suitable for parallel implementation. A. Adjustment of Local Background Illumination In adjusting the local background illumination, the DC coefficient of a block is used. The DC value gives the mean of the brightness distribution of the block. This adjustment may be performed by mapping the brightness values to a value in the desired range. This function should be monotonic in the given range. Let us denote the maximum brightness value of the image as Imax (which may be available from the header of the compressed stream). Let the DCT coefficients of a 88 block of the luminance component (Y) be denoted by {Y(k,l),0 k,l 7} . Then Y(0,0)is the DC coefficient and the rest are the AC coefficients. As before we denote the normalized DCandAC coefficients by . In adjusting the local brightness, this DC coefficient is mapped to by using a monotonically increasing function y={f(x),0 x,y 1}in the interval of [0,1] as follows: (13) The function f(x) can be chosen in various ways. In our experimentations we have considered some of the previously used

Where

Since DCT is a linear transformation, scaling and superposition applied in DCT domain will be reflected in spatial domain as well and vice versa. Block DCT space is used in JPEG with a block size as 8 X 8 [2]. Human visual system is less sensitive to high frequency components than low frequency components. JPEG takes advantage of this, hence quantize, and loose unwanted high frequency coefficients. Mean while, JPEG prefers YCb-Cr space to compress the image, since chromatic components are less correlated in Y-Cb-Cr color s pace than RG-B Space, [2]. In addition, as per human visual system, Contrast is defined as the ratio of high frequency terms to low frequency terms. In other words, contrast is the ratio of standard deviation over a block to mean of the block [Weber law]. Weber law defines the contrast in DCT space as

Where is the mean and is the standard deviation of DCT block respectively. In a block, mean is defined to be the DC coefficient As

And standard deviation is defined as

Where be

is the normalized constant defined to

From (4), and (5), it is verified that contrast is the ratio of high frequency coefficients to low frequency

functions for enhancement, namely, the twicing function (denoted here by (x) ) [28 ], a function used in [22] (denoted here by (x)) and the S- function [29] (denoted by (x)). Their functional forms are given in (14)(16), shown at the bottom of the next page.The reasons for choosing these functions are as follows: i) they have been employed earlier in developing image enhancement algorithms, and ii) there is no single function which has been found to provide the best performance for every image. Our objective here is to observe the performances of our proposed algorithm with different choices of these mapping functions. There are also other advantages for using each of the above functions. The first one, (x), is simple to implement. It has no parameter, yet it is found to be quite effective in brightening the dark regions across different types of images. The second one,(x) , is also relatively simpler (than the third one). It has a single parameter which should be centered around 2. This function works well both in the dark and bright regions. The last one, (x) , is the most complex one. It has four parameters, and . However, it can effectively control the dark regions (between [m,0]) and bright regions (between [m,1] ) separately (by choosing different values of p1 for dark region and p2 for bright region). It may be noted also that (m) = n . Plots of these functions are shown in Fig. 2.

The results are obtained by applying these functions on the image. It may be noted that though the dark regions get brightened by these processes, the images lack the sharpness or details of the original one. So to preserve the local contrast we apply the following simple procedure. B. Preservation of Local Contrast Let us define the enhancement factor for a block during adjustment of its luminance as

(17) where coefficient and is the mapped DC is the original DC

coefficient. Since the DCT is a linear transform, multiplying all the coefficients of Y by k results in the multiplication of the pixel values in the block by the same factor. This also preserves the contrast of the block. However, there is a risk of overflow of some of the pixel values beyond the maximum allowable representation (say Bmax ). This can be controlled by taking into account of the standard deviation() and mean()of the brightness distribution of the block. Let us assume that the brightness values of this distribution lie within , where >0 is a constant. In that case k should lie within an interval as stated by the following theorem. Theorem 3: If we assume that the values in a block lies within , the scaled values will not exceed Bmax if 1 k ( Bmax / ) . Proof: Due to the scaling of the DCT coefficients by k , the mean and standard deviation of the block become as k and k, respectively. A pixel value x of the scaled block should lie within [x,k +k] . This implies kx x and the scaled value will not exceed Bmax if k + k Bmax . Hence 1 k ( Bmax / ). The resulting images after the application of these operations are depicted in Fig. 4. It can be seen that the colors look less saturated in the enhanced images and there is a scope for further improvement on the display of colors. This task is performed in the next and final stage. C. Preservation of Colors As described earlier, we have performed a restricted scaling operation according to (8) and (9) for preserving the colours. It may be noted that the previous enhancement algorithms [22] did not perform this operation [22]. These techniques only change the luminance component(Y) and keep the chrominance components ( Cb and Cr , respectively) unaltered. Though in the Y-Cb-Cr colour

space the chrominance components are decorrelated better than that in the R-G-B color space, the increasing values in the component usually tend to desaturate the colours. Typically one may observe from the conversion matrix for going from the Y-Cb-Cr space to the R-G-B space, for G>R and G>B increasing Y while keeping Cb and Cr unchanged reduces both the (R/G) and (B/G) factors. This is why we believe that the chromatic components should be also processed for preserving the colors. The improvement of the quality of the enhanced image is also quite apparent from Fig. 5. In this case, there is also a chance that the enhanced values of the chromatic components may fall outside the range of representation (in the spatial domain) due to the scaling operation. One may adopt also a similar strategy of limiting the enhancement factor as described in the previous section. However, in our experimentation with a different set of images, we have not observed any such case and this operation has been ignored in the proposed algorithm. D. Suppressing Blocking Artifacts The major problem in developing algorithms in the block DCT domain is the blocking artifacts that may be visible as a result of the independent processing of the blocks. One possible solution is to make use of the information from neighboring blocks for reducing or removing these artifacts as adopted in [30] and [31] and elsewhere. However, this comes at the cost of more computation and more buffer requirements. A simplerstrategy is to suppress some of the coefficients in the first row and column for removing such artifacts [32]. However, we have found these approaches not very effective. Sometimes application of these techniques have resulted in the occurrence of spurious horizontal or vertical edges in the enhanced images. In our proposed technique, we have tried to address this

problem from a different perspective.We have observed that blocking artifacts are more visible in the regions where brightness values vary significantly, specially near the edges of sharp transitions of luminance values. For suppressing these artifacts, therefore, it would be necessary to keep the variations of the DC coefficients smooth or continuous. To this end, the mapping function (x) has been found to perform better than the others. In fact, the strategy for adjusting its parameter() depending on the ratio of high and low spectral energies has been adopted in [22]. Later these values are further smoothed by taking the average of parameter values in the neighbouring blocks. However, to keep the computations limited within a block for achieving better parallelism, we have taken a different approach. We have decomposed the DCT blocks into smaller blocks, if necessary, and performed computations on them. Later these smaller blocks are merged into the original block size. In this case, we have identified the blocks having significant variations by examining their standard deviations() . If the is beyond a threshold (denoted here as thres), we decompose a 8 8 block into four 4 4 sub-blocks. Then the same enhancement algorithm is applied to each sub-block. Finally, the four enhanced sub-blocks are combined again to a 88 block. There exist efficient algorithms for these composition and decomposition operations with a marginal increase in the computational overhead [33], [34]. These additional operations also do not increase any buffer requirement. E. The Algorithm The overall algorithm is summarized below. As each block is independently processed, in the description processing with a single block is narrated. We have also considered a block of general size(N*N).

Algorithm Color Scaling (CES)

Enhance ment

by

Input: : DCTs of three components of a block. Input Parameters : f(x), (the mapping function), (Block size). N,

Output: . 1. Compute and using (6) and (7). 2. If ,

2a. Decompose into (N/2) * (N/2) DCT sub-blocks, 2b. For each block apply similar computations as described in Steps 3 through 5, and 2c. Combine 4 of these (N/2) * (N/2) blocks into a N 8 N single DCT block and return. 3. Compute the enhancement factor as follows:

4. Scale the coefficients. 4a. =kY. 4b. Apply (11) and (12) on and for preserving colors. It may be noted that the step-2 of the above algorithm may be applied recursively. This would definitely improve the quality of the results by further removing the blocking artifacts. In the limiting case, the operation will be equivalent to the application of mapping function [refer to (13)] to individual pixels. It is clear that these would increase the computation and the improvement would

be mostly marginal, as it is expected that smaller blocks are having lower variance values. Under the present context, as the block size is 8 X 8 only, we have applied one level of decomposition and composition (until the size of 4 X 4) if required. This also keeps the algorithm simple by avoiding recursion or iteration.

RESULTS
We have compared the performance of the proposed approach with that of three existing DCT domain color enhancement techniques, namely alpha-rooting [19], multicontrast enhancement technique[20], and multicontrast enhancement coupled with dynamic range compression[22]. The technique is refined by varying the parameter of dynamic range compression for each block depending on its spectral content. The parameter () is also smoothed by taking average of its values used in the neighboring blocks. We have implemented our proposed algorithms CES with different choices of the mapping functions. As we would like to observe the effect of employing blocking artifact removals (Step 2 of the algorithm CES), the algorithms for both the variations (with and without the computation described in the Step 2) have been implemented. In this algorithm, the scaling of the coefficients by a constant for each component is the major computational task. This would require 192 multiplications and four additions. The additions are necessary for translating (and retranslating back) the DC coefficients of the Cb and Cr components. Computation of the scaling factor depends on the type of functions used. In addition, there is an overhead of computing the standard deviation() and the mean () of the block, which requires 63 multiplications, 62 additions and one exponential operation (square root). In this paper, we have presented a simple approach for enhancing color images in the block DCT domain by scaling the Transform coefficients. The unique feature of this algorithm is that it also treats chromatic components in addition to the processing of the luminance component improving the visual quality of the images to a great extent. A comparative study with different other schemes has been carried out on the basis of different performance criteria. It has been found that proposed schemes outperform the existing schemes in most cases. In this paper, we have presented a simple approach for enhancing color images in the block DCT domain by scaling the transform coefficients. The unique feature of this algorithm is that it also treats chromatic components in addition to the processing of the luminance component improving the visual quality of the images to a great extent. A comparative study with different other schemes has been carried out on the basis of different performance criteria. It has been found that proposed schemes outperform the existing schemes in most cases.

REFERENCES [1] D. J. Jobson, Z. Rahman, and G. A. Woodell, A multi-scale retinex for bridging the gap between color images and the human observation O f scenes, IEEE Trans. Image Process., vol. 6, no. 7, pp. 965976, Jul. 1997. [2] D. J. Jobson, Z. Rahman, and G. A. Woodell, Properties and performance of a center/surround retinex, IEEE Trans. Image Process., vol. 6, no. 3, pp. 451462, Mar. 1997. [3] J. S. Lim, Two-Dimensional Signal and Image Processing. Englewood Cliffs, NJ: Prentice-Hall, 1990. [4] R. C. Gonzales and E. Woods, Digital Image Processing. Reading, MA: Addison-Wesley, 1992. [5] The Colour Image Processing Handbook, S. J. Sangwine and R. E. N. Horne, Eds. London, U.K.: Chapman & Hall, 1998. [6] S. Wolf, R. Ginosar, and Y. Zeevi, Spatio-chromatic image enhancement based on a model of humal visual information system, J. Vis. Commun. Image Represent., vol. 9, no. 1, pp. 2537, Mar. 1998. [7] A. F. Lehar and R. J. Stevens, Highspeed manipulation of the color chromaticity of digital images, IEEE Trans. Comput. Graph. Animation, pp. 3439, 1984. [8] S.-S. Kuo and M. V. Ranganath, Real time image enhancement for both text and color photo images, in Proc. Int. Conf. Image Processing, Washington, DC, Oct. 2326, 1995, vol. I, pp. 159162. [9] I. Bockstein, Color equalization method and its application to color image processing, J. Opt. Soc. Amer. A, vol. 3, no. 5, pp. 735737, May 1986. [10] R. N. Strickland, C.-S. Kim, and W. F. McDonnell, Digital color image enhancement based on the saturation component, Opt. Eng.,

vol. 26, no. 7, pp. 609616, July 1987. [11] B. A. Thomas, R. N. Strickland, and J. J. Rodrigues, Color image enhancement using spatially adaptive saturation feedback, in Proc. Int. Conf. Image Processing, Santa Barbara, CA, Oct. 2629, 1997, vol. 3, pp. 3033. [12] A. Toet, Multiscale color image enhancement, Pattern Recognit. Lett., vol. 13, no. 3, pp. 167174, Mar. 1992. [13] I. Pitas and P. Kiniklis, Multichannel techniques in color image enhancement and modeling, IEEE Trans. Image Process., vol. 5, no. 1, pp. 168171, Jan. 1996. [14] L. Lucchese, S. K. Mitra, and J. Mukherjee, A new algorithm based on saturation and desaturation in the xy chromaticity diagram for enhancement and re-rendition of color images, in Proc. Int. Conf. Image Processing, Thessaloniki, Greece, 2001, pp. 10771080. [15] O. Faugeras, Digital color image processing within the framework of a human visual model, IEEE Trans. Acoust., Speech, Signal Process., vol. ASSP-27, no. 4, pp. 380393, Aug. 1979.

You might also like