An Extended Performance Comparison of Colour to Grey and Back Using the Haar, Walsh, and Kekre Wavelet Transforms

– The storage of colour information in a greyscale image is not a new idea. Various techniques have been proposed using different colour spaces including the standard RGB colour space, the YUV colour space, and the YCbCr colour space. This paper extends the results described in [1] and [2]. While [1] describes the storage of colour information in a greyscale image using Haar wavelets, and [2] adds a comparison with Kekre's wavelets, this paper adds a third transform – the Walsh transform and presents a detailed comparison of the performance of all three transforms across the LUV, YCbCr, YCgCb, YIQ, and YUV colour spaces. The main aim remains the same as that in [1] and [2], which is the storage of colour information in a greyscale image known as the " matted " greyscale image. I. INTRODUCTION The efficient storage of colour images in digital format has always been a dilemma faced when working with many, high resolution, digital images. With the massive improvements in memory technology these days, from traditional, slower hard disk drives to the newer solid state drives, however, this has become less of a problem due to the increases in available memory. Despite this, digital colour images can take up to three times the storage space of a greyscale image in uncompressed format, and for larger images, this is not a negligible increase. This is why various algorithms have been proposed, and many commercially implemented, that reduce the size of a stored digital image with little or no loss of image information and quality. The JPEG standard is a prime example of such an algorithm.


I. INTRODUCTION
The efficient storage of colour images in digital format has always been a dilemma faced when working with many, high resolution, digital images.With the massive improvements in memory technology these days, from traditional, slower hard disk drives to the newer solid state drives, however, this has become less of a problem due to the increases in available memory.Despite this, digital colour images can take up to three times the storage space of a greyscale image in uncompressed format, and for larger images, this is not a negligible increase.This is why various algorithms have been proposed, and many commercially implemented, that reduce the size of a stored digital image with little or no loss of image information and quality.The JPEG standard is a prime example of such an algorithm.
Another challenge faced when working with digital images today is to find a way to create (or recreate) a colour image from a greyscale image: in essence, to "re-colour" a monochrome image.Unlike the storage problem mentioned above, this one is much harder to solve since it entails the extraction of more information from a source that has less information, i.e. the retrieval of colour (multi-plane) information from a greyscale (single-plane) source.This is, by definition, not directly possiblehow can one create information when none exists?Hence, this problem needs a more indirect solutionthe missing information needs to be provided either externally (separated from the greyscale image to be coloured), or somehow embedded as "extra" information in the greyscale image itself.Examples of the former can be found in [3], [4], [5], and [6].
The technique described in this paper, on the other hand, is based on the latter principlehiding of the colour information in the greyscale image itself.In short, the colour information is hidden in the transform domainthis transform is a wavelet transformof the greyscale image and hence can be extracted from the transformed image.The technique was first described in [1], and this paper is an extension of the technique to more transforms and colour spaces.A similar technique can be found in [7].
An advantage of using this technique as compared to those based on retrieving colour information externally as in [3], [4], [5], and [6] is that this method also indirectly decreases image storage requirements.Having colour information stored in a greyscale image means that the greyscale image is now all that needs to be stored (or transmitted) and from it the colour image can be recreated.Hence, for example, the greyscale image can be transmitted via fax to a recipient and the recipient can recreate the colour image without needing any external information.Thus, multi-plane (colour) data is "compressed" into a single-plane (greyscale).

