- Open Access
- Total Downloads : 232
- Authors : Prof. Dr. Sudeep Thepade, Supriya Padale
- Paper ID : IJERTV3IS070768
- Volume & Issue : Volume 03, Issue 07 (July 2014)
- Published (First Online): 23-07-2014
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License: This work is licensed under a Creative Commons Attribution 4.0 International License
Thepade’s Hartley Error Vector Rotation for Colorization of Grayscale Images
Prof. Dr. Sudeep Thepade1 Supriya Padale2
Department of I.T. Department of Computer Engineering Pimpri Chinchwad College of Engineering Pimpri Chinchwad College of Engineering
Pune, India Pune, India
Abstract There is no proper solution for grayscale image colorization. Initially some techniques were designed for color traits transfer to color grayscale images. The main focus of the techniques is to automize the system to some extend of coloring the grayscale images. The human interaction is needed only to find a reference color image, and then the job of transferring color traits from reference color image to grayscale image is done by proposed techniques. Here the technique of color traits transfer to grayscale images have been performed with respect to RGB color space only but with different codebook sizes. The proposed technique is based on Thepades Hartley error vector rotation algorithm for codebook generation. Here the error vector used for splitting the clusters in Vector Quantization is prepared using Hartley transform. All these clusters are treated as color pallet. The proposed methodology is tested on different images for various codebook sizes using different source and different target. For checking the performance of the proposed grayscale image colorization algorithm, set of images are taken and their grayscale images are taken as targets and those target images are recolored using colors of original images. Mean squared error is calculated between original and resultant images.
Keywords Codebook, Vector quantization, Color pallet, THtEVR
-
INTRODUCTION
The process of adding color to a grayscale image with the aid of computer is known as colorization. Color is sensation of our visual system created by light. When light is incident on human eye retina, it produces visible region of electromagnetic spectrum known as color. The human retina has 3 types color photo receptor cells known as cones. For these cones 3 numerical components are necessary to describe a color. Hence a color can be represented by a tri component vector. A vector space is formed which is set of all colors. Various color spaces can be defined in different ways based on three components of color like LUV, YIQ, YCbCr, RGB etc. The color spaces are selected based on how color signals are generated and what information is needed from these signals. Color spaces can be used to define colors, discriminate between colors, judge similarity between color and identify color categories for a number of applications[16].
It is easy to convert a color image into grayscale image. But vice versa is not true. When we go color to grayscale image we do many to one mapping. But when we go for grayscale to color we do one to many mapping which is difficult because it involves assigning three dimensional pixel
values to an image that varies along only one dimension, luminance.
The process was first invented by Wilson Markle in 1970. He had added color to monochrome footage of moon from Apollo mission. In his process, a color mask is manually painted for at least one reference frame in a shot. Motion detection and tracking is then applied for assigning colors to other frames automatically in a region where no motion occurs[6].
There are mainly 3 methods of colorization. First is the scribbling. In this method user draws strokes in image manually. According to color of strokes the image is colorized. Human intervention is needed here. The other method is segmentation. Segmentation is the process of dividing an image into multiple parts. For colorization, segmentation is to assigning a label to every pixel in an image such that pixels with same label share same color. The source image is segmented. Each pixel is assigned a color from appropriate region using neighborhood matching metric combined with spatial filtering for improved spatial coherence. Each color with certain constrain are given to optimization based algorithm to produce a colorized image[14].
The other method is vector quantization. Vector quantization (VQ) consists of the process of clustering. VQ compression technique comprises two phases: VQ encoder and VQ decoder. In VQ the image is divided into distinct image blocks X = { x0,x1,x2,xm} of size 2 x 2 pixels each. A clustering algorithm is used to generate a codebook C=
{Y1,Y2,Y3Yn} for the given set of image blocks. The codebook C contains a set of representative image blocks known as code words. The VQ encoder searches for the closest match codeword in the codebook for each image block and the index of the codeword is transmitted to VQ decoder [1]. Now the generated codebook works as a color pallet from where the color traits are transferred to the target image.
-
THEPADES HARTLEY ERROR VECTOR ROTATION ALGORITHM
Hartley transform is an integral transform which transforms real valued functions to real valued functions. It was invented by L. Hartley in 1942. The discrete version of this transform known as discrete Hartley transform was introduced by Bracewell in 1983. This is a real valued unitary transform[1].
1 1
1
1
1
1
1
1
1 1
1
1
1
1
1
1
1 1
1
1
1
1
1
1
1 1
1
1
1
1
1
1 1
1
1
1
1
1 1
1 1
1
1
1
1
1 1
1 1
1
1
1
1
1 1
1 1
1
1
1
1
1 1
1
Fig. 1 Hartley matrix of size 8×8
-
THtEVR Algorithm
-
Divide the image into non overlapping blocks. Convert each block into vector in order to form training vector set.
-
Calculate the centroid of this training vector by taking column wise mean.
-
Generate Hartley error vector e
-
Add and subtract error vector ei from centroid and generate two vectors e1 and e2.
-
Compute mean squared error between all the training vectors belonging to this cluster. Then divide cluster into two vectors v1 and v2.
-
Calculate centroid of vectors obtained in step 5.
-
Increment I by 1 and repeat step 3 to atep 7 till codebook of desire size is obtained.
-
-
-
THE PROPOSED ALGORITHM
-
Divide the image into non overlapping blocks. Each block will convert to vector and form training vector set.
-
Calculate the centroid of this training vector by taking column wise mean.
-
Generate Hartley error vector e.
-
Add and subtract error vector ei from the code vector and generate two vector e1 and e2.
-
Compute Mean Squared error between all the training vectors belonging to this clustr. Then divide clusters into two vectors v1 and v2.
-
Compute the centroid for the clusters obtained in the above steps 6.
-
Repeat step 4 to step 6 for each codevector.
-
Repeat the step 3 to Step 7 till codebook of desire size is obtained .i.e. our color pallet.
-
Calculate Mean Squared error between all the training vectors belonging to this cluster and color pallet.
-
Then transferred color on to gray scale image.
-
-
RESULTS AND DISCUSSIONS
The results shown below using the proposed method is implemented on using MATLAB R2012a on Pentium IV,
2.10 GHz, 4 GB RAM. For testing purpose the following images of size 512 × 512 are used. Fig 2 shows the test bed for checking the performance of proposed grayscale image colorization algorithm. Fig 3 shows the test bed of proposed grayscale image colorization algorithm using different source and target image.
Fig 4 and 5 shows the results of the proposed grayscale image colorization using Thepades Hartley error vector rotation. It can be observed from results the proposed algorithm performs very well in terms of obtained mean squared error between the original image and resultant image. Color pallet size 512 and 128 gives better results.
Test Bed:
Fig. 2 Training set for self image recoloring for checking quality of proposed algorithm
Fig. 3 Training set for grayscale image colorization
Original
Target
Codebook
Codebook
Codebook
Codebook
Codebook
Image
Image
Size 32
Size 64
Size 128
Size 256
Size 512
(a1) (b1) (c1) (d1) (e1) (f1) (g1)
MSE 17687.43 17685.1574738.2817684.13 176831.71737.84 17681.58
(a2)
(b2)
(c2)
(d2)
(e2)
(f2)
(g2)
MSE
4415.00
4412.86
4413.00
4413.01
4412.51
(a3)
(b3)
(c3)
(d3)
(e3)
(f3)
(g3)
MSE
9945.22
9944.41
9943.00
9941.12
9940.9
(a4)
(b4)
(c4)
(d4)
(e4)
(f4)
(g4)
MSE
6808.91
6795.84
6705.81
6715.86
6705.42
Fig. 4 Resultant images of self recoloring of proposed grayscale image colorization using THtEVR
Original
Target
Codebook
Codebook
Codebook
Codebook
Codebook
Image
Image
Size 32
Size 64
Size 128
Size 256
Size 512
(a1) (b1) (c1) (d1) (e1) (f1) (g1)
(a2) (b2) (c2) (d2) (e2) (f2) (g2)
(a3) (b3) (c3) (d3) (e3) (f3) (g3)
(a4) (b4) (c4) (d4) (e4) (f4) (g4)
Fig. 5 Resultant images of proposed grayscale image colorization using THtEVR for different source and target
Mean squared error between original
and resultant image
9642
9640
9638
9636
9634
9632
9630
9628
32 64 128 256 512
Color pallet Size
Fig. 6 Mean squared error between original image and resultant image using various color pallet sizes
-
CONCLUSION AND FUTURE SCOPE
The proposed grayscale image colorization technique using Thepades Hartley error vector rotation algorithm colorizes size 512 giving better results for the proposed grayscale image colorization algorithm. The proposed algorithm is
grayscale images without much user intervention. Color pallet
tested using RGB color space. It can be tested on different color spaces in future.
REFERENCES
-
Dr. Sudeep D. Thepade, Vandana Mhaske, Vedant Kurhade, Thepades Hartley Error Vector Rotation For Codebook Generation In Vector Quantization, in Advances in Computing, Communications and Informatics (ICACCI), IEEE, 2013.
-
Dr.Sudeep D. Thepade, Vandana Mhaske, Vedant Kurhade, New Clustering Algorithm TCEVR for Vector Quantization Using Cosine Transform, IEEE, 2013.
-
Dr. H. B. Kekre, Dr. Sudeep D. Thepade, Adib Parkar, An Extended Performance of Colour to Grey and Back Using Haar, Walsh, Kekre Wavelet Transform,in IJACSC, 2012.
-
Dr. H. B. Kekre, Dr. Sudeep D. Thepade, Adib Parkar, An Extended Performance of Colour to Grey and Back
Using Haar, Walsh, Kekre Wavelet Transform,in IJACSC, 2012.
-
Dr. H. B. Kekre, Tanuja Sarode, Sudeep D. Thepade, Supriya Kamoji, Performance Analysis of Various Window Sizes For Colourization of Greyscale Images Using LBG and KFCG Vector Quantization Codebooks in RGB and Kekres LUV Colour Spaces, in IJSCE, September 2011.
-
S. Jayaraman, S. Esakkirajan, T. Veerakumar, Digital Image Processing, in TMH, 2010.
-
H. B. Kekre, Tanuja K. Sarode, New Clustering algorithm for vector quantization using rotation of error vector, International Journal of computer and Information Security, Volume-7,Number-3,2010.
-
Dr. H. B. Kekre, Sudeep Thepade, Colour Traits Transfer to Greyscale Images , in ICETET, 2008.
-
Dr. H. B. Kekre, Sudeep Thepade, Nikita Bhandari, Colorization using LBG and KFCG VQ Codebooks in RGB and Kekre's LUV Color Space, in AMIJ, 2008.
-
L. Qing, F. Wen, D. Cohsen-Or, L. Liang, Y.-Q. Xu, H. Shum, Natural Image Colourization, in ACM, 2007.
-
Daniel Sykora, Jan Burianekb, Jiri Zara, Colourization of Black and White Cartoons, in Science Direct, Volume-
23, ISSN: 767782, May 2005.
-
R. Irony, D. Cohen-Or, and D. Lischinski, Colourization By Example, in SIGGRAPH, ACM, 2005.
-
A. Levin, D. Lischinski, Y. Weiss, Colourization Using Optimization, in SIGGRAPH, ACM, 2004.
-
T. Welsh, M. Ashikhmin, and K. Mueller, Transferring Colour to Greyscale Images, in SIGGRAPH, ACM, 2002.
-
E. Reinhard, M.ashikhmin, B. Gooch and P. Shirley, Color Transfer between Images, IEEE, 2001.
-
K. N. Plataniotis, A. N. Venetsanopoulos, Colour Image Processing and Applications, in Monograph, 2000.