Shadow Removal Based on Gamma Decoding Method for Moving Object Images

Shadows are reflections of objects exposed to light. So there is an image pixel that has a darker intensity than the object’s pixel. The development of digital technology, the shadow into noise on digital images and digital video. Therefore, the information on the image becomes inaccurate. One of the usage of digital image or video digital is intelligent transportation system using digital video-based CCTV camera. But the use of digital video has several problems, including the presence of a shadow. Therefore, it is necessary to have a method to eliminate shadows. In this paper, we use gamma decoding method to determine object pixels and pixel shadow based on the illumination of the object, so the shadow pixels can be eliminated. The result of this research is images without shadow.


Shadow Removal Based on Gamma Decoding Method for Moving Object Images
Hasanuddin Al-Habib and Budi Setiyono Abstract-Shadows are reflections of objects exposed to light.So there is an image pixel that has a darker intensity than the object's pixel.The development of digital technology, the shadow into noise on digital images and digital video.Therefore, the information on the image becomes inaccurate.One of the usage of digital image or video digital is intelligent transportation system using digital video-based CCTV camera.But the use of digital video has several problems, including the presence of a shadow.Therefore, it is necessary to have a method to eliminate shadows.In this paper, we use gamma decoding method to determine object pixels and pixel shadow based on the illumination of the object, so the shadow pixels can be eliminated.The result of this research is images without shadow.
Index Terms-Gamma decoding, moving object images, shadow removal.

I. INTRODUCTION
I N, digital imaging, the shadow is an area affected by a lighting change.In other words, when the object is placed between the light source and the background surface, the object will block the light to get to the background surface.Basically, shadow consists of two categories, namely umbra and penumbra.Based on the the above conditions, the shadow is one of the noises in a video or digital image that is affected by the accuracy of image recognition or object counting.So, a special treatment is needed to eliminate the shadow.Some previous research related to this research was conducted by Chin-Teng Lin in 2010 [1].In that research, the authors used gaussian mixture model method as subtraction method background and foreground, and this research is using uniform lighting distribution.Mohamad Toha et al. [2], researches to remove the shadow of moving objects by estimating the image foreground with frame different and applying the gamma decoding method to segment the shaded area and object area.Budi Setiyono et al. [3] in 2016, have conducted a research on the topic of eliminating shadows and in 2017, a research [4] investigates how to separate an object from a sequential images which can simplify the process of shadow removal.Another study by Prajapati et al. [5] combines the averaging method and gaussian mixture model as subtraction method background and foreground in HSV color space.
In this paper, we apply gamma decoding method to segment shadow pixels and object pixels from a frame of video digital.

II. THE ALGORITHM OF SHADOW REMOVAL
Gamma Correction or better known as Gamma is a nonlinear function used to mark (encode) and read luminance (decode) marks on an image, either video or a single image [6].Therefore, the information that we got from images can be known as shadow or part of the object because Gamma correction defined it well.Decode process from the Gamma is applied to each pixel of image, so we can mark each shadow position.Gamma Correction is simply defined as the result of the gamma rank on each image pixel value.
where the non-negative result of the v in input value will be increased by the γ and multiplied by the constant A. Generally, the value A = 1 and the result is within the [0, 1] range.The gamma value (γ) < 1 is called gamma encoding which is often used in the compression process, whereas the gamma value (γ) > 1 is called a gamma decoding process that applies more to gamma expansion.
Gamma Decoding method will be used in the process of identifying shadow pixels on the object.Because based on basic information about the illumination of shadows on the image, the gamma decoding method is able to "darken" the shadow of the object.So the thresholding process using the method of thresholding can be done optimally and the shadow of the object can be identified [2].
In general, the method of this research can be seen on Fig. 1.From the diagram, the input data used is a video which will be given to the frame extraction process.After Input data and frame extraction process, we have to generate RGB background before frame difference process.So after the video becomes a few frames and generate the RGB background from these frames is conducted by using value mode of intensity value in each position.This process is carried out to calculate the mode value for each image pixel as long as the sequence of images moves from the first to the n-th frame.So that the mode value of each pixel pixel image is obtained which then the image intensity value at that point is considered as background.After that, frames extraction result are then processed in the frame difference method to obtain differences in the k-th and the RGB background.Mathematically the frame difference process can be presented in the equation below.
is the result of the frame difference, I k is the result of k-th frame extraction, and B k is the RGB background.The process is a segmentation process to get the image object from background.So that the image object can be separated from the existing background.It should be noted that the intended image object is including the shadow of the object.The result of this process will facilitate the gamma decoding method to perform splitting of image pixels and image pixels, since almost uniform background pixels can be ignored.Gamma decoding method applies to each pixel of the image, so the intensity value of each pixel is changed.After this process, we have to apply Otsu's thresholding.
Otsu thresholding method is a method for segmentation based on image histogram.Otsu method works by maximizing inter-class variance (between-class variance).This inter-class variance is suitable for class statistical discriminant analysis.The Otsu method uses a histogram to group against the pixels in the image.This grouping is based on threshold or threshold values.This threshold value becomes objective or purpose of Otsu method.The basis of the Otsu method is the difference in intensity of the pixels separated in certain classes.So, for each frame, we will have a threshold which is different for each other.
The final result of otsu's thresholding is a threshold value to convert the image becomes a binary image.From this process, we can get each pixels that identified as shadow pixels.

