Research Article Industrial Image Enhancement Method Based on Cloud Edge Fusion

Aiming at the problems of high mean square error, low peak signal-to-noise ratio, and long enhancement time of traditional industrial image enhancement methods, an industrial image enhancement method based on cloud edge fusion was proposed. Firstly, the industrial image is preprocessed and denoised by median ﬁ ltering algorithm to detect the edge of denoised image. Then, the image is enhanced by top hat transform. Finally, the cloud edge fusion method is used to complete the task of industrial image enhancement to improve the e ﬃ ciency of industrial image enhancement. The experimental results show that the mean square error of this method is kept at a low level, the peak signal-to-noise ratio is always above 53 dB, and the average industrial image enhancement time is 0.96s. This method has good performance and can obtain a good industrial image enhancement e ﬀ ect, which has certain application value.


Introduction
With the development of social economy and the improvement of industrial production technology, more and more enterprises have adopted large-scale automatic assembly line for industrial production. The use of these assembly lines greatly increases the production efficiency of products [1]. A variety of product inspection, production monitoring, and part identification applications are involved in the assembly line production process. In the early industrial assembly line production, the identification was generally carried out by a manual method [2]. Many workers identify and test samples on the assembly line. This detection method is usually restricted by various conditions: for example, the working environment is not suitable for workers to work for a long time, precision components should not be directly measured, and longterm repeated labor is also easy to make workers have a negative attitude, thus affecting the detection effect. And some of the items need to be testing features such as surface color, the shape of tiny components matching, and circuit board welding foot detection, which use the artifi-cial method and are not stably detected, which requires the detection method to have higher precision and image quality. Resolution is an important premise, which improves detection precision, so it is necessary to enhance industrial image processing [3].
In the foreign countries, image enhancement technology involves the setting of many hardware parameters. With the progress and development of the times, the equipment and system for image enhancement have been successfully developed and widely used in other fields. The wavelet transform method is mainly used for image enhancement. Nowadays, electronic information technology is the most important of the six high-tech fields, which is mainly used in image and signal processing. In reality, many images and signals are unstable, and wavelet transform can better deal with unstable images and signals. China has learned from many mature theoretical systems and advanced technical conditions abroad. It is also constantly enhancing the industrial image processing technology and has made great development. The technology of image enhancement has been changed from using plain grating for scanning display to using computer technology for corresponding image processing. In industry and engineering, image enhancement technology is mainly used in nondestructive testing, quality testing, and automatic control of the process, which shows that the research of image enhancement in China has achieved a qualitative leap and continues to advance on the road of progress.
In the past, the algorithm of improving industrial image has some innovation in technology and method, but it is still difficult to meet the requirements of industrial image quality. Image enhancement is an important part of image processing. A traditional industrial image enhancement method only improves the quality of industrial image, and it does not adapt to the development of the times. Although the simple operation of industrial image enhancement method is easy to realize, there will be a large error in the image and the image is not clear enough. However, the complex industrial image enhancement method can improve the quality of industrial image, but it is not very operational, which requires a relatively large amount of human and material resources, and also affects the efficiency of enhancing industrial image.
In order to solve the problems of the above methods as the research objective, this paper proposes an industrial image enhancement method based on cloud edge fusion, and the effectiveness of the method is verified by simulation experiments. Because the edge of the industrial image is mostly regular curve and the background gray value of the image. Finally, the cloud edge fusion method is used to enhance the industrial image. The experimental results show that the proposed method has low mean square error and high peak signal-to-noise ratio, which effectively enhances the industrial image and has certain practical significance.
The industrial image enhancement method based on cloud edge fusion has more pertinence for industrial image processing, is combined with practical application for image processing, and is combined with practical application for image processing. While reducing the amount of operation, it also avoids the introduction of the new noise, reduces the difficulty of industrial image processing, and has strong operability. Therefore, the image enhancement method based on cloud edge fusion can be applied to many fields, which provides a new path for image enhancement-related research.
The rest of the sections are as follows: Section 2 introduces related work about the content of this paper. Section 3 discusses the design of industrial enhancement method by leading in cloud edge fusion. Section 4 stresses the advantage of the new method by enough experiment and analysis. And Section 5 is the conclusion of the whole paper.