II. OVERVIEW OF THE COLOUR INFORMATION EMBEDDING
TECHNIQUE This section provides a simple, high level explanation of the technique used to "hide" the colour information in the greyscale image and is as found in [1].
The general procedure is as follows.First, the original colour image is converted to its greyscale equivalent in some colour space.This image is then transformed using an appropriate image transform into the transform domain.In the transform domain, the transformed image is modified by www.ijacsa.thesai.orgembedding the colour components of the image.These components are embedded by replacing the lesser significant portions of the transformed image (high frequency region) by scaled down versions of the colour components.The most significant portion of the transformed image is, of course, left untouched.This modified transformed image is then inverse transformed back into the spatial domain.The greyscale image so obtained is known as the matted greyscale image.Reconstructing the colour image from this matted greyscale image is now straightforward.One simply has to apply the transform, extract the scaled down versions of the colour components, scale them up to their original size, and create a colour image using these scaled up components.Of course, a certain amount of information will be lost due to this scaling of the components.
In this paper, the above technique has been applied using three transforms -the Haar transform, Kekre"s Wavalet Transform (KWT), and the Walsh transform.In addition, to provide a comprehensive comparison, the following colour spaces have been considered for all three transforms -LUV, YCbCr, YCgCb, YIQ, and YUV.The subsequent sections provide a quick reference for all of these colour spaces and the transforms used followed by a detailed description of the technique used.

III. YCBCR COLOUR SPACE
The YCbCr model defines a colour space in terms of one luminance (brightness) and two chrominance (colour) components.It is one of the most extensively used colour spaces and has been considered for many applications such as those described in [7], [8], and [9].In the YCbCr colour space, the Y component gives luminance and the Cb and Cr components give the chromaticity values of the colour image.To get the YCbCr components, the conversion of the RGB components to YCbCr components must be known.The RGB to YCbCr conversion matrix is given below.
To get the RGB values from the YCbCr components, the following conversion matrix can be used.
IV. KEKRE"S LUV COLOUR SPACE The Kekre"s LUV colour space is a colour space generally used in techniques involving the colourization of images such as those described in [4], [10], [11], and [12].In the Kekre"s LUV colour space, the L component provides the luminance, while the U and V components contain the colour information.The RGB to Kekre"s LUV conversion matrix is given below.
To get the RGB values from the Kekre"s LUV components, the following conversion matrix can be used.
A negative value for the U component in the Kekre"s LUV colour space indicates prominence of the red component in the colour image.Similarly, a negative value for the V component indicates prominence of the green component over the blue component in the colour image.

V. YCGCB COLOUR SPACE
The YCgCb colour model [15], [18] is a newly proposed colour space similar to the LUV colour space described in the previous section.Since it is newer than the LUV colour space, it has not yet been used extensively.
In the YCgCb colour space, the Y component provides the luminance, while the Cg and Cb components contain the chromaticity values.The RGB to YCgCb conversion matrix is given below.
To get the RGB values from the YCgCb components, the following conversion matrix can be used.
A negative value for the Cg component in the YCgCb colour space indicates prominence of the green component over the red component in the colour image.Similarly, a negative value for the Cb component indicates prominence of the blue component over the red component.[19] is the colour space used by the NTSC colour TV system, employed mainly in North and Central America."I" stands for "in phase" and "Q" stands for "quadrature," referring to the components used in quadrature amplitude modulation.

VI. YIQ COLOUR SPACE YIQ
As in the YCbCr colour space, the Y component gives luminance and the I and Q components give the chromaticity values of the colour image.To get the YIQ components, the conversion of the RGB components to the YIQ components is defined by the following conversion matrix.
To get the RGB values from the YIQ components, the following conversion matrix can be used.www.ijacsa.thesai.org

VII. YUV COLOUR SPACE
YUV is a colour space [19] that encodes a colour image or video taking human perception into account, allowing reduced bandwidth for chrominance, thereby typically enabling transmission errors or compression artefacts to be more efficiently masked by human perception than using a direct RGB representation.
Similar to the other colour spaces discussed previously, the Y component gives luminance, and the U and V components provide the chrominance values.The RGB to YUV conversion matrix is shown below.
To get the RGB values from the YUV components, the following conversion matrix can be used.
VIII.HAAR TRANSFORM The Haar functions were proposed as a sequence in 1909 by Alfréd Haar [13].Haar used these functions to give an example of a countable orthonormal system for the space of square-integrable functions on the real line.The study of wavelets, and even the term "wavelet", did not come until much later [14].The Haar wavelet is also the simplest possible wavelet.As the Haar wavelet is not continuous, it is also not differentiable.This is a technical disadvantage of Haar wavelets.
The Haar wavelet's mother wavelet function ψ(t) can be described as follows.

