Color Restoration of Monochrome Image Formatted by Y 800 1

In order to restore the color of original monochrome image which obtained from Charge-Coupled Device (CCD) directly, we design a Bayer mode color filter array start with specific pixels to satisfy the imaging condition and then we use bilinear interpolation algorithm to restore the color of original monochrome image which formatted by Y800, however, the hues of adjacent pixels change abruptly by the bilinear interpolation, therefore, we use smooth hue transition interpolation to enhance the edge of original image and finally we identify the ultimate performance of these interpolation algorithms by magnified the interpolated image and use mean square error to compare these algorithms, the results show that the smooth hue transition interpolation is better than bilinear interpolation for color restoration of monochrome image.


INTRODUCTION
Usually, we can obtain color image by three-CCD system, or single-CCD camera alternatively.In three-CCD system, each CCD is corresponding to a color value of RGB, so we can obtain a colorful image in this imaging condition, However, the price of this system is so expensive that we can not apply them in reality, so, it is essential for us to use single-CCD color digital camera (Yi et al., 2004).In fact, CCD chip itself does not record any color value, so in order to restore the color information of original image, we need to apply a specific color interpolation algorithm to restore the other two color information, such as GB, RG or RB.The solution is to place a Bayer color filter array before the single-CCD chip (Bahadir and John, 2005).Thus, each element of the array stands for the pixel corresponding to the one color value of RGB, because the pixel can only obtain one color value, such as R, G or B. So, we need to restore the other two color value of every pixel.There are many image interpolation algorithms to restore the color information, such as the nearest neighbor interpolation algorithm, the bilinear interpolation algorithm, the smooth hue transition interpolation algorithm and so on (Sakamoto, 1998).
In our study, we will introduce the imaging model and Bayer color filter matrix for the first, then give some introduction of interpolation algorithms and identify the ultimate performance of these algorithms by several experiments finally.

BAYER IMAGING MODEL AND INTERPOLATION ALGORITHM
Usually, the Y800 data is obtained directly from the CCD sensor without any modification by the processing units of camera, which called original monochrome image which can reflect the intensity of special light at every pixel.However, the Y800 data cannot be applied directly because they are not color image in some degree.In this study, we use Imaging-source camera DFK41BU02 made in Germany to obtain the Y800 original monochrome image.As can be seen in Fig. 1a, we take a photo of a box stored as Y800 original data by this camera, which is an 8-bit data file.In this original data, each pixel represents the grayscale value of the whole image sensor, which is one of the R, G or B value and the pixel doesn't contain the other two color components, such as the value of GB, RG or RB (Wen and Sheng, 2006).In Fig. 1b, we convert the Fig. 1a to a 24-bit image and we can clearly see the enlargement of the small red box of Fig. 1b in 1c.
In order to restore the color information of Fig. 1a, we need to calculate the other two color component values.As we all known, many cameras are manufactured by Bayer model, so in accord with the Bayer imaging model, we can restore the color information by two steps.For the first, we should design a Bayer color filter array which start with two particular pixels for original image data, secondly, it should choose a suitable and efficient color interpolation algorithm for the Bayer color filter array to restore the other two color component values of Y800 original data.
We can see a Bayer color filter array start with GB pixels in Fig. 2, this array is placed in front of the CCD chip and each pixel only stand for one color value of RGB, so the Y800 data is not a color image which reflects the intensity of special light for every pixel.In Fig. 2, R, G and B stand for red, green and blue respectively, for example: the pixel named G1 represents the green value of the first pixel, B2 represents the blue value of the second pixel and R6 stands for the red value of the sixth pixel.Its starting color value determines the starting value of the original data which the base value.Color filter array is different, the starting model is different and so algorithm needs to make adjustments.Usually, there are four Bayer color filter arrays start with GB, BG, RG or GR pixels and different start model need different interpolation algorithms, but only one model is correct.
In this study, we use GB model because imagingsource camera is arranged by this imaging model, which can be seen in Fig. 2.
As can be seen in Fig. 2, the Bayer color filter array just maintain one color value, such as R, G or B, the other two color values of each pixel are removed by Bayer filter, so we need to restore the other two color information of each pixel.In this study, we use bilinear interpolation algorithm and smooth tone transition interpolation algorithm for the Y800 original data.

Interpolation of red/blue pixels at a green position:
The average of two adjacent pixel values in corresponding color is assigned to the interpolated pixel.For example, in Fig. 2, we can obtain the values of B7 and R7 at G7 by Eq. ( 2) and B13 and R13 at G13 by Eq. (3): At G13, it corresponds to the B13 and R13 values for: Interpolation of a red/blue pixel at a blue/red position: The average of four adjacent diagonal pixel values is assigned to the interpolated pixel.For example, in Fig. 2 Smooth hue transition interpolation algorithm: One of the key objections of the bilinear interpolation is that the hues of adjacent pixels change abruptly and in an unnatural manner.The Bayer CFA pattern, on the other hand, can be thought of as consisting of a luminance channel (the relatively numerous green pixels) and a chrominance channel (the relative sparse red and blue pixels).A scheme can be created to interpolate these channels differently.This algorithm is based on Mondrian and.According to Mondrian model, the color ratio rule of adjacent pixels (m, n) and (i, j) can be defined as Eq. ( 5): Interpolation of green pixels: In this algorithm, the method for obtaining green pixel values is the same as bilinear interpolation.Interpolated green pixel values is in front of the interpolate pixel values red and blue.