Related Work
The study of image enhancement method of industrial progress has been made: for example, Reference [4] proposes a X-ray image enhancement method based on gradient field, the method with gradient field enhancement as the core; its overall image enhancement steps are divided into two steps; first of all, in this method, an algorithm based on logarithm transformation and compressed image gray scale range removes the redundancy of the image gray level information and improves image contrast. Then, the gradient field is used to enhance the image details, improve the local contrast of the image, and improve the image quality. However, this method is too complicated and the image enhancement time is too long. Because industrial images are more disturbed by external world, the fundamental mountain has more time to reduce noise reduction. Reference [5] discussed an image enhancement method based on industrial field environment. Aiming at the problems of weak illumination and uneven illumination in industrial environment, the method used an image enhancement method combining spatial domain and frequency domain to enhance the image of mixed material particles taken. The contrast of the whole image can be enhanced by using histogram bidirectional equalization to gray density and gray distance of the histogram. Laplace transform can sharpen the image and highlight the details of the edge of the particles, so that the particles can be clearly presented. The high-frequency lifting filter smoothens the image after Fourier transform and removes the image noise, so as to enhance the image. However, this method has large image mean square error and low peak signal-to-noise ratio, which is far from the ideal application effect. In Reference [6], it proposed a new method of infrared polarization image enhancement based on mutual structure canonical constraint. The weighted neighborhood gradient fusion of the Q component and U component of Stokes parameters was carried out according to the description of infrared polarization characteristics. The polarizing feature images were obtained, and the polarization characteristics of the target edge and contour were captured. On this basis, a mutual structure canonical constraint model was built, and the similarity of edge structure between the fusion results and the polarizing feature image and the gray consistency with the radiation intensity image were combined with the gradient amplitude similarity operator. The enhanced high-quality infrared polarization image was optimized. However, the implementation of this method has high complexity, which leads to a long time of image enhancement and low efficiency.

Design of Industrial Image Enhancement Method
Before industrial image enhancement, it is necessary to preprocess the industrial image. Industrial image denoising and edge detection are the necessary image processing methods. Image denoising can keep the details of the image and restrain the influence of noise on the image quality, while the edge processing is the further operation of industrial image denoising, which can further improve the quality of industrial image.
3.1. Industrial Image Denoising. In order to enhance the industrial image, it is necessary to deal with the noise in the industrial image. Therefore, this paper first denoises the industrial image. Removing noise linear filtering is the 2 Wireless Communications and Mobile Computing most traditional method, which takes the average in the field of fixed target pixel as the target pixels. This way of denoising algorithm is simple. The maneuverability is very strong. The algorithm determines the characteristics of it, although it has smoothing noise, but blurs the image details, which is restricting factors of this algorithm. The median filtering algorithm is put forward for someone [7]. Namely, take the median of fixed target pixel domain as the target pixel values. Compared with traditional linear filtering algorithm, this algorithm can keep certain image details for the noise interference pulse. The dot has good inhibition, industrial image highly vulnerable to the effects of the two kinds of noise, so choose the median filter algorithm as the denoising algorithm of this system. An industrial image denoising process based on median filtering is as follows: Let matrix ½x i,j be an industrial noise image to be detected (where i and j represent the positions of each point). A noise identification matrix ½ f i,j with the same dimension as ½x i,j is defined to represent the distribution of noise in the original image, and According to the idea of extremum median filtering, W represents the noise detection window of size ð2n + 1Þð2n − 1Þ, and W½x i,j represents the window operation centered on point x ij . All pixel points in the image are classified according to whether they are extremum points in the neighborhood. If they are extremum points in the neighborhood, they are classified as noise points of class ðNÞ. If not, it will be classified as signal point class ðSÞ, i.e., In formula (1), the minimum value in the neighborhood W½x i,j of a pixel point is represented by min ðW½x i,j Þ, while the maximum value in the neighborhood is represented by max ðW½x i,j Þ. According to the conditions in the above formula, the elements in the identification matrix corresponding to the suspected noise point are set as f ij = 1 [9].
As mentioned above, the local extremum point is not necessarily the noise point; it may be the edge point of the image. According to human visual characteristics, human eyes are more sensitive to noise points in detail rich regions than in smooth regions. How to ensure that the nonnoise extreme points will not be processed, or the filtered image pixels will not be dislocated with the image pixels with large neighborhood difference, which needs to be fully combined with the information around the image pixels for analysis, so it is necessary to carry out the second noise detection on the image [10].
As with the first noise detection, ð2n + 1Þð2n − 1Þ window is still used to detect noise, and then the pixels judged as noise points in the above formula are detected for the second time. Then, the 3 × 3 gray values of all pixel points in the filter window are composed of the following sets: The gray average value of all pixel points in the 3 × 3 filtering window is shown as follows: The idea of the second noise detection is as follows: in the filtering window centering on the corresponding image pixel points of f ij = 1 if formula (4) is true, it is determined that the pixel point x ij at the center of the filtering window is a noise point, and its mark remains unchanged. If formula (5) is true, the pixel point x ij in the center of the filtering window is determined to be the signal point, and the mark is reset to f ij = 0.
The detection threshold g i,j represents the noise sensitivity coefficient based on human visual characteristics; it is defined as The second noise detection method is used to determine all the pixels that are determined as noise points for the first time. For the pixels that meet formula (4), their identification f ij does not change [11]. For the pixel satisfying formula (5), the mark is changed to f ij = 0.
If a point in the image can satisfy formulas (1) and (5) at the same time, the corresponding f ij of the point is set to f ij = 1. If formulas (1) and (5) cannot be satisfied at the same time, set f ij corresponding to this point to f ij = 0. Then, the binary image f i,j reflecting the noise distribution is obtained.
For x ij which is determined as a noise point in the noise detection stage, the degree of noise pollution in the filter window with x ij as the center point is calculated [12], which can be expressed as follows:

