- Open Access
- Total Downloads : 294
- Authors : Dr. H. B. Kekre, Dr. Sudeep D. Thepade, Ratnesh N. Chaturvedi
- Paper ID : IJERTV2IS4899
- Volume & Issue : Volume 02, Issue 04 (April 2013)
- Published (First Online): 24-04-2013
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License: This work is licensed under a Creative Commons Attribution 4.0 International License
New Faster ‘Color to Gray and Back’ Using Normalization of Color Components with Orthogonal Transforms
Dr. H. B. Kekre
Sr. Professor Computer Engineering Dept.,
Mukesh Patel School of Technology, Management & Engineering,
NMIMS University, Mumbai, India
Dr. Sudeep D. Thepade Professor & Dean (R&D) Pimpri Chinchwad College of Engineering,
University of Pune, Pune, India
Ratnesh N. Chaturvedi M.Tech (Computer Engg.) Mukesh Patel School of Technology, Management & Engineering,
NMIMS University, Mumbai, India
Abstract
The paper shows performance comparison of two algorithms with Image transforms alias Cosine, Sine, Haar & Walsh and Normalization for Color to Gray and Back. The color information of the image is embedded into its gray scale version/equivalent using transform and normalization method. Instead of using the original color image for storage and transmission, gray image (Gray scale version with embedded color information) can be used, resulting into better bandwidth or storage utilization. Among the two algorithms considered the second algorithm give better performance as compared to the first algorithm as it removes the matted effect from the gray scale version. In second algorithm Discreet Cosine Transform (DCT) using Normalization gives better performance in Color to gray and Back. The intent is to print color images with black and white printers and to be able to recover the color information afterwards.
Key Words:Color Embedding, Transforms, Normalization, Compression, Color to Gray Conversion.
-
Introduction
Digital images can be classified roughly to 24bit color images and 8bit gray images. We have come to tend to treat colorful images by the development of various kinds of devices. However, there is still much demand to treat color images as gray images from the viewpoint of running cost, data quantity, etc. We can convert a color image into a gray image by linear combination of RGB color elements uniquely. Meanwhile, the inverse problem to find an RGB vector from a luminance value is an ill-posed problem. Therefore, it is impossible theoretically to completely restore a color image from a gray image.
For this problem, recently, colorization techniques have been proposed [1]-[4]. Those methods can re- store a color image from a gray image by giving color hints. However, the color of the restored image strongly depends on the color hints given by a user as an initial condition subjectively.
In recent years, there is increase in the size of databases because of color images. There is need
to reduce the size of data. To reduce the size of color images, information from all individual color components (color planes) is embedded into a single plane by which gray image is obtained [5][6][7][8]. This also reduces the bandwidth required to transmit the image over the network.
Gray image, which is obtained from color image, can be printed using a black-and-white printer or transmitted using a conventional fax machine [6]. This gray image then can be used to retrieve its original color image.
In this paper, we have compared the performance of two different methods of color-to-gray mapping technique one is only using the transforms[8] which is an existing technique and the other using transform with the concept of normalization[9] which is an proposed technique. With method 1 the gray image has the matted effect when the color information is hidden in transform domain [7][8]. And in method 2 the color information is hidden in normalized form which removes the matted effect and the recovered color image is of better quality as compared to method 1. Normalization is the process where each pixel value is divided by 256 to minimize the embedding error [9].
The paper is organized as follows. Section 2 describes various transforms. Section 3 presents the existing and proposed system for Color to Gray and
back. Section 4 describes experimental results and
u(n)
2 v(k) sin (k 1)(n 1) 0 n N 1
N 1
N 1
finally the concluding remarks are given in section 5.
-
Transforms
N 1 n0 N 1
—–(6)
-
Discrete Cosine Transform [9][12]
The NxN cosine transform matrix C={c(k,n)},also called the Discrete Cosine Transform(DCT),is defined as
-
Haar Transfrom [9][10]
The Haar wavelet's mother wavelet function (t) can be described as
1
1
,0 t 1
2
1 k 0,0 n N 1
1
0
0
(t) 1 , t
N
2 1
c(k, n)
2 cos (2n 1)k
1 k N 1,0 n N 1
, Otherwise
N 2N
—–(1)
The one-dimensional DCT of a sequence
{u(n),0nN-1} is defined as
—–(7)
And its scaling function (t) can be described as,
N 1
N 1
v(k) (k)u(n)cos(2n 1)k
0 k N 1
(t) 1 ,0 t 1
2N
n0
—–(2)
0 , Otherwise
—–(8)
Where (0) 1 , (k)
N
2 for 1 k N 1
N
-
Walsh Transform [9][11][12]
The inverse transformation is given by
Walsh transform matrix is defined as a set of N rows, denoted Wj, for j = 0, 1, …., N – 1, which have the
N 1
(2n 1)k
following properties[9]
2N
2N
u(n) (k)v(k) cos
k 0
, 0 n N 1
-
Wj takes on the values +1 and -1.
—–(3)
2.2 Discrete Sine Transform [9]
The NxN sine transform matrix {(k, n)}, also called the Discrete Sine Transform (DST), is defined as
(k, n) 2 sin (k 1)(n 1)
N 1 N 1
—–(4)
0k, nN-1
The sine transform pair of one-dimensional sequences is defined as
-
Wj[0] = 1 for all j.
-
Wj xWkT =0, for j k and WjxWkT, Wj has exactly j zero crossings, for j = 0, 1,
…N-1.
-
Each row Wj is even or odd with respect to its midpoint.
-
Transform matrix is defined using a Hadamard matrix of order N. The Walsh transform matrix row is the row of the Hadamard matrix specified by the Walsh code index, which must be an integer in the range [0… N-1]. For the Walsh code index equal to an integer j, the respective Hadamard output code has exactly j zero crossings, for j = 0, 1… N – 1.
v(k)
2 u(n) sin (k 1)(n 1) 0 k N 1
-
-
-
Existing System& Proposed System
N 1
N 1
N 1 n0 N 1
—–(5)
In this section, we describetwo color-to-gray
The inverse transformation is given by
mapping algorithm and color recovery method in which method 1 is an existing system and method 2 is an proposed system.
-
Method 1 : Using Transforms. [6][7][8]
The Color to Gray and Back has two steps as Conversion of Color to Matted Gray Image with color embedding into gray image & Recovery of Color image back. Here the transform-based mapping method is elaborated as per the following steps.
3.1.1 Color-to-gray Step
-
First color component (R-plane) of size NxN is kept as it is and second (G-plane) & third (B-plane) color component are resized to N/2 x N/2.
-
Transform i.e. DCT, DST, Haar or Walsh to be applied to ll the components of image.
-
First component to be divided into four subbands as shown in figure 1 corresponding to the low pass [LL], vertical [LH], horizontal [HL], and diagonal [HH] subbands, respectively.
-
LH to be replaced by second color component, HL to replace by third color component and HH by zero..
-
Inverse Transform to be applied to obtain Matted Gray image of size N x N.
LL
LH
HL
HH
Figure 1: Sub-band in Transform domain
3.1.2 Recovery Step
-
Transform to be applied on Matted Gray image of size N x N to obtain four subbands as LL, LH, HL and HH.
-
Retrieve LL as first color component by replace other three components by zeros of size NxN, LH as second color component and HL as third color component of size N/2 x N/2.
-
Inverse Transform to be applied on all three color component.
-
Second and Third color component are resized to N x N.
-
All three color component are merged to obtain Recovered Color Image.
-
Method 2 : Using Transforms with the concept of normalization.[6][7][8][9]
3.2.1 Color-to-gray Step
-
First color component (R-plane) of size NxN is kept as it is and second (G-plane) & third (B-plane) color component are resized to N/2 x N/2.
-
Second & Third color component are normalized to minimize the embedding error.
-
Transform i.e. DCT, DST, Haar or Walsh to be applied to first color components of image.
-
First component to be divided into four subbands as shown in figure1 corresponding to the low pass [LL], vertical [LH], horizontal [HL], and diagonal [HH] subbands, respectively.
-
LH to be replaced by normalized second color component, HL to replace by normalized third color component.
-
Inverse Transform to be applied to obtain Gray image of size N x N.
-
3.2.2 Recovery Step
-
Transform to be applied on Gray image of size N x N to obtain four subbands as LL, LH, HL and HH.
-
Retrieve LH as second color component and HL as third color component of size N/2 x N/2 and the the remaining as first color component of size NxN.
-
De-normalize Second & Third color component by multiplying it by 256.
-
Resize Second & Third color component to NxN.
-
Inverse Transform to be applied on first color component.
-
All three color component are merged to obtain Recovered Color Image.
-
-
-
-
Results & Discursion
These are the experimental results of the images shown in figure 2 which were carried out on DELL N5110 with below Hardware and Software configuration.
Hardware Configuration:
-
Processor: Intel(R) Core(TM) i3-2310M CPU@
2.10 GHz.
-
RAM: 4 GB DDR3.
-
System Type: 64 bit Operating System.
Software Configuration:
1. Operating System: Windows 7 Ultimate [64 bit]. 2. Software: Matlab 7.0.0.783 (R2012b) [64 bit].
The quality of Color to Gray and Back' is measured using Mean Squared Error (MSE) of original color image with that of recovered color image, also the difference between original gray image and reconstructed gray image (where color information is embedded) gives an important insight through user acceptance of the methodology. This is the experimental result taken on 10 different images of different category as shown in Figure 2. Figure 3 shows the sample original color image, its gray equivalent and reconstructed gray image and recovered color image using DCT, DST, Haar and Walsh transform using method 1 and method 2. As it can be observed that the gray image obtained from method 1 has matted effect which can give a clue that something is hidden in gray image is removed using method 2 as the gray image obtained from method 2 does not gives any clue about the color information hidden into it as the normalization process reduces the embedding error.
Figure 2:Test bed of Image used for experimentation.
Original Color Original Gray
DCT DST Haar Walsh
Reconstructed Gray (Method 1) Reconstructed Gray (Method 1) Reconstructed Gray (Method 1) Reconstructed Gray (Method 1)
Recovered Color (Method 1) Recovered Color (Method 1) Recovered Color (Method 1) Recovered Color (Method 1)
Reconstructed Gray (Method 2) Reconstructed Gray (Method 2) Reconstructed Gray (Method 2) Reconstructed Gray (Method 2)
Recovered Color (Method 2) Recovered Color (Method 2) Recovered Color (Method 2) Recovered Color (Method 2)
Figure 3: Color to gray and Back of sample image using Method 1 and Method 2
Table 1:MSE between Original Gray &Reconstructed Gray Image
DCT |
DST |
Haar |
Walsh |
|||||
Method 1 |
Method 2 |
Method 1 |
Method 2 |
Method 1 |
Method 2 |
Method 1 |
Method 2 |
|
Img 1 |
10456 |
8087.7 |
17091 |
8083.2 |
16851 |
7949.7 |
13989 |
7949.7 |
Img 2 |
22150 |
16082 |
35222 |
16076 |
35136 |
16039 |
28508 |
16039 |
Img 3 |
7829.1 |
4974.3 |
17784 |
4970.9 |
17640 |
4892.9 |
12790 |
4892.9 |
Img 4 |
21591 |
15351 |
29234 |
15334 |
29185 |
15319 |
22857 |
15319 |
Img 5 |
5456.1 |
5173.4 |
15408 |
5173.7 |
15357 |
5150.5 |
14706 |
5150.5 |
Img 6 |
3971.1 |
2266.8 |
7089.1 |
2265.9 |
7050.3 |
2246.6 |
4756 |
2246.6 |
Img 7 |
30403 |
21684 |
49176 |
21659 |
49195 |
21681 |
39901 |
21681 |
Img 8 |
33285 |
26777 |
39693 |
26748 |
39706 |
26772 |
33725 |
26772 |
Img 9 |
7887.2 |
4732.9 |
16227 |
4729.9 |
16193 |
4722 |
11705 |
4722.1 |
Img 10 |
5051.6 |
3556 |
9915.8 |
3556.3 |
9864.7 |
3529.7 |
7691.1 |
3529.7 |
Average |
14808.01 |
10868.51 |
23683.99 |
10859.69 |
23617.8 |
10830.24 |
19062.81 |
10830.25 |
25000
20000
15000
10000
5000
0
19062.81 |
||||||||||||||||
14808.01 10868.51 |
10859.69 |
10830.24 |
10830.25 |
|||||||||||||
Method 1 |
Method 2 |
Method 1 |
Method 2 |
Method 1 |
Method 2 |
Method 1 |
Method 2 |
|||||||||
DCT |
DST |
Haar |
Walsh |
19062.81 |
||||||||||||||||
14808.01 10868.51 |
10859.69 |
10830.24 |
10830.25 |
|||||||||||||
Method 1 |
Method 2 |
Method 1 |
Method 2 |
Method 1 |
Method 2 |
Method 1 |
Method 2 |
|||||||||
DCT |
DST |
Haar |
Walsh |
23683.99
Avg. MSE
23617.8
Figure 4: Average MSE of Original Gray w.r.t Reconstructed Gray for Method 1 & Method 2
Table 2:MSE between Original Color-Recovered Color Images
DCT |
DST |
Haar |
Walsh |
|||||
Method 1 |
Method 2 |
Method 1 |
Method 2 |
Method 1 |
Method 2 |
Method 1 |
Method 2 |
|
Img 1 |
400.983 |
400.5921 |
402.1958 |
402.1958 |
493.5136 |
493.5136 |
493.5136 |
493.5136 |
Img 2 |
86.7375 |
86.6151 |
89.6663 |
89.6663 |
121.3339 |
121.3339 |
121.3339 |
121.3339 |
Img 3 |
224.7077 |
224.5669 |
226.7168 |
226.7168 |
280.6049 |
280.6049 |
280.6049 |
280.6049 |
Img 4 |
91.3811 |
90.792 |
95.5502 |
95.5502 |
116.5854 |
116.5854 |
116.5854 |
116.5854 |
Img 5 |
24.4245 |
24.3226 |
24.1318 |
24.1318 |
41.9297 |
41.9297 |
41.9297 |
41.9297 |
Img 6 |
62.5822 |
62.4987 |
63.0204 |
63.0204 |
77.6847 |
77.6847 |
77.6847 |
77.6847 |
Img 7 |
93.5613 |
93.5108 |
106.7863 |
106.7863 |
103.2414 |
103.2414 |
103.2414 |
103.2414 |
Img 8 |
48.7362 |
48.6133 |
56.4814 |
56.4814 |
57.3388 |
57.3388 |
57.3388 |
57.3388 |
Img 9 |
45.2142 |
45.1501 |
48.2119 |
48.2119 |
60.9927 |
60.9927 |
60.9927 |
60.9927 |
Img 10 |
168.6834 |
168.5498 |
168.3113 |
168.3113 |
188.7353 |
188.7353 |
188.7353 |
188.7353 |
Average |
124.7011 |
124.5211 |
128.1072 |
128.1072 |
154.196 |
154.196 |
154.196 |
154.196 |
Avg. MSE
200
150
100
50
0
124.7011 124.5211 128.1072 128.1072
154.196 154.196 154.196 154.196 |
||||||||||
Method 1 |
Method 2 |
Method 1 |
Method 2 |
Method 1 |
Method 2 |
Method 1 |
Method 2 |
|||
DCT |
DST |
Haar |
Walsh |
154.196 154.196 154.196 154.196 |
||||||||||
Method 1 |
Method 2 |
Method 1 |
Method 2 |
Method 1 |
Method 2 |
Method 1 |
Method 2 |
|||
DCT |
DST |
Haar |
Walsh |
Figure 5: Average MSE of Original Color w.r.t Recovered Color for Method 1 & Method 2
It is observed in Table 2and Figure 5 that DCT using method 2 gives least MSE between Original Color Image and the Recovered Color Image. Among all considered image transforms, DCT using method 2 gives best results. And in Table 1 and Figure 4 it is observed that Haar using method 2 gives least MSE between Original Gray Image and the Reconstructed Gray Image. Among all considered image transforms, less distortion in Gray Scale image after information embedding is observed for Haar Transform using method 2. The quality of the matted gray is not an issue, just the quality of the recovered color image matters. This can be observed that when DCT using method 2 is applied the recovered color image is of best quality as compared to other image transforms used in method 1 and method 2.
5. Conclusion
This paper have presentedtwo method to convert color image to gray image with color informationembedding into it andmethod of retrieving color information from gray image. These methods allows one to send color imagesthrough regular black and white fax systems, by embedding thecolor information in a gray image. These methods are based on transforms i.e DCT, DST, Haar, Walshand Normalization technique. DCT using method 2 is proved to be the best approach with respect to other transforms using method 1 and method 2 for Color-to-Gray and Back Our next research step couldbe to test wavelet transforms and hybrid wavelets for Color-to-Gray and Back.
References
-
T. Welsh, M. Ashikhmin and K.Mueller, Transferring color to grascaleimage, Proc. ACM SIGGRAPH 2002, vol.20, no.3, pp.277-280, 2002.
-
A. Levin, D. Lischinski and Y. Weiss, Colorization using Optimization,ACM Trans. on Graphics, vol.23, pp.689-694, 2004.
-
T. Horiuchi, "Colorization Algorithm Using Probabilistic Relaxation,"Image and Vision Computing, vol.22, no.3, pp.197-202, 2004.
-
L. Yatziv and G.Sapiro, "Fast image and video colorization usingchrominance blending", IEEE Trans. Image Processing, vol.15, no.5,pp.1120-1129, 2006.
-
H.B. Kekre, Sudeep D. Thepade, Improving
`Color to Gray and Back` using Kekres LUV Color Space. IEEE International Advance Computing Conference 2009, (IACC 2009),Thapar University, Patiala,pp 1218-1223.
-
Ricardo L. de Queiroz,Ricardo L. de Queiroz, Karen M. Braun, Color to Gray and Back: Color Embedding into Textured Gray Images IEEE Trans. Image Processing, vol. 15, no. 6, June 2006, pp 1464- 1470.
-
H.B. Kekre, Sudeep D. Thepade, AdibParkar, An Extended Performance Comparison of Colour to Grey and Back using the Haar, Walsh, and Kekre Wavelet Transforms International Journal of Advanced Computer Science and Applications (IJACSA) , 0(3), 2011, pp 92 – 99.
-
H.B. Kekre, Sudeep D. Thepade, RatneshChaturvedi & Saurabh Gupta, Walsh, Sine, Haar& Cosine TransformWith Various ColorSpaces for Color to Gray and Back, International Journal of Image Processing (IJIP), Volume (6) : Issue (5) : 2012, pp 349-356.
TRANSFORMS,International Journal of Advances in Engineering & Technology, Mar. 2013. ©IJAET ISSN: 2231-1963,Vol. 6, Issue 1, pp. 274-281
-
Alfred Haar, ZurTheorie der orthogonalenFunktionensysteme (German), MathematischeAnnalen, Volume 69, No 3, pp 331 371, 1910.
-
J Walsh, A closed set of normal orthogonal functions, American Journal of Mathematics, Volume 45, No 1, pp 5-24, 1923.
-
Dr. H. B. Kekre, DrTanuja K. Sarode, Sudeep D. Thepade, Ms.SonalShroff, Instigation of Orthogonal Wavelet Transforms using Walsh, Cosine, Hartley, Kekre Transforms and their use in Image Compression, International Journal of Computer Science and Information Security, Volume 9, No 6,pp 125-133, 2011.
BIOGRAPHICAL NOTES
Dr. H. B. Kekre has received B.E. (Hons.) in Telecomm. Engineering. From Jabalpur Uiversity in 1958, M.Tech (Industrial Electronics) from IIT Bombay in 1960, M.S.Engg. (Electrical Engg.) from University of Ottawa in 1965 and Ph.D. (System Identification) from IIT Bombay in 1970 He has worked as Faculty of Electrical Engg. and then HOD Computer Science and Engg. at IIT Bombay. For 13 years he was working as a professor and head in the Department of Computer Engg. at Thadomal Shahani Engineering. College, Mumbai. Now he is Senior Professor at MPSTME, SVKMs NMIMS University. He has guided 17 Ph.Ds, more than 100 M.E./M.Tech and several B.E./B.Tech projects. His areas of interest are Digital Signal processing, Image Processing and
Computer Networking. He has more than 450 papers in National / International Conferences and Journals to his credit. He was Senior Member of IEEE. Presently He is Fellow of IETE and Life Member of ISTE. Recently fifteen students working under his guidance have received best paper awards. Eight students under his guidance received Ph. D. From NMIMS University. Currently five students are working for Ph. D. Under his guidance
Sudeep D. Thepade has Received Ph.D. Computer Engineering from SVKMs NMIMS in 2011, M.E. in
Computer Engineering from University of Mumbai in 2008 with Distinction, B.E.(Computer) degree from North Maharashtra University with Distinction in 2003. He has about 10 years of experience in teaching and industry. He was Lecturer in Dept. of Information Technology at Thadomal Shahani Engineering College, Bandra(w), Mumbai for nearly 04 years, then worked as Associate Professor and HoD Computer Engineering at Mukesh Patel School of Technology Management and Engineering, SVKMs NMIMS, Vile Parle(w), Mumbai. Currently he is Professor and Dean (R&D), at Pimpri Chinchwad College of Engineering, Pune. He is member of International Advisory Committee for many International Conferences, acting as reviewer for many referred international journals/transactions including IEEE and IET. His areas of interest are Image Processing and Biometric Identification. He has guided five M.Tech. Projects and several B.Tech projects. He more than 185 papers inInternational Conferences/Journals to his credit with a Best Paper Award at International Conference SSPCCIN-2008, Second Best Paper Award at ThinkQuest-2009, Second Best Research Project Award at Manshodhan 2010, Best Paper Award for paper published in June 2011 issue of International Journal IJCSIS (USA), Editors Choice Awards for papers published in International Journal IJCA
(USA) in 2010 and 2011.
Ratnesh N. Chaturvedi is currently pursuing M.Tech. (Computer Engg.) from MPSTME, SVKMs NMIMS
University, Mumbai. B.E.(Computer) degree from Mumbai University in 2009. Currently working as T.A in Computer Engineering at Mukesh Patel School of Technology Management and Engineering, SVKMs NMIMS University, VileParle(w), Mumbai, INDIA. He has about 04 years of experience in teaching. He has published papers in several international journals like IJIP, IJCA, IJAET, IJACR etc. His area of interest
is Image Colorization & Information Security.