III. SHADOW DETECTION AND SHADOW REMOVAL
The results of otsu give us the reference to the identified image pixels as shadows and objects.In Fig. 2, the obtained binary image is the result of the Otsu process performed by satisfying the conditions according to the following equation: Based on the condition, we have identified the shadow pixels by the pixel intensity value equals to one.After that, the removal process will be executed.In this study, for the removal method, we just replace the pixel value from the identified shadow pixel with the intensity value of the background.So, the pixel identified as shadow is removed.

IV. EXPERIMENTS AND RESULTS
We have designed a testing scenario for this shadow removal method as in Fig. 4. Based on the picture above, the original object without a shadow is given a shadow by giving a lighting.Objects with these shadows are used for testing experiments.The experiments performed, we used static image data to obtain PSNR values based on the method.This value is used as a reference image quality obtained.In this test, the data used is a simple single static object to obtain the value of PSNR.This test is done with the data in the form of images of objects with shadows and images of objects without shadows which subsequently shaded images are processed in the shadow removal method to obtain images without shadow the results of shadow removal process and calculated PSNR.We also can generate the flow diagram of the experiment as follows Fig. 5. Experiments in this study were divided in two categories of data, namely simulation data and field test data.Test results with simulation data is used to measure the quality value of shadow removal results, while field test data is conducted to determine the performance of methods visually.

A. Experiment Using Data Simulation
For the experiment by simulation data we have generate from 3Ds Max Community.It is conducted to obtain a video without shadow object and video with shadow object so we can compare it and obtain the PSNR value to find out the quality level of the shadow removal method used.The data explained above as follows: Using the simulation data above, we can obtain the data of PSNR value in the test frame presented in Table I.Based on the data in Table I, it can be seen that the intensity of light affects the quality of shadow removal method results.The intensity of light affects the dark level of a shadow formed.So, in the shadow removal method used, the best light intensity is 0.8.It means that the intensity of light that is not too dark and not too vague gives good shadow removal results with this method.This condition is affected because the results of mapping and shadow identification of the gamma decoding method are at the best performance.This condition was placed on the best identified range of the gamma decoding method.Based on the data in Table II above, it can be seen that the width of the shadow affects the results of shadow removal.In the table and graph the best PSNR values are obtained on data with the width of the first category shadow, which is the smallest shadow width category.So with the shadow removal method used in this paper, the smaller shadow width will have a better quality.This is because the pixel image image processed in the method becomes smaller, so the shadow pixel identification error by method becomes smaller and the level of similarity with the video without the shadow becomes higher.

B. Experiment Using Field Data
Besides simulated data testing, there are tests with field test data.This data was taken from real picture from a box with shadow and without shadow and real video from Ahmad Yani streets that is simulated as off-line cctv video output which is of type .mpegand size 320x240 pixels.This data is used as test data measured visually.From the results obtained on Fig. 10, it can be seen that the shadow of moving objects can be detected and eliminated.This is due to the gamma decoding method successfully maps object shadow pixels based on the level of illumination it receives.Basically this method depends on the level of image pixel illumination on the moving object, so that changes in the results of shadow detection on moving objects will be more dynamic.
The other result of this study can be seen at Fig. 12 that showed result from shadow removal method on our data simulation and Fig. 13 showed the result of from real video in multiple shadowed object.In this paper, we have described a system for removing shadows from a single scene image.We can concluded as follows: • The intensity of light affects the dark level of a shadow formed.It means that the intensity of light that is not too dark and not too vague gives good shadow removal results with this method.Its proved by the highest PSNR value at intensity equals to 0.8 • The smaller shadow width will have a better quality.This is because the pixel image image processed in the method becomes smaller, so the shadow pixel identification error by method becomes smaller and the level of similarity with the video without the shadow becomes higher.For future research, the shadow removal method can be extended into some of color space, such as HSI, CYMK, etc. Furthermore, the testing data can be added with some categories, such as the object moving directions.

Fig. 2 .
Fig. 2. (a) Frame before any process (b) Frame after frame difference method

Fig. 5 .
Fig. 5. Simulated scenario of Experiment to obtain PSNR Value

Fig. 8 .
Fig. 8. (a) Shadowed images (b) Shadow removal result (c) Original image From the Experiment result in Fig. 8, we obtain the PSNR value 47.0717 dB at Red channel, 46.9290 dB at Green channel, and 46.3442 dB at Blue channel.The value of this PSNR from this experiment is affected by the similarity of the

Fig. 10 .
Fig. 10.Shadowless image as the result of the method in RGB images

TABLE I TABLE PNSR FOR
INTENSITY DIFFERENCE IN EACH CHANNEL

TABLE II TABLE PNSR FOR
INTENSITY DIFFERENCE IN EACH CHANNEL