Wireless Communications and Mobile Computing
where ρ is the ratio of the total number of noise points in the filter window, h to the total number of n × n pixels, ½ f i,j is the element value at the corresponding position in the identification matrix, and A is the size of 3 × 3.
Let G med ði, jÞ be the median value of signal pixels (i.e., nonnoise points) in window A, and its value is where Aði, jÞ is the gray value of the pixel in window A.
In this paper, we need to set two parameters T 1 and T 2 ; if ρ ≤ T 1 , then use G med ði, jÞ instead of x ij pixel gray value. If ρ > T 1 , enlarge the size of the filter window and recalculate ρ and G med ði, jÞ in the enlarged window.
When the filter window size has been expanded to the specified maximum size of n max and still cannot meet the condition of ρ ≤ T 1 , the size relationship between ρ and T 2 is compared. If ρ < T 2 , the value of current pixel x ij is replaced by G med ði, jÞ at this time. If ρ ≥ T 2 , the current pixel field is considered to be a flat area in the image, and the gray value of the current point remains unchanged at x ij , and the final processed image f is output.

Image Edge Detection.
On the basis of industrial image noise removal, in order to achieve industrial image enhancement, the edge processing is the key. Therefore, it is necessary to detect the edge of industrial image. The image denoising algorithm represented by median filter algorithm is the most basic image preprocessing algorithm in the field of industrial image. As the front end of all advanced image processing algorithms, its importance is self-evident. Different from the image denoising algorithm, in the field of industrial image, edge detection is generally applied to some specific fields, such as the shape of mechanical parts and the shape of the image; the characteristics of these fields are that the outline of the image is very simple, and most of them are regular curves [13]. Edge detection is the most basic operation to detect significant changes in an image, which can be reflected by the gradient of the image gray distribution. The gradient is the two-dimensional equivalent of the first derivative, as shown in the following formula: The direction angle and amplitude of the vector are shown in formulas (11) and (12), respectively.
In practical application, the absolute value is used to calculate the amplitude, and the difference is used to approximately calculate the partial derivative [14], which is the most basic edge detection method, as shown in After G x and G y are obtained, the final edge is obtained by comparing with the given wide value. In the field of ordinary image, the contour of the image is changeable and irregular, and there are many more effective methods to obtain the edge. The Sobel algorithm is an example. Any pixel 88 in the original image is taken as the center, and the gradient of the window center pixel in the x and y directions is calculated, respectively [15]. The principle is shown in the following formula: The gray value of the transformed image at ði, jÞ is shown in the following formula: After getting g, the final edge is obtained by comparing with the given broad value. Comparing the most basic edge detection algorithm and the widely used Sobel edge algorithm, it can be found that Sobel can obtain the edge of image more effectively, but the amount of operation is greatly increased, which consumes considerable hardware resources, and it is very easy to introduce new noise. When the edge detection is applied to industrial image field, the edge of the image is usually a regular curve, which determines that the edge of the image can be obtained without complicated edge detection algorithm. Therefore, combined with the practical application, the following edge detection methods are adopted in this paper.
The industrial images that need edge detection are mostly targeted at certain specific objects, such as mechanical parts, optical fiber and other industrial devices. The characteristics of such industrial images are that the gray level is not much, the edges of the images are mostly Wireless Communications and Mobile Computing regular curves, and the background gray value of the image does not change much. When the light source is uniformly irradiated on the image, it can be found that there is a significant difference between the background of the image and the gray value of the industrial devices in the image, as shown in Figure 1. It can be seen from Figure 1 that there is a significant difference between the gray value of the image background and the industrial device under the uniform light source illumination [16]. The purpose of edge detection is to get the shape of industrial device. If the gray level of industrial image is single and the shape of edge detection object is regular, it is unnecessary to use the spatial operator similar to Sobel to get the edge of image. Under the condition of uniform illumination, it is only necessary to compare the image data with the set width in real time. The schematic diagram of edge detection algorithm is shown in Figure 2.
As shown in Figure 2, the wide value output port is added in SPOC, and the wide value is flexibly controlled through NIOSII [17] to achieve the best edge detection effect. Different from the median filter denoising algorithm, the edge detection algorithm selected in this paper is very simple, but it can be completely applied in the process of industrial image edge detection. It can be seen that the edge detection algorithm is not complex, but practical, and can get the ideal effect with the least resources and the simplest logic.

