Abstract

Owning to the high processing complexity, the image restoration can only be processed offline and hardly be applied in the real-time 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 to process 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.

1. 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.

2. Background Materials

2.1. 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 . 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 ; 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).

In (12), the entire vector is 1.

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.

2.2. 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 , the value in this array combination, is representing , it is known that there are vectors 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 high-dimensional 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. The value of and is finally obtained. Error function under the premise that meets minimizes , are added to the optimization calculation, and the final expression is

It is assumed here that the penalty parameter is a normal number. The above problems are solved optimally, support vector , and Then, there is

The numb of standard support vectors in (22) is ; 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.

3. The Proposed Methodology

3.1. 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.

3.2. 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 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 support vectors in the process of degradation, and vector dimension is . We represents this vector with and the pixel with , then image restoration steps are as follows [12].

Step 1. We initialize the TFOA.

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), 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 .

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.

Step 5. Carrying out iteration optimization, repeating Steps 2-4, and stopping iteration optimization when the iteration number reaches the maximum, the parameters are obtained, and then are obtained.
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.

4. 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 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].

4.1.1. 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); 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 size-optimal 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.

4.1.2. Influence of Maximum Iteration Number on Algorithm Performance

In the experiment, we use progressive approaches to population size ; the parameters were set as follows: 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 , 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 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 will inevitably increase the computation time consumed by the algorithm. Secondly, the convergence accuracy of the algorithm can be improved by increasing the , 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 used in this paper is 500.

4.2. 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 for both the training image and the test image through normalization processing. Use the optimization results in the previous section that is 15 and 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 normalized mean square error (NMSE) are used to evaluate the image restoration performance.

Experiment 1 (establishing a mapping relation of image restoration). In order to establish the mapping relationship between original image and blurred image, we add Gaussian blur (, ) and Gaussian random noise (variance=0.01) to Barbara image. Blurred image is generated by convolution of original image and Gaussian filter. Barbara’s image restoration model is constructed from degraded and original Barbara images. After 500 iterations of training, the optimization results for parameters and are 5.2 and 0.6231. 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 (), disk blur (), 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.

5. Conclusion

This paper proposes an image restoration method in edge computing environment which achieves good image real-time 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 images in the training set and have better image restoration than the LR algorithm. The experimental results show that the combination of TFOA and LSSVR can achieve a satisfactory recovery effect. This method has advantages in other areas of competition, especially in terms of CPU time cost.

Data Availability

The data used to support the findings of this study are included within the article.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This work is supported by National Key R&D Program of China (2017YFC0820700); the Foundation of Science and Technology on Information Assurance Laboratory (no. KJ-17-101); and the National Science Foundation Project of China (no. 61701188).