IX. KEKRE"S WAVELET TRANSFORM
The KWT matrix is a generic version of the LUV colour space matrix.Unlike most other transforms (wavelet or otherwise), the size of the KWT matrix need not be a power of two which is definitely an advantage of this transform.
The general form of an N x N KWT matrix [19], [20] is as follows.As can be seen in figure 1 above, in the KWT matrix, all values above the diagonal are one (including the diagonal itself).The diagonal just below the primary diagonal has specific values, and all remaining values in the matrix are zeroes.In general, the value of K xy in the KWT matrix, where "x" is the row number starting from 1 and "y" is the column number also starting from one, is given by the following equation.

[ ( ) ]
The inverse KWT matrix is nothing but the transpose of the above general matrix as the KWT is orthogonal.Normalization is required to get back the identity matrix.
X. WALSH TRANSFORM The Walsh transform was first defined in 1923 by Walsh [16], although in 1893 Hadamard [17] had achieved a similar result by the application of certain orthogonal matrices, generally called Hadamard matrices, which contain only the entries +1 and -1.
The image algebra formulation of the fast Walsh transform is identical to that of the fast Fourier formulation, with the exception that the template 't' used for the Walsh transform is as follows.
The Walsh transform shares the important property of separability with the Fourier transform.Thus, the two dimensional Walsh transform can also be computed by taking the one-dimensional Walsh transforms along each row of the image, followed by another one-dimensional Walsh transform along the columns.

XI. COLOUR TO MATTED GREY CONVERSION
The most trivial way to convert a colour image to greyscale for printing is to retain and use the luminance component of the colour image.www.ijacsa.thesai.org The problem with this approach is that regions that have contrasting colours with similar luminance components would be assigned the same output luminance level and would, therefore, look the same.
The other option is to map colours to textures [7].One can control halftone dots or patterns as a function of the colours, for example, as a function of hue and saturation.Hence, regions of different colours with similar luminance will look different after mapping because they would have different textures [3].The procedure proposed in [7] produces a continuum of textures using the DWT that naturally switch between patterns without causing visual artefacts.The DWT decomposes an image into several sub-bands [14] each representing different spatial frequency contents.
In this paper, as explained previously, is an extension of [1] and [2], and is a more detailed study of a technique based on the one described in [7].Here, the wavelet transforms used are the basic Haar transform, the KWT, and the Walsh transform.Five different colour spaces are considered -LUV, YCbCr, YCgCb, YIQ, and YUV.The greyscale image obtained by following the procedure outlined below is known as the matted greyscale image and it contains the colour information about the image embedded within its transform.
As various colour spaces are used, the procedure is outlined for a general colour space "ABC" where "A" is the luminance component, and "B" and "C" are the chromaticity components.As two different transforms are used, even the transforms are generalized as just "the transform."The following procedure has been taken from [1].
The steps involved to create the matted greyscale image are as follows.
1.The original colour image is converted from the RGB colour space into the ABC colour space using the appropriate conversion matrix, that is, using equations ( 1), ( 3), ( 5), (7), or (9) for the YCbCr, LUV, YCgCb, YIQ, and YUV colour spaces respectively.The "A" component is the luminance and is considered as the "original greyscale" image.
2. The "A" component is transformed using the transform into the transform domain.Let this transformed image be known as T o .
3. T o can be divided into 4 regions as shown in figure 2 below.5.The inverse transform is now applied to T m to get a new greyscale image in the spatial domain.This greyscale image now contains colour information hidden within its transform and is known as the matted greyscale image.
XII. COLOUR EXTRACTION FROM MATTED GREY Since the matted greyscale image already contains the colour information hidden within its transform, extracting the colour image from the matted greyscale image is a straightforward procedure.It consists of the following steps.
1.The matted greyscale image is read or scanned.
2. Once available in digital form, the matted greyscale image is transformed using the transform into the transform domain.The transformed image obtained will be T m .
3. T m can be represented as shown in figure 3 below.5. To retrieve an approximation for the "A" component, we replace regions B" and C" in T m by zeroes and perform an inverse transformation.The image obtained in the spatial domain is an approximation of the original "A" component of the image, A approx .Now the approximations for the ABC components are used to convert the image back to the RGB colour space using the appropriate conversion matrices, that is, equations ( 2), ( 4), ( 6), (8), and (10) for the YCbCr, LUV, YCgCb, YIQ, and YUV colour spaces respectively.

