AUTOMATED APPROACH FOR COLOR IMAGE GENERATION

We introduce a general technique for “generating” images by automatic transferring luminance and color between a source and a target images both can be in black/ white, grayscale and color images at any time. Although the general problem of adding luminance and chromatic values to a target image was not exact, so, the current approach attempts to provide a method to help minimize the a mount of human labor required for this task. This method perform the image generating rely on luminance matching techniques between the source and target pixel neighborhood


INTRODUCTION
Although various image processing concepts are in common use in the computer graphics [6],an application of image generation to this domain is a recent filed of research.
One wishes to generate an image from another for many reasons: choose the colors and intensity which increase the visual appeal of an image such as an old black and white photo; they make an old movie nicer, and help to make a scientific illustration more attractive.Two images are converted into three dimensional (YIQ) pixel values, such that dealing the target image as an image whose elements (pixels) are characterized only by one feature (luminance or intensity).
Our method is best on simple premise: neighboring pixels in square block that have similar intensities between source and target image blocks, should have the luminance and the chromatic information of a pixel from a source image with best matching.This matching is formalized this promise using a cost function and obtain an optimization problem that can solve efficiently using standard techniques.
To perform the matching, the average pixel luminance with it neighborhood and the standard deviation of the luminance in a pixel neighborhood with size of (N * N) pixels are used.The matching performs on a pixel with its neighborhood of the source image using a sequential search.
In this study, we examines the luminance values in the neighborhood of each pixel in the target image and add to it the luminance and the chromatic information of a pixel from a source image with best neighborhoods matching.The procedure of evaluation works by minimizing the matching error (in term of luminance) between pairs of source and target pixel neighborhood.Then, transfer luminance and chromatic from the best evolved source neighborhood matching to the target [1].
Our concept of transferring chromatic values from one image to anther is inspired by work by Welsh et al and Reinhard et al,[2][3], in which chromatic values are transferred between two images.In their work, chromatic values from source image are transferred to a second image using simple but surprisingly successful procedure.In preceding word, it transfer chromatic values as well as the luminance value from source to target in order to satisfy the meaning of generation process.In the proposed approach, we would like to satisfy the following: 1. Quality; it should produce pleasing results.2. Generality; it should work remarkably well for a wide range of images.3. User-friendly; the number of tunable input parameters should be minimal.4. Simplicity; the algorithm implementation simple.5. Efficiency; computational cost, time required by this technique.

THE LUMINANCE/ CHROMINANCE COLOR SYSTEM:
When processing color images we can use the RGB system and processing each color plane separately.This is the simplest approach to dealing with color To overcome this, we often make use of another color representation known as the luminance/ chrominance color system.Color images are broken down into a luminance component corresponding to the brightness and two chrominance components representing the color information.The luminance is essentially a monochrome version of the image, whilst the chrominance is calculated from what are known as color differences.However, there are various different ways of calculating these components.For example, in the PAL standard used in European television systems, the luminance(Y) and the chrominance components (I and Q) are defined as: Where R, G, and B are the values of Red, Green and Blue components respectively [4].Note that the chrominance components are defined in terms of the difference between the blue and red components and the luminance, and hence are known as color differences.Other standards, such as the NTSC standard used in the USA and the SECAM standard used in Europe, use the same definition for luminance although differ in their definitions of the two chrominance components.
One significant advantage of using the YIQ system is that it allows us to processing the color and brightness/ luminance of an image separately, e.g.modifying the brightness without changing the color and vice versa.
In the below, we present the characteristics components of this algorithm.

THE PROPOSED GENERATION APPROACH
In this section, we describe the general algorithm for transferring luminance and chromatic from source to target image.The general procedure for this task requires a simple idea.Both source and target RGB image are converted to a decorrelated color space that minimize the correlation between the three coordinate axes of the color space.The color space provides three decorrelated, example of decorrelated color spaces is YIQ principal channels corresponding to an chromatic luminance channel, and two chromatic channels in which change made on one color channel should minimally effect values in the in other channels.Then we use each pixel with its neighborhood to move from one pixel to another.In each time, we use a neighborhood statistic to determine the best match among them.Then, find the best match for a pixel.Once the best matching pixel is found, the Y, I and Q values are transferred to the target pixel.

Error Evaluation
Next, it is important to define a suitable function to minimize luminance-matching error between two images.
In order to transfer luminance and chromaticity values from the source to the target, Each pixel in the target image must be closest to a pixel within best neighborhood in the source image.The comparison is based on the luminance value which is determined by the Y channel in YIQ space and neighborhood statistics of that pixel.
The neighborhood statistics are precomputed over the image and consist of the standard deviation of the luminance values of the pixel neighborhood.The best matching is selected based on the weighted average of luminance (50 %) and standard deviation (50 %).The comparison is based on the luminance value and neighborhood statistics of that pixel.This step is similar to texture synthesis algorithms, [4][5], in which the distance is used to find texture matches.) Pixels neighborhood to find suitable pixels from source is defined to be: Where function  and function are represent luminance average and standard deviation of its argument both taken with respect to a N*N source or target neighborhood as referred to by subscript s or t respectively.j i, : are indices of a pixel in row i and column j .
Once the best matching pixel is found the luminance and chromaticity values are transferred to the target pixel.

Hybrid Image Matching
The search technique imposed by the proposed generation approach has hybrid form: a global and local search.A global search explores the luminance search space of the source image to locate suitable regions to that of luminance regions of the target image.This global search is hybrid with a local search that selected the most suitable pixels luminance to that of the corresponding pixels in the target image.

The Proposed Algorithm
In this section, we go to produce final image by generation process.The general procedure requires a few simple steps.
1. RGB for both target and source images are converted into YIQ space.This space has been chosen because it promptly provides the luminance value which is a crucial datum for our procedure.2. Evaluate mean and standard deviation for each pixel luminance and the neighborhood statistics.After the evaluation process is completed.3. Search the best pixel and neighborhood luminance.4. Transfer (YIQ) from source image to the target image.5. Finally, convert YIQ to RGB from the final image.Although, this procedure is very simple and direct the experimental results show that it works very well on a large set of images.Results, comments and discussion are the object of the next section.

THE EXPERIMENTAL RESULTS
In fact, there is no good objective criterion available for measuring the perceived image similarity.However, there are a number of common error measurements [7].Mean Square Error (MSE) measures the average amount of difference between pixels of output image and original target image.If the MSE is small, the output image closely resembled the original.The sum of luminance differences between output image and original image is defined as:  suitable size in this method is 5*5.obviously, decreasing this size results in more acceptable results but at the expense of increasing maximum required more time.Table 1 reports the results of the MSE and running time of the algorithm that rage from 11 seconds to 28 minutes on a PentiumIII 900 MHZ CPU.Running time will be depend on the neighborhood size and the size of images.Most images can be generated reasonably well in under a minute.

Target Image Source Image Generated Image
Target Image Source Image Generated Image lum represent a luminance value of its argument, t n and t m : are respectively width and depth of target image.lumI :The original image.lumP :The generated image.This section reports all the experimental results obtained with the proposed method.Fig 1 shows some examples of generated images obtained with the generation algorithm.Different source or target pixel neighborhood size can be used such that (3*3,5*5,7*7,…,15*15) but the most

Table 1 :
Represent The results For Target Images