Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
Analysing Assorted Window Sizes with LBG and KPE Codebook Generation Techniques for Grayscale Image Colorization

Analysing Assorted Window Sizes with LBG and KPE Codebook Generation Techniques for Grayscale Image Colorization

Ratings: (0)|Views: 41 |Likes:
Published by ijcsis
This paper presents use of assorted window sizes and their impact on colorization of grayscale images using Vector Quantization (VQ) Code Book generation techniques. The problem of coloring grayscale image has no exact solution. Attempt is made to minimize the human efforts needed in manually coloring grayscale images. Here human interaction is only to find reference image of similar type. The job of transferring color from reference image to grayscale is done by proposed techniques. Vector quantization algorithms Linde Buzo and Gray Algorithm (LBG) and Kekre Proportionate Error (KPE) are used to generate color palette in RGB and Kekre’s LUV color space. For colorization source color image is taken as reference image which is divided into non overlapping pixel windows. Initial clusters are formed using VQ algorithms LBG and KPE, used to generate the color palette. Grayscale image
which is to be colored is also divided in non overlapping pixel windows. Every pixel window of gray image is compared with color palette to get the nearest color values. Best match is found using least mean squared error. To test the performance of these algorithms, color image is converted into gray scale image and the same grayscale image is recolored back. Finally MSE of recolored image and original image is compared. Experiment is conducted
on both RGB and Kekre’s LUV color space for the different pixel windows of size 1x2, 2x1, 2x2, 2x3, 3x2, 3x3, 1x3, 3x1, 2x4, 4x2, 1x4, 4x1. However Kekre’s LUV color space gives outstanding performance. For different pixel windows KPE with 1x2 and LBG with 2x1 pixel window perform well with respect to image quality.
This paper presents use of assorted window sizes and their impact on colorization of grayscale images using Vector Quantization (VQ) Code Book generation techniques. The problem of coloring grayscale image has no exact solution. Attempt is made to minimize the human efforts needed in manually coloring grayscale images. Here human interaction is only to find reference image of similar type. The job of transferring color from reference image to grayscale is done by proposed techniques. Vector quantization algorithms Linde Buzo and Gray Algorithm (LBG) and Kekre Proportionate Error (KPE) are used to generate color palette in RGB and Kekre’s LUV color space. For colorization source color image is taken as reference image which is divided into non overlapping pixel windows. Initial clusters are formed using VQ algorithms LBG and KPE, used to generate the color palette. Grayscale image
which is to be colored is also divided in non overlapping pixel windows. Every pixel window of gray image is compared with color palette to get the nearest color values. Best match is found using least mean squared error. To test the performance of these algorithms, color image is converted into gray scale image and the same grayscale image is recolored back. Finally MSE of recolored image and original image is compared. Experiment is conducted
on both RGB and Kekre’s LUV color space for the different pixel windows of size 1x2, 2x1, 2x2, 2x3, 3x2, 3x3, 1x3, 3x1, 2x4, 4x2, 1x4, 4x1. However Kekre’s LUV color space gives outstanding performance. For different pixel windows KPE with 1x2 and LBG with 2x1 pixel window perform well with respect to image quality.

More info:

Published by: ijcsis on Jul 07, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

07/21/2013

pdf

text

original

 
(IJCSIS) International Journal of Computer Science and Information Security,Vol. 9, No. 6 June 2011
Analysing Assorted Window Sizes with LBG andKPE Codebook Generation Techniques for GrayscaleImage Colorization
Dr. H. B.Kekre
Sr. Professor,MPSTME, NMIMS Deemed-to-beUniversity,Vileparle (W),Mumbai-56, India.
Dr. Tanuja K. Sarode
Asst. Professor,Thadomal Shahani Engg.College,Bandra (W), Mumbai-50,India.
Sudeep D. Thepade
Asst. Professor,MPSTME, NMIMS Deemed-to-beUniversity,Vileparle (W),Mumbai-56, India.
Ms. Supriya Kamoji
 
Sr.Lecturer,Fr.Conceicao RodriguesCollege of Engg,Bandra (W),Mumbai-50, India.
 
 Abstract
—This paper presents use of assorted window sizes andtheir impact on colorization of grayscale images using VectorQuantization (VQ) Code Book generation techniques. Theproblem of coloring grayscale image has no exact solution.Attempt is made to minimize the human efforts needed inmanually coloring grayscale images. Here human interaction isonly to find reference image of similar type. The job of transferring color from reference image to grayscale is done byproposed techniques. Vector quantization algorithms Linde Buzoand Gray Algorithm (LBG) and Kekre Proportionate Error(KPE) are used to generate color palette in RGB and Kekre’s LUVcolor space. For colorization source color image is taken asreference image which is divided into non overlapping pixelwindows. Initial clusters are formed using VQ algorithms LBGand KPE, used to generate the color palette. Grayscale imagewhich is to be colored is also divided in non overlapping pixelwindows. Every pixel window of gray image is compared withcolor palette to get the nearest color values. Best match is foundusing least mean squared error. To test the performance of thesealgorithms, color image is converted into gray scale image and thesame grayscale image is recolored back. Finally MSE of recoloredimage and original image is compared. Experiment is conductedon both RGB and Kekre’s LUV color space for the different pixelwindows of size 1x2, 2x1, 2x2, 2x3, 3x2, 3x3, 1x3, 3x1, 2x4, 4x2,1x4, 4x1. However Kekre’s LUV color space gives outstandingperformance. For different pixel windows KPE with 1x2 and LBGwith 2x1 pixel window perform well with respect to image quality.
 Keywords- Colorization , Pixel Window, ColorPalette, VectorQuantization(VQ) , LBG, KPE.