XIII. IMPLEMENTATION AND RESULTS
The implementation of the technique described in the previous section was an extension of the implementation described in [1] and [2].The technique was broadened to include the Walsh transform and the results obtained using the Walsh transform were also added.
The technique was applied to a large number of images.All the images were of the size 256 x 256 pixels, and belonged to various categories such as people, objects, vehicles, animals, cartoons, and nature.www.ijacsa.thesai.orgOn applying the technique proposed, the following set of images was derived from the each original imageoriginal colour, original greyscale, matted greyscale, and reconstructed colour.
Performance was measured by calculating the mean square error (MSE) between the original greyscale image and the matted greyscale image as well as between the original colour image and the reconstructed colour image.The MSE is the mean of the square of the Euclidean distances between each pixel value.The Euclidean distance "d" between two images I m and I o is defined as follows.

√∑( )
Where z m is the value of the pixel in I m , z o is the value of the corresponding pixel in I o , and the summation is over all pixels in the images.
It must be noted that for a colour image, each pixel will have 3 values, one for the red (R) plane, one for the green (G) plane, and one for the blue (B) plane.
The MSE thus provides an objective criterion that can be used as a measure of the degree of similarity between two given images.The greater the similarity between the two images at the pixel level, the lower the MSE.
Table 1 shows the MSE values between the matted greyscale images and the original greyscale images averaged across all images for each of the five colour spaces and all transforms.Figure 4 illustrates the results graphically.As can be clearly seen from figure 4, the YCgCb colour space provided the best results in terms of the MSE across all images for the matted greyscale image.Also, the KWT consistently outperformed the Haar transform across all colour spaces, but not by an extremely significant amount.On the other hand, the Walsh transform performed spectacularly well and thoroughly defeated the other two transforms across all colour spaces.
The results for the reconstructed colour images, however, were incredibly different.The table below shows the MSE values between the reconstructed colour images and the original colour images.Figure 5 illustrates the results graphically.It can be noticed that in the case of the reconstructed colour images, there is no clear winner across four colour spaces when the MSE is averaged across all images: YCbCr, LUV, YCgCb, and YIQ.The YUV colour space clearly underperforms using this technique for both greyscale and colour images and hence is not recommended.The colour space that performs the best is the LUV colour space, but not by a large amount.The YCgCb colour space, the YIQ colour space, and the YCbCr colour space give almost identical performance results based on the MSE, and in the case of the Walsh transform, the YCgCb space performs the best.
However, when we study the results with respect to the transforms used, the Walsh transform is literally blown away and produces extremely poor results.Across all colour spaces, the colour image obtained from the matted greyscale image when using the Walsh transform is consistently and significantly poorer than those obtained by the Haar transform Through these results we can hazard a hypothesis that the better a transform performs when creating a matted greyscale image, the worse its resultant reconstructed colour image is.Ideally, we would like a transform that would minimize both the greyscale and colour MSEsnone of these appear to have that property.Some of the images used when implementing this procedure are shown below.In figure 6, we see a simple image of a book.While the cover of the book is textured, on the whole there are not too many colours in this picture.Even so, one can clearly see the reconstructed colour image when using the Walsh transform is nowhere near as good as those using the Haar and KWT transform.Figure 7 shows a cartoon image.Colours in the original are clear cut with prominent boundaries and also have deep saturation.For this image, the Haar transform appears to create a good matted greyscale image (figure 7c), better than those by the KWT and the Walsh transform (figures 7d and 7e).The Walsh transform"s matted greyscale image displays a discolouration at the top left corner while the KWT shows discolouration at near the bottom left.
These spots of discolouration persist in the reconstructed colour images seen in figures 7g and 7h for the KWT and the Walsh transform respectively.The Haar transform does not perform too well in reconstructing the colour image either, but once again, the Walsh transform clearly performs the worst.This image leads to a possibility that this technique does not work very well for "cartoon-like" imagesimages with clearly defined stretches of single coloursespecially reds and yellows.Next, figure 8 depicts a more complex image than those in figures 6 and 7.There is a clear background and foreground; however, both the background and foreground are textured.For this image, the technique works much better when using the Haar and KWT transforms.When considering only the matted greyscale images, all three transforms perform adequately well; when also taking into consideration the reconstructed colour image, as has been the norm, the Walsh transform"s reconstructed image is significantly inferior to those using the Haar transform and the KWT.
XIV. CONCLUSION After applying the technique to embed colour information in a greyscale image using various colour spaces and three transforms and studying the results obtained, it can be safely concluded that the Walsh transform not be considered as an appropriate transform to implement this algorithm.While its results when creating a matted greyscale image are acceptable, its deplorable results on reconstructing the colour image take it completely out of consideration.
The choice between the Haar transform and the KWT is a harder one to make.Not only do neither of them perform spectacularly well across all images, but also neither consistently outperforms the other.The MSE measure itself can be misleading at times as seen in the example images in the previous section (specifically figure 7)while the KWT generally has a lower MSE for the matted greyscale image it does not guarantee the image will be perceived as better than the one created using the Haar transform.Moving on to the reconstructed colour images, the Haar transform slightly edges out the KWT in most cases, but the results are very close for this to be deemed significant.
Finally, when considering colour spaces, except for the YUV colour space, all the other colour spaces considered seem to be as good as each other.In general, the YCgCb colour space slightly outperforms the others.
Hence, in conclusion, it may be stated that while there is no "perfect" combination of colour space and image transform out of those considered here that outperforms all others when applying this procedure to hide colour information in a greyscale image, it can be confidently deduced that the Walsh transform and the YUV colour space must not be used.