Interpolation of blue pixels:
The idea here is to try to impose a smooth transition in hue from pixel to pixel.
To do so, we define the blue "hue value" and red "hue value" as Eq. ( 6): Considering the interpolation of blue pixel values there are three different cases of blue pixel value interpolations.
In Fig. 2, we can estimate blue pixel values at the green position and adjacent blue pixels on left and right.For example, we can obtain the values of B13 and at G13 by Eq. ( 7): In Fig. 2, we can estimate blue pixel value at the green position and adjacent blue pixels on top and bottom.For example, we can obtain the values of B7 and at G7 by Eq. ( 8): In Fig. 2, we can estimate blue pixel values at the red position.For example, we can obtain the values of B18 at R18 by Eq. ( 9): 18 18 4 ( 12 12 14 14 22 22 24 24) Interpolation of red pixels: There are three different cases of red pixel value interpolations: • Estimating red pixel values in a green position and adjacent to the location of red pixels on the left and right.For example, we can obtain the values of R7 at G7 by Eq. ( 10): • Estimating red pixel values in a green position and adjacent to the location of red pixels in the top and bottom.For example, we can obtain the values of R13 at G13 by Eq. ( 11): • Estimating red pixel values at the blue position.For example, we can obtain the values of R12 at B12 by Eq. ( 12):

RESULTS AND DISCUSSION
In the following experiments, we use Imagingsource camera to take a photo of a yellow cup stored as Y800 original data, as can be seen in Fig. 3a.In order to identify the ultimate performance of above interpolation algorithm, we use bilinear and smooth hue transition interpolation algorithm to restore the color information of Y800 original sample.

Bilinear interpolation for four starting pixel model:
According to the starting model with GB, BG, GR, RG pixels, we use bilinear interpolation algorithm to restore the color of them respectively, which can be seen in Fig. 3b to e respectively.The results show that the GB model is right for interpolation algorithm and the restoration results of starting model with BG, GR, RG pixels are not correct, because they cannot restore yellow color of the cup.
Smooth hue transition interpolation for four starting pixel model: After the bilinear interpolation for Y800 original image, we use smooth hue transition interpolation algorithm to restore four starting pixel of original data respectively, which can be seen in Fig. 4a to d respectively.The results show that the GB model is still right for interpolation algorithm, the others are not in red line named "1" and "2", then we zoom in the area named "1" and "2" of interpolated image respectively, which can be seen in Fig. 5b to e, the results show that the visual effect of restored image by using smooth hue interpolation algorithm are better than that of using bilinear interpolation algorithm.
Objective quality measure: To compare these algorithms objectively, we adopt Mean Square Error (MSE) as our quality metrics.The MSE between the original image Io (x, y) and the interpolated image Ir (x, y) for each color channel is defined in Eq. ( 13), where m×n is the size of the image: From Fig. 6, we can see that the restored image by using smooth hue interpolation algorithm is closer to the original image than bilinear interpolation algorithm.

CONCLUSION
In this study, we obtained the original image from single CCD without any color information which called Y800 original data.In order to restore the color information of original image, we design a Bayer color filter array with four starting pixels mode and then we use bilinear interpolation algorithm and smooth hue transition interpolation algorithm to restore the color of original image.The ultimate results show that the smooth hue transition interpolation algorithm is better than bilinear interpolation for color restoration of monochrome image.

Fig. 1 :
Fig. 1: (a) The Y800 original data of a box, (b) convert the Fig. 1a to a 24-bit image, (c) the enlargement of the small red box of Fig. 1b

Fig. 2 :
Fig. 2: The bayer color filter matrix models starting with GB pixels Bilinear interpolation algorithm for Y800 data: According to the structure of Bayer color filter array depicted in Fig. 2, we use bilinear interpolation algorithm to restore the color information of Y800 original data.The algorithm can be designed as follows: Interpolation of green pixels: The average of the upper, lower, left and right pixel values is assigned as the G value of the interpolated pixel.For example, in Fig. 2, we can obtain the values of G8 at R8 and G12 at B12 by Eq. (1): 8 ( 3 7 9 13) 4 12 ( 7 11 13 17) 4

Fig. 3 :
Fig. 3: (a) The Y800 original data of a cup, (b) bilinear interpolation in accordance with GB starting model, (c) bilinear interpolation in accordance with the BG starting model, (d) bilinear interpolation in accordance with the GR starting mode, (e) bilinear interpolation in accordance with the RG starting model