I.
 
I
 NTRODUCTION
Colors always provide more clear information than grayscale digital images. Colorization is the art of adding color to amonochrome image or movie. Colors we perceive in an objectare determined by nature of light reflected from the object. Dueto the structure of human eye, all colors are seen as variablecombinations three basic colors Red, Green, Blue (RGB). Thetask of coloring a grayscale image involves assigning RGBvalues to an image which varies along only the luminancevalue. Since different colors may have the same luminance butvary in hue and saturation, the problem of coloring gray scaleneeds human interaction [1].Gray scale image is represented by only the luminance valuesthat can be matched between the two images. Because a singleluminance value could represent entirely different parts of animage, the remaining values within the pixel’s neighborhoodare used to guide the matching process. Once the pixel ismatched, the color information is transferred but originalluminance value is retained [2].The details in color image can be utilized for analysis and studyof particular image in the applications like medicaltomography, information security, image segmentation, etc.Coloring of old Black and White movies and rare images of monuments, celebrities is one of the best applications whichgive good feel and understanding.In case of pseudo-coloring [3] where the mapping of luminancevalues to color values is automatic, the choice of color map iscommonly determined by human decision. The main concept of colorization techniques exploits textual information. The work of Welsh et al , which is inspired by the color transfer [4] and by image analogies [5], examines the luminance values in theneighborhood of each pixel in the target image and add to itsluminance the chromatic information of a pixel from a sourceimage with best neighborhoods matching .This technique workson images were differently colored regions give rise to distincttextures otherwise, the user must specify rectangular swatchesindicating corresponding regions in the two images.Color traits transferred to gray scale images [6] presents novelcoloring techniques where color palette is prepared using pixelwindows of some degree taken from reference coloring image.For every window of gray scale image the palette is searchedfor equivalent color values which could be used to color grayscale window [19].In this paper, adjacent pixels are grouped together to form a(pixel window) grid. Vector Quantization algorithms LBG andKPE are applied on different pixel window sizes 1x2, 2x1, 2x2,2x3, 3x2, 3x3, 1x3, 3x1, 2x4, 4x2, 1x4, 4x1and codebook of size512 is obtained. Vector Quantization algorithms LBG and KPEare applied. Depending on minimum Euclidean distance, LUV
134http://sites.google.com/site/ijcsis/ISSN 1947-5500
 
(IJCSIS) International Journal of Computer Science and Information Security,Vol. 9, No. 6 June 2011
components of reference image are transferred to input grayimage.II.
 
EKRE
S
LUV
COLOR SPACE
[
15,21
]In the proposed technique Kekre’s LUV color space is used.Where L gives luminance and U and V gives chromaticityvalues of color image. Positive values of U indicate prominenceof red components in color image and negative value of Vindicates prominence of green component. The RGB-to LUVand LUV-to-RGB conversion matrices are given in equation 1and 2 respectively.
 L
=
110112111
*
 BG R
(1)
 BG R
=
111111021
*
2/6/3/
 L
(2)III.
 
V
ECTOR 
Q
UANTIZATION
 Vector Quantization (VQ) [7],[8] is an efficient and lossytechnique for compression of data and has been successfullyused in various applications like an pattern recognition[11],speech recognition and face detection[12][13],imagesegmentation[14],speech data compression [16],content basedimage retrieval CBIR[17],[18] etc.Vector Quantization can be define as a mapping functionthat maps k-dimensional vector space to a finite set
CB = {C
1
,C
2
,C
3
, ..…., C
N
}
. The set CB is called codebook consisting of  N number of codevectors and each codevector C
i
= {c
i1
, c
i2
, c
i3
,……, c
ik 
} is of dimension k. The key to VQ is the goodcodebook. Codebook can be generated in spatial domain byclustering algorithms.In color transfer phase, image is divided into nonoverlapping blocks and each block then is converted to thetraining vector 
X
i
= (x
i1
, x
i2
, ……., x
ik
)
. The codebook is thensearched for the nearest codevector C
min
 by computing squaredEuclidian distance as presented in equation (3) with vector 
X
i
with all the codevectors of the codebook 
CB.
This method iscalled exhaustive search (ES).d(X
i
, C
min
) = min
1
 j
 N
{d(X
i
,C
 j
)} (3)where d(X
i
,C
 j
) =
(X
ip
- C
 jp
)
2
 It
 
is obvious that, if the codebook size is increased to reduce thedistortion the searching time will also increase.The following section describes the VQ codebook Generation Algorithms.
 A.
 
 Linde Buzoand Gray Algorithms(LBG) [7,8]
