A Novel Real-Time Image Restoration Algorithm in Edge Computing

Owning to the high processing complexity, the image restoration can only be processed offline and hardly be applied in the realtime production life.The development of edge computing provides a new solution for real-time image restoration. It can upload the original image to the edge node toprocess in real time and then return results to users immediately.However, the processing capacity of the edge node is still limited which requires a lightweight image restoration algorithm. A novel real-time image restoration algorithm is proposed in edge computing. Firstly, 10 classical functions are used to determine the population size and maximum iteration times of traction fruit fly optimization algorithm (TFOA). Secondly, TFOA is used to optimize the optimal parameters of least squares support vector regression (LSSVR) kernel function, and the error function of image restoration is taken as an adaptive function of TFOA. Thirdly, the LLSVR algorithm is used to restore the image. During the image restoration process, the training process is to establish a mapping relationship between the degraded image and the adjacent pixels of the original image. The relationship is established; the degraded image can be restored by using the mapping relationship. Through the comparison and analysis of experiments, the proposed method can meet the requirements of real-time image restoration, and the proposed algorithm can speed up the image restoration and improve the image quality.


Introduction
With the development of science and technology, more and more users use their mobile phones for photography.During imaging of the digital image, it is easy to produce image blur due to jitter, light, and many other factors [1], and this phenomenon is called image degradation.Therefore, an effective parameter setting needs to be performed in image restoration processing, which consumes a large amount of resources.The current solution is to use offline servers and other types of processing equipment, which cannot be done in real time.The emergence of edge computing makes real-time processing of such applications possible.Edge computing can meet the user's real-time computing service requests and provides users with low-latency image processing services.The local image is uploaded to edge nodes for real-time processing.We can deploy the Traction Fruit fly Optimization Algorithm (TFOA) and Least Squares Support Vector Regression (LLSVR) to edge nodes.However, the processing capacity of the edge node is limited, so it is necessary to propose a lightweight image restoration algorithm.In this way, the photos taken by the mobile phone can be processed in real time in the edge node.
Image restoration is the reverse process of image degradation.And its ultimate goal is to remove blur and interference, so that the image is restored as close as possible to the original one [2].One of the most typical image blur models is Gaussian blur.Gaussian point spread functions are common in many image acquisition, measurement, and transmission systems.So, many degradation processes can be approximated by Gaussian blur models.The study of Gaussian blurred image restoration is of great significance to other types of degraded image restoration [3].Most of the traditional restoration methods are deconvolution processes, such as inverse filtering, wiener filtering, least square method, and Lucy-Richardson (LR), which are commonly referred to as nonblind restoration methods [4,5].These methods all need to know the point spread function of imaging system, which is very difficult in practical application.In contrast, blind restoration method uses the information carried by the image itself or the degradation model estimation under the condition that the point spread function is unknown and combines the additional conditions to solve the problem [6].This kind of method is widely used at present, but the result is not stable, and the calculation is large and the convergence is slow.
With the rise of in-depth learning in recent years, various machine intelligence models, such as BP neural network and support vector machine, have been widely used in the field of image restoration.In 2011, Mukherjee et al. used a Multilayered Quantum Backpropagation Neural Network for Image Restoration [7]; Sethy et al. proposed an image restoration method based on BP neural network, which has achieved good results, but there is still room for improvement [8].References [9,10] use fuzzy neural network model for image restoration and the image quality has been improved to some extent, but there is still room for optimization.Reference [11] proposes image restoration based on support vector regression (SVR), which improve convergence accuracy and achieves better restoration effect.However, in the optimization process of SVM parameters using FOA, the two internal parameters are not optimized, and only empirical values are given.Based on the existing work, this paper proposes an image restoration method based on TFOA-LSSVR.Through the comparison and analysis of experiments, the proposed method can meet the requirements of real-time image restoration.

