Solution of the Problem of Smoothing of the Signals at the Preprocessing of Thermal Images

Smoothing two-dimensional digital signals is important for a number of applications. The paper presents a mathematical method and an algorithm for smoothing two-dimensional digital signals. The method is based on minimizing the objective function using criteria of the first-order finite difference between the rows and columns of the image as a measure of distance. To estimate the parameters of the developed method, a non-iterative algorithm is used. The present study shows results of changing the smoothing filter core depending on variations in the method parameters.


Introduction
Image is a natural means of communication between man and machine in any processing, analysis and control systems. Therefore, one of the main problems of automation is the problem of visual perception. The noise in the image gives it an unnatural appearance and introduces distortions into the information. To build automated decision-making systems, analysis of the data set is necessary. The information presented in the form of visual information is close to the person and is the most informative for a quick solution. Image analysis is a complex and multi-step process. The result obtained at each stage affects the subsequent ones steps. As a result, if an error is made in the primary data processing, the final result obtained can change sharply [1]. More often than not, noise is superimposed on the image obtained in the thermal imaging range. The appearance of noise is associated with the type of sensor, its physical parameters, the exposure time of the frame, the small number of ADC steps, thermal noise of the sensor, etc. Primary data processing has many solutions since there are no universal filters that detect and suppress all kinds of noise. Therefore, the task of reducing the effect of the noise component is no less relevant topic than others in the field of preprocessing.
Image processing methods can vary significantly depending on how the image was obtained. The area of thermal imaging images may include: medicine, in the analysis of tropical processes and the results of hypothermia; energy audit of buildings, analysis of heat losses of buildings and structures; access control and video surveillance systems; driving, used in the analysis and control of the territory and surrounding space; geology and deep space, when researching and searching for new information about the structure of planets; warning of failure of moving parts of mechanisms, etc.
The use of images obtained in a spectrum invisible to a person allows increasing information space, supplementing and expanding information indicators. The IR data is used in robotic complexes for analyzing the accuracy of the operations performed, the accuracy of the positioning of the tool, the quality of operations, data of heating of cutting tools, the quality of welding of materials, wear of parts of mechanisms, etc. [2][3][4].
The paper presents a mathematical solution and an algorithm for smoothing two-dimensional digital signals. The method is based on minimizing the objective function based on the criteria of the first-order finite difference between the rows and columns of the image, as a measure of distance, the square of the difference of the input value and its estimation is used [4][5][6][7][8][9]. To estimate the parameters of the method, a non-iterative algorithm for determining the parameters is used. The work shows the result of changing the smoothing filter core, depending on the variation of the method parameters.

Input data
As input data, a multidimensional signal obtained by a sensitive matrix that captures data in the infrared spectrum is used. The matrix captures a two-dimensional low-resolution digital signal. Most modern thermal imaging cameras have a resolution not exceeding 640x480 pixels.
The process of obtaining data, its conversion to digital, as well as the presence of interference and not ideal electronic components leads to the appearance of a noise component in captures infrared images. The distribution law is near to normal. The dispersion of noise is most often small and depends on the temperature gradient. The expression represents the mathematical model of a thermal image: where:

Algorithm of IR images smoothing
On figure 1 present algorithm of IR images smoothing. The algorithm is designed to process two-dimensional signals obtained in the far-infrared spectrum and characterizing the temperature gradient of objects. The algorithm presented in Figure 1 is implemented as follows: 1. The loading an IR image, and parameters camera. 2. In the second stage, we select an arbitrary point in the image. The pixel cannot belong to the border of the image. This point is the middle and allows you to form a processing unit with a size of at least 3x3 pixels (parameter of block size r).
3. Processing an image element of block size r. For calculation, a method based on minimizing the multi-criteria objective function is used. The technique reduces the L2-norm and the squared difference deviation between signal and estimate by rows and columns [5]. Mathematical expressions for finding estimates of the multicriteria objective function are presented in part 3.1 this paper. The minimization is performed with the parameters of the 1 this method [5]. 4. Determine the boundaries of the block size of the smoothing. For the determination of boundaries, the calculation of the threshold value m. The algorithm is presented in part 3.2 of this paper.
5. In case of not exceeding the threshold, the size of the processing unit is increased by one pixel (r+1); otherwise, size is fixed and go to the next random point of the two-dimensional signal.
6. The final step is to check the conditions complete the analysis of the entire image.

The method of images smoothing
The present paper provides a multicriteria method of smoothing based on minimization L2 norm , The next step is to check the condition If inequality (5) is satisfied, the required accuracy is considered achieved, and the calculation ends. Then

Algorithm for selecting the size of the smoothing block
On figure 2 present algorithm of selecting the size of the smoothing block. The first block size is a 3x3 pixel. The algorithm presented in Figure 2 is implemented as follows: -loading data into the area limited by the block size.
where: 1 k -for -Checking the condition of exceeding the threshold: on Figure 3 shows an example of constructing a plane for fixed parameters 0 ≠ -If the threshold is exceeded, a decision is made to limit it at the previous step; otherwise, the processing window should be increased.
-As a result of determining the size blocks, it is possible to form local areas with a slightly variable signal (stationary sections), the processing of which is carried out using the objective function (2) with parameters 1 α α = and 1 γ γ = .

Test data and example of smoothing IR images
As test data, IR images captured by the SeekCompactPRO camera are used. The resulting images have a resolution of 1280x960, the size of the sensor matrix is 400x300 pixels. The thermal gradient data is presented as an 8-bit color image. Test data were obtained during the analysis of the working process of machine parts and mechanisms. Test data were obtained during the analysis of the process of working machine parts and mechanisms. Figure 4 shows an example of such processes (a -metal drilling; b -operation of a pumping station for waterjet cutting)  The result of processing IR images proposed of the multicriteria method smoothing (Fig. 5) is presented in Fig. 6. The images have been reduced. Areas with a temperature gradient and the name of the device were cut. Figure 6 shows a smoothed image and an enlarged area highlighted by a square. The images presented in Figure 6 show the effectiveness of the approach proposed in the work to reduce the effect of noise. Application of the multi-criteria method smoothing allows reducing the effects of noise while maintaining the boundaries of objects.