Figure 1 -
Figure 1 -General N x N KWT matrix

Figure 2 -
Figure 2 -Structure of To 4. Most of the information in the image is found in the LL region of T o which corresponds to the low frequency components of the image.This region is left untouched.The LH and HL regions of T o are replaced by scaled down versions of the "B" and "C" components respectively.Thus we now have a

Figure 3 -
Figure 3 -Structure of Tm 4. The B" and C" regions of T m are the scaled down versions of the "B" and "C" components of the original colour image.Thus by extracting these two regions from T m and scaling them up back to their original size we get B approx and C approx which are approximations of the original "B" and "C" components of the original colour image.

Figure 5 -
Figure 5 -Colour MSE across all images ) www.ijacsa.thesai.organd the KWT.For the reconstructed colour images, the Haar transform performs slightly better than the KWT.

Figure 6 -
Figure 6 -Colour to grey and back of Book image

Figure 7 -
Figure 7 -Colour to grey and back of Cartoon image

Figure 8 -
Figure 8 -Colour to grey and back of Deer image

TABLE 1 -
GREYSCALE MSE ACROSS ALL IMAGES (MSE BETWEEN

TABLE 2 -
COLOUR MSE ACROSS ALL IMAGES (MSE BETWEEN ORIGINAL COLOUR AND RECONSTRUCTED COLOUR IMAGE)