Fruit Fly Optimization Algorithm (FOA).
FOA is an algorithm for finding food sources based on fruit fly, which is a globally optimized algorithm [12].The olfactory and visual organs of fruit fly are very developed.It first collects the smell of food while foraging, the position where food and others companions congregate can also be visually detected after approaching the food location and fly in this direction.A schematic diagram of the iterative foraging process for fruit fly populations is shown in Figure 1.The algorithm combines the global search of population with individual information exchange.On that basis of a global search, global optimal solution is updated through individual information exchange.And finally the algorithm is terminated under the condition that either the maximum iteration number or the convergence target precision is met.The steps of FOA are as follows.
Step 1.The population size is expressed by  and the maximum iteration number is expressed by max .The random initial position of fruit fly is expressed by  ,  .
Step 2. Give fruit fly individuals a random direction and distance to use their sense of smell to search for food; ℎ is the search distance, namely, the iterative step value; that is, Step 3. Since the initial position of the food is unknown, we first estimate the distance   between individual and the origin and then set the smell concentration   of individual, which we define here as the reciprocal of the distance.
Step 4. The smell concentration value   brought into the smell concentration determination function to calculate the smell concentration   ; Step 5. Find the individual with the best odor concentration in the population; Step 6.The optimum smell concentration value of  and coordinates ,  are recorded and retained; this time, the fruit fly population uses vision to fly to that location; =  () Step 7. Enter iteration optimization, repeatedly execute Steps 2 to 5, and judge whether the optimal taste concentration is better than the optimal smell concentration of the previous iteration or not and the current iteration number is less than the maximum iteration number max ; if yes, Step 6 is executed.
This paper introduces a new FOA, which is TFOA [13].The optimization algorithm has no change on the two main parameters.Instead, the direction of iteration is strategically optimized, and it solves the problem of falling into a local optimal solution in the solving process.The results of each iteration are recorded.When the algorithm is locally optimal,  represents the best individual [13,14], and  represents the worst individual in each iteration.The size of the Drosophila population is represented by .The final direction of the iteration is represented by the following formula: The new individual generation method is as shown in (11).
The main steps of the TFOA [13] are as follows.
Step 1.The Drosophila population is produced according to (11), that adaptability of the Drosophila individual is calculated, and the worst individual is recorded.
Step 2. The optimal smell concentration and initial position of the population were changed.In this process, if the smell concentration is consistent, the iteration is continued and the count is increased.
Step 3.During the iteration, if the algorithm ends prematurely, (11) is executed to jump out of local optimization.When a better fruit fly is discovered, the population's location is updated and the search continues around it.If it ends too quickly, expand the search radius and continue iterative optimization.When the traction operation is complete, the worst person is rerecorded in each iteration process.
Step 4. Steps 1 to 3 are repeatedly executed, and whether the optimal taste concentration is better than the optimal taste concentration of the previous iteration is judged, until meeting the requirements of the algorithm.

Support Vector Machine (SVM)
. SVM is developed from statistical theory [15].LSSVR is developed from SVM through special treatment [11]; LSSVR is suitable for regression model of static nonlinear function estimation.SVM algorithm has been applied to classification problems since it was proposed; now in the classification direction is very mature, the classification method is effectively extended, and the current extension is also very effective in fitting curves and nonlinear regression estimation.
Trained array {(  ,   ),  = 1, 2, ⋅ ⋅ ⋅ , }, the   ℎ value in this array combination, is representing   ∈   , it is known that there are vectors   = (  1 ,   2 , ⋅ ⋅ ⋅ ,    ) of  dimensions at the same time, and that output result is set to   ∈ .The missing parameter  is When the loss parameter is 0, assuming that the difference between the estimated value and the actual value of the final result obtained by training the () into the support vector machine is smaller than the lost parameter, finding a proper kernel function (  ,   ) = (  ) ⋅ (  ) and mapping the kernel function (  ,   ) = (  ) ⋅ (  ) to a linear highdimensional space for regression prediction, assume here that the function is In formula (14),  ∈   is expressed as the weight value of the vector,  ∈  represents the threshold calculated for the data, and (⋅) is expressed as the inner product operation of the data. max It is assumed here that the penalty parameter  is a normal number.The above problems are solved optimally, support vector (  −   * ) ̸ = 0, and  = ∑  =1 (  −   * )(  ) Then, there is The numb of standard support vectors in (22) is  V ; obtain a  threshold and a regression function: There are three kernel functions commonly used in support vector machines: First: kernel function polynomial The coefficient of the polynomial in (24) is , the value is determined by the application itself, and the parameter is adjusted according to the actual situation.
Second, the radial basis function (RBF kernel function) The core parameter in (25) is ; it uses Gaussian kernel function of mean square error; the larger the value of , the wider the width of the Gaussian function.
Third, Sigmoid kernel function is as follows: The LSSVR represents the following: We need to optimize the selection of parameter  and  before conducting sample training.

Process of Image Restoration Processing.
Assuming that the original image is (, ), the degraded image may be expressed as In (29),  denotes a degraded image, and (, ) denotes additive noise.
If  is a linear, spatially invariant process, the degraded image may be represented in the spatial frequency domain as In (30), * is a convolution operation, (, ), ℎ(, ), (, ) are original image, degraded image, and additive noise.Image restoration is a parameter estimation process.When the fuzzy kernel function is Gaussian, the degeneration process is called Gaussian blur.This type of blurred image can be seen as a result of convolution operation between the convolution kernel of Gaussian distribution and the clear image.Namely, that pixel value of a certain point of the image and the surrounding pixel value are weighted and averaged according to the weight of the Gaussian distribution to obtain the pixel value after the position is degraded.