Industrial Image Enhancement Based on Cloud Edge
Fusion. On the basis of the above industrial image preprocessing, the cloud edge fusion method is used to realize the industrial image enhancement.
Combining with the results of image edge detection, the top hat transformation results can be obtained by opening and closing the industrial image. The top hat transformation [18][19][20] is divided into white top hat transformation and black top hat transformation, which are expressed as WTH and BTH, respectively. The basic idea of image enhancement is to enlarge the contrast between the bright and dark areas. WTH transform is often used to extract the bright regions corresponding to the structural elements, while BTH transform is often used to extract the dark regions corresponding to the structural elements. Therefore, the expression of image enhancement algorithm based on top hat transform is as follows: where f represents the original image, f En represents the enhanced image, f w represents the extracted bright area, and f b represents the extracted dark area.
According to the definition of multiscale structural elements, we can get the image bright areas extracted by WTH on the s-th scale as follows: Similarly, on the s-th scale, the dark areas extracted by BTH are as follows: WTH transform can be used to extract the bright area of the image, and the gray value of the bright area is larger. The final multiscale bright detail should be the maximum gray value of the bright detail extracted from all scales: where f c w is the multiscale image bright region extracted from all scales.
Similarly, the final multiscale dark detail should be the maximum gray value of the dark detail extracted from all scales: where f c b is the dark area of multiscale image extracted by all scales.
The multiscale image details between adjacent scales represent the bright and dark details of the image between different scales. The bright details between the adjacent s and s + 1 scales can be expressed as The final multiscale bright image feature is the one with where f d w represents the final multiscale image bright feature.
Similarly, the dark details between adjacent s and s + 1 scales can be expressed as The final multiscale dark image feature has the largest gray value among all the extracted dark image features, as follows: where f d b is the final dark feature of multiscale image. In order to enhance the image details effectively, the extracted bright details and dark details are added to the extracted image bright area and dark area, respectively, as follows: The final image enhancement result can be obtained by using the light and dark features extracted by multiscale top hat transform: On this basis, the cloud edge fusion method is used to schedule the industrial image enhancement task. Among them, "cloud" in cloud edge refers to cloud platform, "end" refers to client (i.e. smartphone terminal) and node end, and "edge" refers to edge device. Among them, the industrial image data obtained above is obtained into the research through the edge device [21], and the industrial image data is divided into multiple blocks according to the quality of the image data [22], and then the edge divided data is uploaded to the cloud platform, and several industrial image data located under the same edge node are cached to the terminal. All the industrial image data are not obtained from the cloud platform separately, which provides the basis for the subsequent image quality enhancement. The industrial image enhancement task scheduling framework based on cloud edge fusion designed in this paper is shown in Figure 3.
In this paper, the improved artificial bee colony algorithm is used for cloud edge task scheduling. The problem of selecting the optimal value of load balance, economic cost, and completion time of three evaluation attributes of cloud edge collaborative resource scheduling is transformed into the optimization problem of artificial bee colony algorithm for load P ws , economic cost P c , and time consumption P t . The cloud edge task scheduling model is selected as the fitness function. The selection of the maximum number of iteration cycles L depends on the processing capacity of the cloud side task scheduling simulation simulator and the actual number of tasks. The overall scale of bee colony is selected according to the task T that the cloud edge task scheduling system needs to handle. The following is the specific process of industrial image enhancement task scheduling based on cloud edge fusion: (Step 1) Set three evaluation indexes: load P ws , economic cost P c , consumption time P t , and the maximum number of iteration cycles T ( Step 2) According to the number of tasks to be processed T, the initial population is randomly generated, and the colony size is C n Illumination NIOSII control Threshold settings Real-time comparison of gray values

