PARALLEL COMPUTING FOR BLURRING IMAGE USING MEAN AND WEIGHTED AVERAGE METHOD

Blurring is one of the basic image processing technique in order to reduce the noise in a image. In this paper two methods of blurring which are called mean and weighted average method will be elaborated. Three different sizes of mask (3×3, 5×5 and 7×7) are given for each method. Moreover, three different of resolution images 1000×1000, 700×700, and 400×400 pixels are used. From the experiment result, the output image by mean method is shown a darker than the weighted average method. Additionally, run time of CPU using mean method is around 77.78 % shorter than weighted average method.


INTRODUCTION
Image processing is the process to read an image and extract the information in that image or change the condition of the image.For example, changing image into black and white color, getting an image clearer, making an image blur and etc.This could be done using MATLAB that can be used to do image processing and image quality assessment Krasula et al. (2011); Eker and Eker (2013), or we could use C or C++ to do basic image processing technique or advanced programming technique Schlipsing and Salmen (2010).
Blurring is one of the basic technique in image processing that can be used to protect the information in image or video.For example in the news where a criminal is blurred in the face area or in television series that blurred the brand of some products.Indeed, the blurred image needs a method or some methods to process the original image.Several methods for blurring an image are available, for instance, a Gaussian, mean, weighted average method, and etc.Those methods can be used to blur an image in order to filter or remove noises and to make image readable Patidar et al. (2014); Malviya and Ahmia (2014).
In this paper we want to compare two blurring methods which which are mean and weighted average method.The mean method is a method where calculates a pixel value of the image by averaging the total of neighbors depend on the size of mask.For example, if the size of mask is 3 × 3 it means the total of neighbors are 9.
Image processing can be done by serial or parallel programming to divide the tasks for calculating pixel in the image Saxena et al. (2013).Here, the parallel computing using mean and weighted average method will be investigated.Several experiments will be given in order to show the effect of parallel processing.Moreover, in this research, one image which is known as Lena image will be used as the benchmark.

MEAN AND WEIGHTED AVERAGE METHOD
Convolution is an process for computing an pixel in an image by adding its local weighted neighbors.In this process, a kernel, a convolution matrix, or a mask should be given in the form of a small matrix.This process commonly used for sharpening, blurring, edge detection, and etc.
The illustration of this convolution can be seen in Figure 1.In the figure, the output image is obtained by weighting each pixels in input image in local neighbors.Moreover, the result of output image is depend on the size of local neighbors.
The convolution can be described by the following equation, where T is a function which operates of neighborhood of pixels and x, y is row and column value.In the form of mathematical discrete, it can be written as (2) where i, j is row and column value for g,and k, l is row and column value for h that used to find row and column value for f .where i, j, n > 2 ∈ Z + + {0} and n × n describes the size of mask.
In this paper we will compare the results of mean and weighted average method.We used mask in different sizes for both methods, which are 3 × 3, 5 × 5 and 7 × 7. Following (2), then, the mask for mean h mean and weighted average h weighted method are given as follows, • the mask for mean method, • the mask for weighted average method, In addition, the serial programming and parallel programming using OpenMP library will be elaborated.The run time of CPU for serial program or parallel program will be collected in order to show the performance of the parallel computing.The detail of this research framework is described in Figure 2. Here, the input image should be converted to grayscale image in pre-processing part.Afterward, the method and programming architecture can be chosen which are depend on scenario.As explained in previous framework, in the pre-processing, the image is converted to grayscale image which is shown in Figure 4.The results of mean and weighted average can be seen in Figures 5 and 6 respectively.The results show the image with 3 × 3 mask (left), 5 × 5 mask (middle) and 7 × 7 mask (right).

RESULT AND DISCUSSION
From results image in Figures 5 and  6, we can analyze that the images from mean method have darken color than using weighted average method.This is because of the mask value of weighted average in neighborhood is smaller and in the center is bigger than mean method.Therefore, the pixel value which is calculated by mean method produce image with neat and brighter result.
Indeed this blurring effect can be used to reduce the noise in the image Elad and Feuer (1997).Moreover, the size of mask resulting different effects.From Figures 5 and 6, using 7 mask sizes, the output image is shown more blur than the smaller sizes.
Next, the parallel performance for each mask sizes will be elaborated.Here, three different image sizes 100 1000, 500 × 500 400 × 400 are in order to see the effect of parallel computing.Meanwhile, the parallel performance using mean and weighted average method with mask size 5 × 5 are given in Table 3 and 4 5 and 6 are shown the parallel performance by mean and weighted average method in case using mask size 7 × 7 respectively.Table 7 shows the mean of the time different between serial and parallel approach.Overall from the table of parallel performances, we can see that using parallel computing, the result run time of CPU is shown shorter than serial in all experiments.By using bigger image resolution and mask, the run time of CPU is observed in high computational cost.Moreover, from CPU time, it shows that blurring image using mean method is less computational cost than using weighted average method when the sizes of images and mask are big.
Another interesting point here is from 18 experiments (6 tables times 3 different image sizes), 14 experiments (77.78% of

CONCLUSION
Blurring image is categorized as the basic process in image processing.In this paper, the comparison of run time of CPU using mean and weighted average method is elaborated.From the result, bigger sizes of mask produces more blur than the original image.Moreover, using mean method, the result is a little bit darker than weighted average method.From parallel performance, the program in serial is observed has CPU time longer than in parallel.Thus the parallel computing can help to reduce the computational cost.Run time of CPU using mean method is shown smaller than weighted average method with percentage around 77.78% by 18 times of experiments.

Figure 1 .
Figure 1.The convolution process of an image for each pixel.

Figure 3 .
Figure 3.The original image of Lena.

Table 1 .
Run Time CPU Mask 3x3 Mean Method

Table 2 .
Run Time CPU Mask 3x3 Weighted Average Method Table1 and 2show the CPU time of serial and parallel time using mean and weighted average method with mask size 3 × 3 respectively.

Table 3 .
Run Time CPU Mask 5x5 Mean Method

Table 4 .
Run Time CPU Mask 5x5 Weighted Average Method

Table 6 .
Run Time CPU Mask 7x7 Weighted Average Method

Table 7 .
Run Time Different