Optimization Algorithm of TFOA Based on LSSVR.
In this paper, TFOA-LSSVR is introduced into the mapping relationship model between images.In the process of image restoration, the selection criteria of the original image and the blurred image are consistent.Assuming that the size of the image is  × , a  − 1 window of an original image corresponds to the corresponding center pixel in the process of constructing a training sample.If there is a degraded image completely recorded by the near window, we can get ( −  + 1) × ( −  + 1) support vectors in the process of degradation, and vector dimension is  2 × 1.We represents this vector with   and the pixel  with   , then image restoration steps are as follows [12].
Step 2. We set up a two-dimensional space.According to Section 2.1, we have the following formula: Step 3. The mean square error (MSE) function is used as the odor concentration function of TFOA when a mapping relationship is established between the original image and the degraded image.
In (33), t represents the original image,  represents a restored image, the size of the image is  × , and the parameter [, ] in the least squares support vector machine is represented by the parameter [, (, 1), (, 2)].
Step 4. The odor concentration value is calculated by comparing the calculated minimum odor concentration and bringing this value into the LSSVR model, while preserving the optimal location.
After the training sample is completed, the corresponding picture attribute is created by using the same picture size when a new degraded image needs to be restored.Through the LSSVR model, the pixel value of the image is predicted, and finally the pixel value of the image is displayed by pixels.

Experiments and Applications
4.1.Parameter Optimization Analysis of TFOA.The server was simulated in Windows 7 operating system (i5-3210M, 2.5 GHz CPU, 8.00 GB), and the TFOA algorithm was implemented using Matlab2014a.The simulation experiment is carried out by taking the minimum value of 10 benchmark functions [14,16] as an example.The effects of parameters on the convergence accuracy and speed of the algorithm were analyzed and compared.Finally, the appropriate  and max  were determined.Name, function form, search interval, and function optimal value of 10 benchmark functions are in Table 1.The picture material used in this paper comes from [17].

Effect of Population Size on Algorithm Performance.
In the experiment, we use progressive approaches to population size .The final experimental results were analyzed to find out the relationship among the population size, the convergence accuracy, and time complexity of the algorithm.The parameters were set as follows: population size separate values (5,10,15,20); max  is 150 times; optimization iterative step is valued by TFOA algorithm.The search interval is shown in Table 1.The optimal mean value, average running time, and relative change rate of convergence accuracy of TFOA global optimization function are taken as evaluation indexes.The experimental results of 10 test functions after 50 consecutive runs are shown in Table 2.
In Table 2, optimized mean represents the arithmetic mean of the minimum value of the global optimization function; it reflects the convergence accuracy of the algorithm: the smaller the value, the higher the convergence accuracy of the algorithm.Average operation time is the arithmetic average of the algorithm's run time, which is the average time required for the algorithm to run once.Convergence condition refers to optimal mean corresponding to low population sizeoptimal mean corresponding to high population size/optimal mean corresponding to low population size.It shows that the convergence accuracy of the algorithm increases with the increase of population size, and the larger the value, the greater the convergence accuracy of the algorithm.At the same time, as we can see from Table 2, with the increase of , the convergence accuracy of the algorithm is improved, and the average running time is proportional to the increase; however, with the increase of population size, the relative rate of change of convergence accuracy shows a downward trend.The trend line of optimized mean of 10 test functions with increasing population size is shown in Figure 2. In the figure, the ordinate is expressed by optimized mean and the abscissa is population size.
As we can see from Figure 2, at the initial stage of population size increase, the optimized mean decreases monotonically with the increase of population size, and the relative rate of change is the largest; that is, the convergence accuracy of the algorithm is the largest.In the middle stage of population size increase, the optimized mean continues to decrease monotonically with increasing population size, but the relative rate of change decreases; at the later stage of population increase, on functions F4, F5, and F8, optimized mean continues to decrease with increasing population size, but the relative rate of change is also smaller.Therefore, the synthesis of the above analysis can draw the following two conclusions: Firstly, with the increase of population size, the time cost of the algorithm also increases.Secondly, with the increase of population size, the convergence accuracy of the algorithm is improved; however, with the increase of population size, the convergence accuracy of the algorithm cannot be improved significantly, because it is easy to fall into local optimum at the later stage of algorithm iteration.Therefore, the appropriate population size can find the best balance between algorithm performance and running time.
In this paper, 15 is chosen as the population size of TFOA.