Image input
The gray value is greater than the threshold output 255 The gray value is less than the threshold output 0 Figure 2: Edge detection process. 6 Wireless Communications and Mobile Computing ( Step 3) Lead the bee to initialize the honey source location, and evaluate the attribute fitness f it i according to the following formula: Among them, P i represents the calculation of a single attribute of the cluster and P i min (Step 4) According to the calculation method of formula (29) (where x ij and v ij are the task attribute solutions in the resource scheduling strategy, represented by P i ), the solution of task attribute P i is generated, and the position fitness value is calculated Among them, ϕ is the disturbance degree to the step size, and a and b are the coefficient factors of the second and third term, respectively. The calculation formula of x ij is as follows: (Step 5) Calculate the selection probability p i of the solution according to formula (31), and follow the bee with greedy algorithm:   Step 9: record the current task attribute to get the optimal value; (Step 10) Determine whether the termination condition is met, and preset the maximum number of iteration [23][24][25] cycles of the simulation simulator [26] (Step 11) If it is satisfied, the optimal resource scheduling scheme will be output. If it is not satisfied, it turns to step 4

Experimental Analysis
In order to verify the effectiveness of industrial image enhancement method based on cloud edge fusion, experimental design is needed. The experiment is carried out on the MATLAB platform. MATLAB [27][28][29] is a set of powerful engineering calculation software, which is widely used in many fields. The use of MATLAB platform can make the calculation more simple and improve the efficiency of calculation. It is easy to conduct and compare the draft. Part of the code generated by the program is shown in Algorithm 1.
In order to eliminate the influence of other factors on the experimental results, the CPU, memory, hard disk, network card, operating system, and simulation software are set to ensure the accuracy of the experimental results. The experimental environment is shown in Table 1.
The network crawler technology was used to capture industrial images, and 1000 pieces of data were collected as experimental sample data. 500 pieces of data were compiled as training sample set for model testing, and the remaining 500 pieces were compiled as an experimental sample set for experimental testing to verify the effectiveness of the proposed method. On this basis, the enhancement method based on gradient field, the enhancement method based on industrial environment, and the enhancement method based on cross structure regularization constraint are used as experimental comparison methods. The effectiveness of the proposed method is verified by comparing the evaluation indexes of different methods. The evaluation indexes selected in this paper are mean square error, peak signalto-noise ratio [30], and image enhancement time. The     Wireless Communications and Mobile Computing smaller the mean square error of the image, the smaller the deviation; that is, the more uniform the gray distribution of the image, the better the image quality. The higher the PSNR, the better the image quality and the better the image enhancement effect. The shorter the industrial image enhancement time, the higher the enhancement efficiency. The mean square error of the enhanced images of the four methods is compared, and the comparison results are shown in Table 2.
According to the data analysis in Table 2, the mean square error of the research method is 0.518, 0.497, and 0.583 lower than that of the comparison method when 100 experiments are carried out. With the increasing of sample data, the mean square error of different methods presents different rules of change. With the increase of the number of experiments, the mean square error decreases to a certain extent, but the decrease is not significant. The mean square error of this paper has been kept at a low level, which shows that the gray distribution of industrial image enhanced by this method is uniform and the image quality is good. The gray distribution of several methods for enhancing industrial images is shown in Figure 4.
It can be seen from Figure 4 that the image gray level of this method presents a uniform distribution state, while the image gray level distribution of the contrast method fluctuates greatly with the increase of the number of experiments, and the stability is poor, which indicates that this method has high stability for the enhancement of industrial image quality.
In order to further test the performance of different methods, the peak signal-to-noise ratio of different methods with experimental sample size of 1000 is compared. The signal-to-noise ratio is often used to test the clarity of the image. Generally speaking, the higher the signal-to-noise ratio is, the smaller the noise mixed in the signal is, and the lower the distortion degree of the image will be. The results are shown in Figure 5.
The analysis of Figure 5 shows that the peak signal-tonoise ratio of the enhancement method based on gradient field is between 36 dB and 45 dB, the peak signal-to-noise ratio of the enhancement method based on industrial field environment is between 23 dB and 38 dB, and the peak signal-to-noise ratio of the enhancement method based on cross structure regularization constraint is between 34 dB and 39 dB, while the peak signal-to-noise ratio of the method in this paper is always above 53 dB. At the same time, the signal-to-noise ratio of the enhancement methods based on gradient field, industrial field environment, and cross structure regularization shows a certain fluctuation with the increase of the number of experiments, and the stability is poor. However, the change of the signal-to-noise value of the method used in this paper has been in a relatively stable state, indicating that the peak signal-to-noise ratio of the enhanced image is large and the image quality is good. The image enhancement effect is good, and the stability is high.
On the basis of the above experiments, the industrial image enhancement time of the four methods is compared, and the results are shown in Table 3.
According to the data in Table 3, the average enhancement time of industrial image based on gradient field is 1.52 s, the average enhancement time of industrial image based on industrial scene environment is 3.02 s, the average enhancement time of industrial image based on cross structure regularization constraint is 2.66 s, and the average enhancement time of industrial image based on this method is 0.96 s; it is the lowest of the four methods. At the same time, the industrial image method based on gradient field, industrial image based on industrial scene environment, and industrial image based on cross structure regularization constraints increase with the increase of experiment times, and the increase of enhancement time is larger. The increase of the enhancement time in this paper is relatively small. The results show that the enhancement time of industrial image is shorter and the enhancement efficiency is higher.

Conclusion
Images collected on industrial sites are generally contaminated to varying degrees due to low illumination, poor visibility, camera jitter, power fluctuations, and interference with channel transmission. Industrial image pretreatment can improve and restore image quality, while the traditional method has high image mean square error, low peak signalto-noise ratio and long image enhancement time. This paper is a new image enhancement method. The effectiveness of this method is also verified experimentally. The present paper method has the following advantages: (i) In the process of industrial image enhancement, the mean square error is kept at a lower level, and the peak signal-to-noise ratio is always above 53 dB, and the enhancement effect is better (ii) The average time of enhancement is 0.96 s when the industrial image is enhanced by this method. The results show that the enhancement speed of the proposed method is faster

Data Availability
The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.