In this algorithm centroid is first calculated by takingaverage as the first code vector for the training set. In figure1two vectors are generated by using constant error addition to thecodevector. Euclidean distances of all the training vectors arecomputed with vectors v1 & v2 and two clusters are
 
formed based on closest of v1 or v2. This modus operandi is replacedfor every cluster. The
 
shortcoming of this algorithm is
 
that the
 
cluster elongation is +135
O
to horizontal axis in two dimensionalcases resulting in inefficient clustering.
Figure1 LBG for Two dimensional case.
 B.
 
Kekre’s Proportionate Error (KPE) Algorithm [9,10]
Here to generate two vectors v1 & v2 proportionate error isadded to the codevector. Magnitude of elements of thecodevector decides the error ratio. Hereafter the procedure issame as that of LBG. While adding proportionate error a safeguard is also introduced so that neither v1 nor v2 go beyond thetraining vector space eliminating the disadvantage of the LBG.Fig. 2, shows the cluster elongation after adding proportionateerror.
Figure 2 orientation of line joining two vectors v1 and v2 after addition of  proportionate error to the centroid.
 IV.
 
P
ROPOSED
C
OLORING
T
ECHNIQUE
 Since the coloring problem always requires humaninteraction. So reference image of same class and of samefeature as of input grayscale image. The color transfer algorithm is discussed for LUV color space for different m x n pixel grid size. The main steps of algorithm for a color transfer are:
 
Convert RGB components of source color image intorespective Kekre’s LUV color components.
 
Divide the image in to blocks of m x n pixels. Hencem x n x3 dimensional training vector setcorresponding to LUV components of each pixel isobtained. On this set LBG and KPE algorithms areapplied and color palette is generated i.e. codebook of size 512.
 
The input gray image is divided in mxn blocks of  pixels. Each block (pixel window) is searched for 
135http://sites.google.com/site/ijcsis/ISSN 1947-5500
 
(IJCSIS) International Journal of Computer Science and Information Security,Vol. 9, No. 6 June 2011
 
nearest code vector of color palette. While searchingonly luminance is compared
 
Once the nearest match is obtained gray image pixelwindow is replaced by LUV codevector 
 
The final colored image in LUV domain is thenconverted into RGB plane and MSE of original color image and recolored image are calculated.V.
 
ESULTS
 The algorithms discussed above are implemented usingMATLAB 7.0 on Pentium IV, 1.66GHz, 1GB RAM. To test the performance of these algorithms we have converted color image to grayscale image and the same gray image is recolored back. Finally MSE of original image and colored image iscompared. Five color images belonging to different classes of size 128x128x3 are used.Figure3 to Figure6. Shows the results of LBG and KPE for Zebra, Book, Cartoon and Face images considering same imageas reference image.Figure7 and Figure8. Shows the results of LBG and KPE for scenery and dog images considering different image as
 
reference image.
 6(a)Original image
 
6(b)Gray image
 
6(c)1x2 Grid LBGMSE: 926(d)1x2 Grid KPEMSE: 81Figure 6 shows reconstruction of face grayscale image using similar sourceimage for pixel window 1x2.7(a)OriginalImage7(b)ReferenceImage7(c)GrayImage7(d)1x2 GridLBGMSE 9907(d)1x2 Grid KPEMSE 709Figure 7 shows reconstruction of Scenery grayscale image usingdifferent source image.8(a)OriginalImage8(b)ReferenceImage8(c)Gray Image8(d)1x2GridLBGMSE 3038(e)1x2 GridKPE MSE285Figure 8 shows reconstruction of Dog grayscale image using differentsource image.
 Various images, each of size 128x128 pixels, wereused to build the color palette, and their grayscaleequivalents were colored using color palette for various pixel windows. The fig. 9, shows bar chart of averagemean squared error obtained across all five images withrespect to initial few pixel windows for RGB and Kekre’sLUV color space. It is observed that, Kekre’s LUV color space gives less MSE compared to RGB color space.Hence in table 1 only Kekre’s LUV color space results for different images using 12 varying pixel windowsizes(1x2,2x1,2x2,2x3,3x2,3x3,1x3,3x1,2x4,4x2,1x4,4x1)are given.
Figure 9– Average MSE across various Grid sizes for different color spaces3(a)Originalimage
 
3(b)Gray image
 
3(c)1x2 Grid LBGMSE: 178.4
 
3(d)1x2 Grid KPEMSE: 73.85Figure 3 shows reconstruction of Zebra grayscale image using similar source image for pixel window 1x24 (a)Original Image4(b)Gray Image4(c)1x2GridLBGMSE73.84(d)1x2 Grid KPEMS53.32Figure 4 shows reconstruction of book grayscale image using similar source mage for pixel window 1x25(a)Original image
 
5(b)Gray image
 
5(c)1x2 Grid LBGMSE: 1260
 
5(d)1x2 Grid KPEMSE:1023Figure 5 shows reconstruction of cartoon grayscale image using similar source mage for pixel window 1x2
136http://sites.google.com/site/ijcsis/ISSN 1947-5500

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->