Influence of Maximum Iteration Number on Algorithm Performance.
In the experiment, we use progressive approaches to population size max ; the parameters were set as follows: max  separate values are 10, 50, 150, 500, and 1000,  is 15, and the search interval is shown in Table 1.
The optimal mean value obtained from the minimum value of the global optimization function and the running times of the algorithm are taken as evaluation indexes.The experimental results of 10 test functions after 50 consecutive runs are shown in Table 3, the larger max , the higher the accuracy of the optimized mean and the higher the average running time.
The trend line of the optimized mean values of the 10 test functions as max  increases is shown in Figure 3, with the ordinate indicated by optimized mean, and the abscissa is maximum iteration number.
In Figure 3, we can draw the following two conclusions: Firstly, increasing the max  will inevitably increase the computation time consumed by the algorithm.Secondly, the convergence accuracy of the algorithm can be improved by increasing the max , but that continuous increase of the maximum iteration numb does not lead to the continuous and obvious improvement of the convergence precision of the algorithm; this is because it is easy to fall into local optimum at the later stage of algorithm iteration.Therefore, the appropriate maximum number of iterations can find the best balance between algorithm performance and runtime.The max  used in this paper is 500.

Image Restoration Analysis of LSSVM-TFOA.
The server was simulated in edge computing.In order to make the algorithm convincing, we add different types of blur and noise to the standard image for testing.In the experiment, we use the size 512 × 512 for both the training image and the test image through normalization processing.Use the optimization results in the previous section that  is 15 and max  is 500.The initial position of Drosophila is random.In order to evaluate the image restoration effect quantitatively, the peak signal-to-noise ratio (PSNR) and In order to verify the image restoration effect of the algorithm in this paper, the support vector regression [15] and BP neural network algorithm [10] are selected to compare, and the final image restoration effect is shown in Figure 4 and Table 4.
From the final training results, we can know that the mapping approach can heighten the image quality of blurred image.The PSNR of BP neural network algorithm is low, while the NMSE is higher, which is because its initial parameters need to be selected and corrected.SVR method is better than BP neural network in image restoration, but it takes more time in cross-validation of parameters.However, this method takes less time and has higher PSNR and lower NMSE, which shows better image restoration performance.
Experiment 2 (comparison of degraded image restoration using the trained mapping).The TFOA-LSSVR mapping model proposed in this paper is applied to different blurred images.In order to make the algorithm convincing, there are three blurred ways, namely, motion blur ( = 20,  = 30), disk blur ( = 10), and passivation blur.They are,     respectively, applied to three original standard images for blur processing simulation, and Gaussian noise is added to the motion blur images and disk blur images.In order to further explain the image restoration effect, Lucy-Richardson (LR) algorithm [18] is used to restore the different degraded image.The specific results are shown in Figure 5 and Table 5.
In this experiment, TFOA-LSSVR can improve image quality in PSNR and NMSE.But LR algorithm's recovery result is not very satisfactory.For motion blurred images added with Gaussian noise and disk blurred images added with Gaussian noise, the final image clarity of LR algorithm is not improved, and a large number of spots appear.For passivation blurred images, LR results showed some blurring and a large number of spots too.All TFOA-LSSVR algorithms recover images that are clearer than blurred images, and most of the noise is reduced.Therefore, the TFOA-LSSVR model in this paper has better application effect in image restoration.

Conclusion
This paper proposes an image restoration method in edge computing environment which achieves good image realtime restoration results.In this paper, TFOA and LSSVR are combined to establish a nonlinear mapping model for image restoration.Firstly, the population size and the maximum iteration number of TFOA are determined by using 10 test functions.Then, the LSSVR error function is optimized as an adaptive function of TFOA.The LSSVR with optimized parameters is used to establish the degradation relationship between the original image and the blurred image.Finally, the image restoration effect is verified.In order to verify the validity of the mapping method, the BP network and the SVR algorithm were compared, and the feasibility of the combination of TFOA and LSSVR was verified.At the same time, the nonlinear mapping model constructed by this algorithm can be used to recover the degenerate

2 WirelessFFigure 1 :
Figure 1: Population iterative search for food in fruit fly.

10 Figure 2 :
Figure 2: The relationship between population size and optimized mean of F1-F10.

Figure 4 :
Figure 4: The final image restoration effect.
(a) Motion blurred images (b) Disk blurred images (c) Passivation blurred images (d) Restored by LR (e) Restored by the method proposed in this paper

Table 1 :
The classical test functions.

Table 2 :
Effect of population size on algorithm performance.

Table 3 :
Effect of maximum iteration number on algorithm performance.

Table 4 :
Experimental results of different approach.

Table 5 :
Comparison of different restored methods.