Image Restoration using Mirroring Method Which Based on the Gradient Direction

. Restoring a damaged image is a challenging topic in the field of image restoration. The famous previous method for restoring a degraded image are filters (inverse and wiener) and maximum a posteriori (MAP) formulation. However, that method has limited performance for restoring damaged images. In this paper, the multi mirroring method have been implemented for reconstructing damaged image which based on gradient direction. Firstly, the method will detect damaged image areas and then the multi mirroring method is implemented for filling a damaged image area. The simulation result shows that the proposed method has good result and capable to restore the damaged image.


Introduction
Currently, digital image has been widely used in many field of science, such as medical imaging, electronic devices, photography, military etc. Sometimes, the result of imaging process contains damage in the image, such as blank patches. The age of image also causes image damaging. So that, by image restoration method, image editor can restore damage image similar with the original image. Many methods have been introduced for restoring damaged image such as filters (inverse and wiener) and maximum a posteriori (MAP) formulation, however that method only good works for restoring damaged image that caused by noise and not for restoring blank patches in an image.
Digital image reconstruction has been applied in medical imaging for CT-MRI reconstructs [1]. They use edge information from an MRI image for reconstructing CT images. The image gradient is also applied to find the category of edge information. Saif, Hammad and Alqubati [2] use image gradient to obtain an edge in the image. That is a basic problem in image application [3]. Image gradient has been widely used in the field of computer graphic and computer vision. For example: the tone mapping algorithm [4], Poisson image editing [5], image matting [6], inpainting [7], image stitching [8] etc. Image gradient has an important role in image processing and application.
In this paper, an image restoration method has been proposed using multi mirroring method which based on the gradient direction. The gradient direction is used for determining the mirroring direction. Image mirroring is applied only in damaged image areas and the damaged image area is detected by hoe detection.

Proposed method
In this part, the framework of proposed method consists of Hole detection, Image gradient and Image mirroring, as shown in Figure 1.

Hole detection
Hole detection is used to detect the area of filling pixel by mirroring method. In here, the hole area is made greater than  value. So that can be expressed by Equation (1).
Based on Equation (1), the hole area was segmented, then Equation (1) can be expanded to become Equation (2). This action produces binary image or black and white image. White color indicates the hole area and vice versa, black color indicates non hole area .
Binary image HLm is used for guiding the mirroring process. Mirroring process is applied only in white color area on binary image of HLm.

Image gradient
The image gradients have been used to extract the information from images. The gradient of the image can be calculated independently on x or y direction. Equation (3) and (4) is used to calculate the gradient in x and y direction. The two directions of gradient (x and y) in an image can be found by applying Equation (5).  (6) and Equation (7). S is a derivative filter in x and y direction. Sx indicates derivative filter in x direction and Sy for derivative filter in y direction. Sobel filter was used for Sx and Sy that only returns the x and y edge responses [9][10].
The magnitude of image gradient is given by Equation (8) and the direction of image gradient is expressed by Equation (9) [2]. Figure 1(b) shows the magnitude and direction of the gradient image in Figure 1 In this paper, multiple mirroring was used with a distance of mirroring patches is ∇ L . Figure 3 shows the multi mirroring method for filling empty area in an image. ∇ L1 is mirroring of image area ∇′ L1 and the result as shown in Figure 3 The result is shown in Figure 3(c). Based on that multi mirroring method, for filling the empty area in an image or for restoring damaged images will be applied.
(a) (b) (c) Fig. 3. Illustration of multi mirroring method: (a) is source image with blank area, (b) is mirroring

Experimental result
There are some scenarios for testing the performance of the proposed method. First, the original image was created to become damaged and then the proposed method will be applied for restoring damaged images. Figure 4(a), Figure 4(d) and Figure 4(g) are original image that will be damaged. Figure 4 Figure 4(b) is human image that has blank part in the skin and hair areas, and then Figure  4(c) is reconstruction result that is showing good image patches, as well as for landscape images. A big blank part was made by removing an object in the image as shown in Figure  4(e) and Figure 4(h). In here, the proposed method must be filling the blank part of an image, by implementing an image mirroring method that guided by image gradient direction can patch the blank area in an image and resulting good restoring image which based on human perception.

Conclusion
Image restoration method using multi mirroring and gradient direction has been introduced in this paper. The proposed method will be working well, if hole detection can detect damaged image area well. This is caused by the mirroring process only done in the area as detected damaged image. The mirror direction is following the gradient image direction in surrounding damaged image area. The proposed method has been implemented for reconstructing damaged human image and damaged landscape image. Simulation result in two kind of type image shows the proposed method resulting good reconstructing image, which based on the human perception.