Thermal imaging image processing method and device, electronic equipment and computer storage medium

By converting infrared thermal imaging images into RGB images and adding edge information, and using super-resolution models for reconstruction, the problem of low-resolution image reconstruction is solved, high-precision high-resolution image effects are achieved, and the image processing process is simplified. .

CN118628352APending Publication Date: 2024-09-10GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410755864.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

Existing technology is difficult to effectively reconstruct low-resolution infrared thermal imaging images into high-resolution images, and methods based on interpolation are not effective, while methods based on deep learning require large data sets and computing resources and have poor flexibility.

Method used

Convert thermal imaging images to RGB images, add edge information to the preset super-resolution model, and reconstruct through the target super-resolution model to achieve high-precision estimation from low-resolution images to high-resolution images.

Benefits of technology

Without adding additional algorithms, the image display effect is improved, calculation is facilitated, the complexity of the image processing algorithm is reduced, and high-precision image reconstruction is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628352A
    Figure CN118628352A
Patent Text Reader

Abstract

The embodiment of the invention provides a thermal imaging image processing method and device, electronic equipment and a computer readable storage medium, and relates to the technical field of image processing, and the method comprises the steps: obtaining an original thermal imaging image; converting the thermal imaging image into an RGB image in a color mode; adding the edge information of the RGB image into a preset super-resolution model to obtain a target super-resolution model; and reconstructing the RGB image by using the target super-resolution model to obtain a reconstructed RGB image. Through the method of converting the thermal imaging image into the RGB image, the thermal imaging image can achieve a better display effect, calculation is facilitated, and the complexity of an image processing algorithm is greatly reduced; and then introducing edge information into the super-resolution model as a constraint condition to obtain a target super-resolution model, and then performing reverse iteration solution on the RGB image through the target super-resolution model, thereby realizing high-precision estimation from a low-resolution image to a high-resolution image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a thermal imaging image processing method, a thermal imaging image processing device, an electronic device and a computer-readable storage medium. Background Art

[0002] Infrared thermal imaging detection technology is an emerging detection technology that has been widely used in home appliances, electricity, medical and other fields. It can perform face recognition, human body detection, gesture detection, etc. Since it only detects temperature data in the environment, it can better protect user privacy and prevent fraud compared to traditional visible light detection. However, high-resolution infrared thermal imaging equipment is expensive, and if it is used in large quantities in products, the cost is high. Therefore, how to reconstruct low-resolution (LR) thermal imaging images into high-resolution (HR) thermal imaging images has become one of the current research hotspots.

[0003] To address the above issues, super-resolution technology (SR) is currently used for image reconstruction. Super-resolution technology includes interpolation-based methods and deep learning-based methods.

[0004] Interpolation-based algorithms are the simplest algorithms such as bilinear interpolation, nearest neighbor interpolation, and bicubic interpolation.

[0005] Among them, the nearest neighbor interpolation algorithm is the most basic and simplest image scaling algorithm, and its effect is also the worst. The enlarged image has serious mosaics, and the reduced image has serious distortion. The root cause of the poor effect is that its simple nearest neighbor interpolation method introduces serious image distortion. For example, when the coordinates of the source image obtained by inverting the coordinates of the target image is a floating point number, the rounding method is used to directly use the pixel value closest to this floating point number. This method is very unscientific. When the deduced coordinate value is 0.75, it should not be simply taken as 1. Since it is 0.75, it is 0.25 smaller than 1 and 0.75 larger than 0, then the target pixel value should actually be calculated according to a certain rule based on the four real points around the virtual point in the source image, so as to achieve a better scaling effect.

[0006] The bilinear interpolation algorithm is a relatively good image scaling algorithm. Bi means that interpolation is done on both axes. The steps can be understood as first doing a linear interpolation on one axis, then doing a linear interpolation on the other axis, and finally getting the value of the predicted point. The formula for bilinear interpolation actually represents this process. It makes full use of the four real pixel values ​​around the virtual point in the source image to jointly determine a pixel value in the target image. Therefore, the scaling effect is much better than the simple nearest neighbor interpolation algorithm.

[0007] The bicubic interpolation algorithm uses the 16 surrounding pixels to calculate the value of a pixel. This double is actually still an operation on two axes. It is essentially no different from bilinear interpolation, but the interpolation formula is more complicated. The focus of bicubic interpolation is that linear interpolation is not good, so cubic interpolation actually smoothes the pixels. It can be understood that the values ​​of different pixels are actually the sampling points of a function. Obviously, it is better to use a curve to fit this function to interpolate than to use a straight line. Sixteen pixels actually provide more accurate information than four pixels. For example: for two points AB, you can draw a straight line and a curve, but if the three points are on a straight line, then the probability of sampling the straight line is higher, and the more points, the more accurate the estimate. Similarly, the curve can actually be understood by the gradient. A certain pixel provides the value and gradient of the point, and multiple points and multiple gradients can approximate a curve.

[0008] However, algorithms based on interpolation calculate unknown pixels through mathematical operations based on known pixels. If the magnification increases, the number of unknown pixels will far exceed the known pixels, and the difficulty of calculation will greatly increase. The resulting image will be more blurred, with fewer details and blurred edges.

[0009] Deep learning-based technology is a current research hotspot, and the image reconstruction effect is also good. Deep learning-based methods can be divided into SR methods based on convolutional neural networks, SR methods based on residual networks (ResNet), and SR methods based on generative adversarial networks (GAN).

[0010] Among them, SR methods based on convolutional neural networks, such as ESPCN, are based on pixel rearrangement, do not need to upsample LR, and use convolution to gradually restore to the target resolution size. The main contribution of this method is the proposal of a sub-pixel convolution layer, which indirectly realizes the image magnification process. This method controls the number of feature images through convolution operations, and then fuses multiple feature images by pixel rearrangement to achieve different magnification effects.

[0011] The ResNet-based SR method uses short-circuit connections to combine low-level feature information with deep feature information, which enables the superimposed network layers to learn new features based on the input features, thereby improving the learning ability of the overall network. For example, the enhanced deep super-resolution (EDSR) network removes unnecessary modules from the traditional network, making the model compact while improving the model effect (such as removing redundant BN operations). Multi-scale deep super-resolution (MDSR) network. This model keeps the middle part of the network unchanged, and makes improvements to the front and back ends of the network. By adding multiple large-scale convolution kernels and residual blocks, it improves the network receptive field while maintaining shallow feature information.

[0012] In the GAN-based SR method, when the scaling factor is large, the reconstructed SR image lacks texture details due to the large scaling factor, and the reconstruction effect is not ideal. GAN has a strong generative power and can solve this problem well. For example, the SRGAN method introduces GAN into the field of super-resolution. A major innovation of SRGAN is the introduction of content loss. SRGAN hopes that the entire network will pay more attention to the semantic feature differences between the reconstructed image and the original image during the learning process, rather than the color and brightness differences between each pixel. SRGAN uses an improved VGG network as a feature map and designs a new perceptual loss that matches the discriminator, which overcomes the disadvantage of low perceptual quality of the reconstructed image and makes the generated image more realistic. However, the disadvantage of this method is that the network structure is complex, two networks need to be trained, and the training process is long.

[0013] In summary, deep learning-based algorithms require large data sets. Poor accuracy in data set production will lead to poor model generalization capabilities. In addition, due to the limitations of embedded computing resources, the algorithm has poor flexibility. Summary of the invention

[0014] In view of the above problems, embodiments of the present invention are proposed to provide a thermal imaging image processing method, a thermal imaging image processing device, an electronic device and a computer-readable storage medium that overcome the above problems or at least partially solve the above problems.

[0015] The embodiment of the present invention discloses a thermal imaging image processing method, comprising:

[0016] Acquire the original thermal imaging image;

[0017] Convert the thermal imaging image into an RGB image in color mode;

[0018] Adding edge information of the RGB image to a preset super-resolution model to obtain a target super-resolution model;

[0019] The target super-resolution model is used to reconstruct the RGB image to obtain a reconstructed RGB image.

[0020] In one or more embodiments, converting the thermal imaging image into an RGB image in a color mode includes:

[0021] Convert the temperature data of each pixel in the thermal imaging image into an RGB value;

[0022] Concatenate the RGB values ​​of all pixels to get an RGB image.

[0023] In one or more embodiments, converting the temperature data of each pixel in the thermal imaging image into an RGB value includes:

[0024] The temperature data of each pixel in the thermal imaging image is mapped to an RGB value in a preset color card by scaling and normalizing the minimum and maximum temperatures.

[0025] In one or more embodiments, the super-resolution model is generated by:

[0026] Simplifying the preset original super-resolution model to obtain a simplified super-resolution model;

[0027] Converting the simplified super-resolution model based on compressed sensing to obtain a candidate super-resolution model based on compressed sensing;

[0028] Constraints are added to the candidate compressed sensing-based super-resolution model to obtain a target super-resolution model.

[0029] In one or more embodiments, simplifying the preset original super-resolution model to obtain a simplified super-resolution model includes:

[0030] Downsampling, blurring and noise in the original super-resolution model are simplified to downsampling to obtain a simplified super-resolution model.

[0031] In one or more embodiments, reconstructing the RGB image using the target super-resolution model to obtain a reconstructed RGB image includes:

[0032] S1. After fixing the current candidate sparse coefficients in the target super-resolution model, convert the target super-resolution model to obtain a first model;

[0033] S2. After fixing the current candidate RGB image in the target super-resolution model, convert the target super-resolution model to obtain a second model;

[0034] S3, solving the first model based on the shrinkage threshold method to obtain the current pixel point in the current candidate RGB image and the next pixel point in the process of finding the minimum point, and solving the second model based on the shrinkage threshold method to obtain the current candidate sparse coefficient;

[0035] S4. If the L2 norm of the difference between the next pixel and the current pixel is less than the threshold, the current candidate RGB image is output as the reconstructed RGB image, otherwise, S1 is executed.

[0036] Accordingly, an embodiment of the present invention discloses a thermal imaging image processing device, the device comprising:

[0037] An acquisition module, used for acquiring original thermal imaging images;

[0038] A conversion module, used for converting the thermal imaging image into an RGB image in a color mode;

[0039] A processing module, used for adding edge information of the RGB image to a preset super-resolution model to obtain a target super-resolution model;

[0040] The reconstruction module is used to reconstruct the RGB image using the target super-resolution model to obtain a reconstructed RGB image.

[0041] In one or more embodiments, the conversion module includes:

[0042] A first conversion submodule, used to convert the temperature data of each pixel in the thermal imaging image into an RGB value;

[0043] The stitching submodule is used to stitch the RGB values ​​of all pixels to obtain an RGB image.

[0044] In one or more embodiments, the conversion submodule is specifically used to:

[0045] The temperature data of each pixel in the thermal imaging image is mapped to an RGB value in a preset color card by scaling and normalizing the minimum and maximum temperatures.

[0046] In one or more embodiments, a generation module for generating the super-resolution model is further included, comprising:

[0047] A simplification submodule is used to simplify the preset original super-resolution model to obtain a simplified super-resolution model;

[0048] A second conversion submodule is used to convert the simplified super-resolution model based on compressed sensing to obtain a candidate super-resolution model based on compressed sensing;

[0049] A submodule is introduced to add constraints to the candidate compressed sensing-based super-resolution model to obtain a target super-resolution model.

[0050] In one or more embodiments, the simplification submodule is specifically used to:

[0051] Downsampling, blurring and noise in the original super-resolution model are simplified to downsampling to obtain a simplified super-resolution model.

[0052] In one or more embodiments, the reconstruction module includes:

[0053] A first processing submodule, configured to convert the target super-resolution model after fixing the current candidate sparse coefficients in the target super-resolution model to obtain a first model;

[0054] A first processing submodule, configured to convert the target super-resolution model after fixing the current candidate RGB image in the target super-resolution model to obtain a second model;

[0055] A solving submodule, configured to solve the first model based on a shrinkage threshold method to obtain a current pixel point in a current candidate RGB image and a next pixel point in a process of finding a minimum point, and to solve the second model based on a shrinkage threshold method to obtain a current candidate sparse coefficient;

[0056] The detection submodule is used to output the current candidate RGB image as the reconstructed RGB image if the L2 norm of the difference between the next pixel and the current pixel is less than a threshold, and otherwise call the first processing submodule.

[0057] Accordingly, an embodiment of the present invention discloses an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the various steps of the above-mentioned thermal imaging image processing method embodiment when executed by the processor.

[0058] Accordingly, an embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each step of the above-mentioned thermal imaging image processing method embodiment is implemented.

[0059] The embodiments of the present invention include the following advantages:

[0060] After acquiring the original thermal imaging image, the thermal imaging image can be converted into an RGB image in color mode, and then the edge information of the RGB image is added to a preset super-resolution model to obtain a target super-resolution model, and then the target super-resolution model is used to reconstruct the RGB image to obtain a reconstructed RGB image. In this way, without adding additional algorithms, by converting the thermal imaging image into an RGB image, the thermal imaging image can achieve a better display effect, facilitate calculation, and greatly reduce the complexity of the image processing algorithm; then the edge information is introduced as a constraint condition in the super-resolution model to obtain the target super-resolution model, and then the RGB image is reversely iterated and solved by the target super-resolution model, thereby achieving high-precision estimation from a low-resolution image to a high-resolution image. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 is a flow chart of steps of an embodiment of a thermal imaging image processing method of the present invention;

[0062] Figure 2 is a schematic diagram of edge point pixels of an embodiment of a thermal imaging image processing method of the present invention;

[0063] Figure 3 It is a structural block diagram of an embodiment of a thermal imaging image processing device of the present invention. DETAILED DESCRIPTION

[0064] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0065] One of the core concepts of the embodiment of the present invention is that, without adding additional algorithms, by converting thermal imaging images into RGB images, the thermal imaging images can achieve better display effects, facilitate calculations, and greatly reduce the complexity of the image processing algorithm; then, edge information is introduced as a constraint condition in the super-resolution model to obtain a target super-resolution model, and then the RGB image is reversely iterated and solved through the target super-resolution model, thereby achieving high-precision estimation from low-resolution images to high-resolution images.

[0066] Reference Figure 1 , shows a flow chart of steps of an embodiment of a thermal imaging image processing method of the present invention. The embodiment of the present invention can be applied to a terminal, and the terminal can have the following features:

[0067] (1) In terms of hardware system, the device has a central processing unit, memory, input components and output components, that is, the device is often a microcomputer device with communication function. In addition, it can also have multiple input methods, such as keyboard, mouse, touch screen, microphone and camera, and the input can be adjusted as needed. At the same time, the device often has multiple output methods, such as receiver, display screen, etc., which can also be adjusted as needed;

[0068] (2) In terms of software system, the device must have an operating system, such as Windows Mobile, Symbian, Palm, Android, iOS, etc. At the same time, these operating systems are becoming more and more open, and personalized applications developed based on these open operating system platforms are emerging in an endless stream, such as address books, calendars, notepads, calculators, and various games, which greatly meet the needs of personalized users;

[0069] (3) In terms of communication capabilities, the device has flexible access methods and high-bandwidth communication performance, and can automatically adjust the selected communication method according to the selected service and the environment, so as to facilitate user use. The device can support 3GPP (3rd Generation Partnership Project), 4GPP (4th Generation Partnership Project), 5GPP (5th Generation Partnership Project), LTE (Long Term Evolution), WIMAX (World Interoperability for Microwave Access) mobile communications, computer network communications based on TCP / IP (Transmission Control Protocol / Internet Protocol) and UDP (User Datagram Protocol) protocols, and short-range wireless transmission methods based on Bluetooth and infrared transmission standards. It not only supports voice services, but also supports a variety of wireless data services;

[0070] (4) In terms of functional use, the equipment pays more attention to humanization, personalization and multi-functionality. With the development of computer technology, the equipment has moved from a "device-centric" model to a "people-centric" model, integrating embedded computing, control technology, artificial intelligence technology and biometric authentication technology, fully reflecting the people-oriented purpose. Due to the development of software technology, the equipment can adjust the settings according to personal needs and become more personalized. At the same time, the equipment itself integrates a lot of software and hardware, and its functions are becoming more and more powerful.

[0071] The method may specifically include the following steps:

[0072] Step 101: Acquire an original thermal imaging image.

[0073] Specifically, the original thermal imaging image can be acquired by infrared thermal imaging equipment. Infrared thermal imaging uses photoelectric technology to detect infrared specific band signals of thermal radiation of objects, converts the signals into images and graphics that can be distinguished by human vision, and can further calculate the temperature value. Infrared thermal imaging technology enables humans to overcome visual obstacles, so that people can "see" the temperature distribution of the surface of an object. It is based on the characteristics of infrared thermal imaging that in the embodiment of the present invention, the original thermal imaging image obtained includes temperature data, that is, each pixel in the original thermal imaging image has a one-to-one corresponding temperature data. For example, the resolution of the original thermal imaging image collected is 600*800, that is, the original thermal imaging image has a total of 480,000 pixels, each pixel has a one-to-one corresponding temperature data, so the original thermal imaging image has a total of 480,000 temperature data.

[0074] Based on this, the embodiment of the present invention can be applied to detecting the human body contour in the room, such as pedestrian detection, gesture detection, etc. Since the resolution of the original thermal imaging image is low, the accuracy of subsequent human body contour detection is also low, so the original thermal imaging image can be converted and super-resolution reconstructed to obtain a high-resolution image.

[0075] Super-resolution reconstruction refers to reconstructing a low-resolution image into a high-resolution image, that is, enlarging the image by 2 times, 4 times, etc., so as to improve the image quality. For example, enlarging an image with a resolution of 600*800 by 2 times to obtain an image with a resolution of 1200*1600, and enlarging it by 4 times to obtain an image with a resolution of 2400*3200.

[0076] Step 102: convert the thermal imaging image into an RGB image in a color mode.

[0077] Since there are many noise points in the original thermal imaging image, the edge of the human body is blurred, resulting in poor accuracy of the detected human body contour. Therefore, after the original thermal imaging image is collected, the original thermal imaging image can be converted into an RGB image in color mode, so as to adjust the contrast of the image and remove noise information, so that the detected human body edge is clearer.

[0078] In an embodiment of the present invention, converting the thermal imaging image into an RGB image in a color mode includes:

[0079] Convert the temperature data of each pixel in the thermal imaging image into an RGB value;

[0080] Concatenate the RGB values ​​of all pixels to get an RGB image.

[0081] Specifically, since each pixel in the original thermal imaging image has a one-to-one corresponding temperature data, the temperature data corresponding to each pixel can be converted into RGB values, and then the RGB values ​​of each pixel are spliced ​​to obtain an RGB image. For example, the resolution of the original thermal imaging image is 600*800, and there are a total of 480,000 pixels, that is, there are a total of 480,000 temperature data, then each temperature data is converted into an RGB value, thereby obtaining 480,000 RGB values, and then the 480,000 RGB values ​​are spliced ​​in the order of pixels to obtain an RGB image.

[0082] In the embodiment of the present invention, converting the temperature data of each pixel in the thermal imaging image into an RGB value includes:

[0083] The temperature data of each pixel in the thermal imaging image is mapped to an RGB value in a preset color card by scaling and normalizing the minimum and maximum temperatures.

[0084] Specifically, in each frame of the original thermal imaging image collected, the temperature data cannot be changed, especially the maximum and minimum values. Therefore, in order to adjust the contrast of the image, the maximum and minimum values ​​of the temperature data can be adjusted during the conversion process. The specific adjustment can be done by scaling and normalizing the minimum-maximum temperature to map the temperature data of each pixel in the thermal imaging image to the RGB value in the preset color card. The scaling and normalization of the minimum-maximum temperature can be calculated using formula (1):

[0085]

[0086] Where a and b are the minimum and maximum values ​​of the temperature data of the pixel points in the preset color card, respectively, and X min and Xmax are the minimum and maximum temperature values ​​of the collected temperature data, respectively, and X′ is the R, G, and B values ​​corresponding to the current temperature data in the preset color card.

[0087] The R value, G value, and B value sets of the preset color cards are as follows:

[0088] R={255,253,251,249,247,245,243,241,239,237,235,233,231,229,227,225,223,221,219,217,215,213,211,209,207,205,203,201,199,197,195,193,191,189,187,185,183,181,179,177,175,173,171,169,167,165,163,161,159,157,155,153,151,149,147,145,143,141,139,137,135,133,131,129,126,124,122,120,118,116,114,112,110,108,106,104,102,100,98,96,94,92,90,88,86,84,82,80,78,76,74,72,70,68,66,64,62,60,58,56,54,52,50,48,46,44,42,40,38,36,34,32,30,28,26,24,22,20,18,16,14,12,10,8,6,4,2,0,0,2,4,6,8,10,12,14,17,19,21,23,25,27,29,31,36,41,46,51,56,61,66,71,76,81,86,91,96,101,106,111,116,121,125,130,135,139,144,149,153,158,163,167,172,177,181,186,189,191,194,196,198,200,203,205,207,209,212,214,216,218,221,223,224,225,226,227,228,229,230,231,231,232,233,234,235,236,237,238,239,240,240,241,241,242,242,243,243,244,244,245,245,246,246,247,247,248,248,249,249,250,250,251,251,252,252,253,253,254,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255};

[0089] G={255,253,251,249,247,245,243,241,239,237,235,233,231,229,227,225,223,221,219,217,215,213,211,209,207,205,203,201,199,197,195,193,191,189,187,185,183,181,179,177,175,173,171,169,167,165,163,161,159,157,155,153,151,149,147,145,143,141,139,137,135,133,131,129,126,124,122,120,118,116,114,112,110,108,106,104,102,100,98,96,94,92,90,88,86,84,82,80,78,76,74,72,70,68,66,64,62,60,58,56,54,52,50,48,46,44,42,40,38,36,34,32,30,28,26,24,22,20,18,16,14,12,10,8,6,4,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,2,2,3,3,3,4,4,5,5,5,6,6,7,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,57,60,64,67,71,74,78,81,85,88,92,95,99,102,106,109,112,116,119,123,127,130,134,138,141,145,149,152,156,160,163,167,171,175,178,182,185,189,192,196,199,203,206,210,213,217,220,224,227,229,231,233,234,236,238,240,242,244,246,248,249,251,253,255};

[0090] B={255,253,251,249,247,245,243,241,239,237,235,233,231,229,227,225,223,221,219,217,215,213,211,209,207,205,203,201,199,197,195,193,191,189,187,185,183,181,179,177,175,173,171,169,167,165,163,161,159,157,155,153,151,149,147,145,143,141,139,137,135,133,131,129,126,124,122,120,118,116,114,112,110,108,106,104,102,100,98,96,94,92,90,88,86,84,82,80,78,76,74,72,70,68,66,64,62,60,58,56,54,52,50,48,46,44,42,40,38,36,34,32,30,28,26,24,22,20,18,16,14,12,10,8,6,4,2,0,9,16,24,31,38,45,53,60,67,74,82,89,96,103,111,118,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,136,137,137,137,138,138,138,139,139,139,140,140,140,141,141,137,132,127,121,116,111,106,101,95,90,85,80,75,69,64,59,49,47,44,42,39,37,34,32,29,27,24,22,19,17,14,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,14,15,16,18,19,20,21,22,23,24,25,27,28,29,30,39,53,67,81,95,109,123,137,151,165,179,193,207,221,235,249}。

[0091] For example, if it is calculated through formula (1) that X' = 25 corresponding to a certain pixel in a frame of the original thermal imaging image, then the R value corresponding to the temperature data of this pixel is the 25th number in the R set of the above color card, that is, "207". By analogy, the G value and B value corresponding to this pixel can be calculated. Similarly, by performing the above calculations on each pixel in the frame of the original thermal imaging image, the R value, G value, and B value corresponding to each pixel can be obtained, and then the R value, G value, and B value corresponding to each pixel are spliced to obtain the RGB image corresponding to this frame of the original thermal imaging image.

[0092] Step 103: Add the edge information of the RGB image to the preset super-resolution model to obtain a target super-resolution model.

[0093] After obtaining the converted RGB image, super-resolution reconstruction can be performed on the RGB image. Before reconstruction, the edge information of the RGB image can be added to the preset super-resolution model to obtain a target super-resolution model, so as to use the target super-resolution model to reconstruct the RGB image and obtain the reconstructed RGB image.

[0094] In the embodiment of the present invention, the super-resolution model is generated in the following manner:

[0095] Simplify the preset original super-resolution model to obtain a simplified super-resolution model;

[0096] Based on compressive sensing, convert the simplified super-resolution model to obtain a candidate compressive sensing-based super-resolution model;

[0097] Add constraint conditions to the candidate compressive sensing-based super-resolution model to obtain a target super-resolution model.

[0098] Specifically, in the process of super-resolution reconstruction, it includes downsampling, blurring, and noise, etc. Super-resolution reconstruction can be mathematically expressed as formula (2):

[0099]

[0100] where y ∈ R n is the observed value (the converted RGB image, the same hereinafter), x ∈ R m is the data to be observed (the image obtained after super-resolution reconstruction, the same hereinafter), where n << m, k is the Gaussian blur kernel, is the convolution calculation, ↓ s is s-fold downsampling, and n is Gaussian white noise.

[0101] Since noise reduction has been achieved by adjusting the contrast when converting the original thermal imaging image into an RGB image, the original super-resolution model (i.e., formula (2)) can be simplified to obtain a simplified super-resolution model.

[0102] In the embodiment of the present invention, simplifying the preset original super-resolution model to obtain a simplified super-resolution model includes:

[0103] Downsampling, blurring and noise in the original super-resolution model are simplified to downsampling to obtain a simplified super-resolution model.

[0104] Specifically, if the original thermal imaging image is converted to an RGB image with a better effect, the noise reduction effect will also be better. Therefore, in an ideal case, the blur and noise in the super-resolution reconstruction can be simplified, that is, the super-resolution reconstruction process is simplified to a downsampling process, and formula (2) can be simplified to formula (3):

[0105] yn=S·x Formula (3)

[0106] Among them, S is the downsampling matrix.

[0107] For the above formula, if a downsampling matrix is ​​set arbitrarily, the reconstructed image obtained by formula (3) is basically blurred or has incomplete image information. Therefore, it is impossible to directly solve formula (3). Therefore, compressed sensing can be added based on formula (3).

[0108] In the theory of compressed sensing, as long as the signal is compressible or sparse in a certain transform domain, the high-dimensional signal obtained by transformation can be projected onto a low-dimensional space using a measurement matrix that is unrelated to the transform basis, and then the original signal can be reconstructed with high probability from these small number of projections by solving an optimization problem. Based on this, in the embodiment of the present invention, the simplified super-resolution model can be converted based on compressed sensing to obtain a candidate super-resolution model based on compressed sensing.

[0109] That is, in mathematical representation, the transformation of the signal x is s The k-order sparse representation on a sparse basis ψ is x = ψ·x s , where x s is a sparse coefficient, which can be brought into the simplified super-resolution model (i.e., formula (3)) to obtain a candidate super-resolution model based on compressed sensing:

[0110] y=S·ψx s =Ax s Formula (4)

[0111] Among them, A is the sensing matrix. That is to say, according to the theory of compressed sensing, solving x can be transformed into solving x s .

[0112] Furthermore, in the theory of compressed sensing, when the sensing matrix A satisfies the RIP (Restricted IsometryProperty) criterion, compressed sensing can theoretically solve the sparse coefficient x by first solving the inverse problem of formula (4): s , and then correctly recover the signal x with sparsity k from the measured projection value y, that is:

[0113] min||x s ||0 sty=Ax s Formula (5)

[0114] Among them, ‖·‖0 is called the l0 norm, which represents the number of zero vectors in the vector, y = Ax s is the constraint condition, min‖x s ‖0 is the target super-resolution model. That is, formula (5) is used to obtain x under the constraint condition. s However, formula (5) cannot be solved, so formula (5) can be converted into the form of Lagrange multipliers to obtain formula (6):

[0115]

[0116] Formula (6) is the mathematical model of super-resolution based on compressed sensing. It can be seen from formula (6) that the objective function is a non-convex function. Direct solution is an NP (Non-Deterministic polynomial-Time Hardness, NP-Hardness) problem. Traditional algorithms cannot solve it. Therefore, it is necessary to use some heuristic algorithms or approximate algorithms to solve it. Among them, constructing an objective function is an effective method to solve NP problems. The problem can be converted into a mathematical model and the optimal solution can be solved by optimizing the mathematical model.

[0117] Although low-quality images can be reconstructed into high-quality images in the above way, the high-frequency information in the image will become blurred as the noise level increases, and the edges of the image will appear too smooth. Therefore, it is necessary to add prior knowledge of edge information to the super-resolution mathematical model based on compressed sensing, that is, to use edge information as a constraint condition. When the edge of the reconstructed image is blurred, the weight of the edge information is increased, and when it is clear, the weight of the edge information can be reduced. By constraining and punishing edge information, the high-resolution image in the iterative reconstruction process is continuously approaching a higher definition, so that the high-frequency details of the image can be restored.

[0118] In an embodiment of the present invention, the Canny edge extraction algorithm can be used to detect edge information in an image. The Canny edge extraction algorithm mainly includes the following steps:

[0119] 1) Filtering: The edge detection algorithm is mainly based on the first and second order derivatives of the image intensity, but the derivatives are usually very sensitive to noise, so a filter Q must be used to improve the performance of the edge detector related to noise. Common filtering methods include Gaussian filtering, mean filtering, etc.

[0120] 2) Enhancement: The basis of edge enhancement is to determine the change value of the neighborhood intensity of each point in the image. The enhancement algorithm can highlight the points where the neighborhood intensity value of the grayscale point in the image has a significant change. In the specific programming implementation, it can be determined by calculating the gradient amplitude, generally using the Sobel operator;

[0121] 3) Detection: After the enhancement, there are often many points in the neighborhood with large gradient values. In certain applications, these points are not the actual edge points to be found, so some method should be used to select these points. In actual engineering, the commonly used method is to detect through the threshold method, that is, to refine the edge and find the real edge.

[0122] The detection may include the following steps:

[0123] 1) Grayscale the image;

[0124] 2) Perform Gaussian filtering on the image;

[0125] 3) Calculate the gradient magnitude and direction (such as using Prewitt, Sobel operator, etc.);

[0126] 4) Perform non-maximum suppression on the gradient amplitude;

[0127] 5) Detect and connect edges using a dual threshold algorithm.

[0128] Since the Canny edge extraction algorithm is not easily affected by noise, it can detect weak edge information more accurately. The algorithm uses the first-order differential algorithm of the Gaussian function to accurately detect strong edges in the image, and can suppress noise and weak edges to extract more accurate edge information. Therefore, the edge constraint can be expressed as formula (7):

[0129] E(x)=ω edge x Formula (7)

[0130] Among them, ω edge is the edge weight coefficient, which is used for edge detection by the Canny operator. Figure 2The following is a schematic diagram of edge point pixels. Four masks are used to detect edges in the horizontal, vertical, and diagonal directions. n1n2 (n1-1≤n1≤n1+1,n2-1≤n2≤n2+1) represents the gradient value of the edge point in each direction, and the edge weight coefficient can be expressed as formula (8):

[0131]

[0132] Among them, κ is a constant, when edge information is detected, ω edge is a larger weight coefficient. If it is non-edge information, the weight is set to 0.

[0133] In this way, adding the prior knowledge of edge constraints to the target super-resolution model to limit the gradient change of the image can help the model better retain the edge information of the image, thereby improving the quality of super-resolution reconstruction. edge After that, formula (6) can be expressed as formula (9):

[0134]

[0135] In the formula, the right subscript l2 indicates the l2 norm of the current formula; λ and μ are weight coefficients respectively; D is an overcomplete dictionary, which is artificially constructed to improve the sparse expression ability of the image, thereby improving the sparse coefficient x s The sparsity of , improves the quality of the reconstructed image. In the objective function polynomial, the first term (i.e. ) is the reconstruction error, the second term (i.e., λE(x)) is the edge constraint, which is used to maintain the image edge information, and the third term (i.e., β‖x s ‖2) and the fourth term (i.e. ) is a sparsity prior constraint, which is used to maintain the sparsity of the image.

[0136] It should be noted that in the embodiment of the present invention, in addition to the Canny algorithm, other algorithms may be used as the edge extraction algorithm. In practical applications, the algorithm may be set according to actual needs, and the embodiment of the present invention does not limit this.

[0137] Step 104: reconstruct the RGB image using the target super-resolution model to obtain a reconstructed RGB image.

[0138] After obtaining the target super-resolution model, the target super-resolution model can be used to reconstruct the converted RGB image, thereby obtaining a reconstructed RGB image, that is, a high-resolution RGB image. During reconstruction, the converted RGB image can be iteratively solved using formula (9) to obtain the final result, that is, using y to solve x and x sSolve, and the obtained x is the reconstructed high-resolution RGB image.

[0139] In the embodiment of the present invention, the step of reconstructing the RGB image using the target super-resolution model to obtain a reconstructed RGB image includes:

[0140] S1. After fixing the current candidate sparse coefficients in the target super-resolution model, convert the target super-resolution model to obtain a first model;

[0141] S2. After fixing the current candidate RGB image in the target super-resolution model, convert the target super-resolution model to obtain a second model;

[0142] S3, solving the first model based on the shrinkage threshold method to obtain the current pixel point in the current candidate RGB image and the next pixel point in the process of finding the minimum point, and solving the second model based on the shrinkage threshold method to obtain the current candidate sparse coefficient;

[0143] S4. If the L2 norm of the difference between the next pixel and the current pixel is less than the threshold, the current candidate RGB image is output as the reconstructed RGB image, otherwise, S1 is executed.

[0144] Specifically, during reconstruction, the gradient descent method can be used to solve. When the candidate reconstructed RGB image (ie, x) needs to be solved, the current candidate sparse coefficients (ie, x) in the target super-resolution model can be s ) is fixed, and the target super-resolution model (i.e., formula (9)) is transformed to obtain the first model, as shown in formula (10) (a total of 2 formulas):

[0145] dx=2S T (Sx-y)+λω edge –2μ(Dx s -x)

[0146] x K+1 =x K -τ·dx Formula (10)

[0147] Among them, x K and x K+1 are the current pixel in the candidate reconstructed RGB image and the next pixel in the process of finding the minimum point, respectively, and τ is the descending step size.

[0148] When you need to solve the current candidate sparse coefficient (i.e. x s ), the reconstructed RGB image of the candidate solution (i.e., x) can be fixed, and the target super-resolution model (i.e., formula (9)) can be transformed to obtain a second model, as shown in formula (11):

[0149]

[0150] Then, the x in formula (10) and formula (11) is calculated by the shrinkage threshold method. s and x, when ‖x K+1 -x K When ‖2<ε, the final calculation result can be output to obtain the reconstructed RGB image; when ‖x K+1 -x K When ‖2≥ε, continue to repeat the above steps until ‖x K+1 -x K ‖2<ε. Wherein, ε is a preset threshold value. In practical applications, the specific value of the threshold value can be set according to actual needs, and the embodiment of the present invention does not limit this.

[0151] In an embodiment of the present invention, after acquiring the original thermal imaging image, the thermal imaging image can be converted into an RGB image in color mode, and then the edge information of the RGB image is added to a preset super-resolution model to obtain a target super-resolution model, and then the target super-resolution model is used to reconstruct the RGB image to obtain a reconstructed RGB image. In this way, without adding additional algorithms, by converting the thermal imaging image into an RGB image, the thermal imaging image can achieve a better display effect, facilitate calculation, and greatly reduce the complexity of the image processing algorithm; then the edge information is introduced as a constraint condition in the super-resolution model to obtain the target super-resolution model, and then the RGB image is reversely iterated and solved by the target super-resolution model, thereby achieving high-precision estimation from a low-resolution image to a high-resolution image.

[0152] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0153] Reference Figure 3 , shows a structural block diagram of an embodiment of a thermal imaging image processing device of the present invention, which may specifically include the following modules:

[0154] An acquisition module 301 is used to acquire an original thermal imaging image;

[0155] A conversion module 302, used for converting the thermal imaging image into an RGB image in a color mode;

[0156] The processing module 303 is used to add the edge information of the RGB image to a preset super-resolution model to obtain a target super-resolution model;

[0157] The reconstruction module 304 is used to reconstruct the RGB image using the target super-resolution model to obtain a reconstructed RGB image.

[0158] In an embodiment of the present invention, the conversion module includes:

[0159] A first conversion submodule, used to convert the temperature data of each pixel in the thermal imaging image into an RGB value;

[0160] The stitching submodule is used to stitch the RGB values ​​of all pixels to obtain an RGB image.

[0161] In the embodiment of the present invention, the conversion submodule is specifically used for:

[0162] The temperature data of each pixel in the thermal imaging image is mapped to an RGB value in a preset color card by scaling and normalizing the minimum and maximum temperatures.

[0163] In an embodiment of the present invention, a generation module for generating the super-resolution model is further included, including:

[0164] A simplification submodule is used to simplify the preset original super-resolution model to obtain a simplified super-resolution model;

[0165] A second conversion submodule is used to convert the simplified super-resolution model based on compressed sensing to obtain a candidate super-resolution model based on compressed sensing;

[0166] A submodule is introduced to add constraints to the candidate compressed sensing-based super-resolution model to obtain a target super-resolution model.

[0167] In the embodiment of the present invention, the simplification submodule is specifically used for:

[0168] Downsampling, blurring and noise in the original super-resolution model are simplified to downsampling to obtain a simplified super-resolution model.

[0169] In an embodiment of the present invention, the reconstruction module includes:

[0170] A first processing submodule, configured to convert the target super-resolution model after fixing the current candidate sparse coefficients in the target super-resolution model to obtain a first model;

[0171] A first processing submodule, configured to convert the target super-resolution model after fixing the current candidate RGB image in the target super-resolution model to obtain a second model;

[0172] A solving submodule, configured to solve the first model based on a shrinkage threshold method to obtain a current pixel point in a current candidate RGB image and a next pixel point in a process of finding a minimum point, and to solve the second model based on a shrinkage threshold method to obtain a current candidate sparse coefficient;

[0173] The detection submodule is used to output the current candidate RGB image as the reconstructed RGB image if the L2 norm of the difference between the next pixel and the current pixel is less than a threshold, and otherwise call the first processing submodule.

[0174] In an embodiment of the present invention, after acquiring the original thermal imaging image, the thermal imaging image can be converted into an RGB image in color mode, and then the edge information of the RGB image is added to a preset super-resolution model to obtain a target super-resolution model, and then the target super-resolution model is used to reconstruct the RGB image to obtain a reconstructed RGB image. In this way, without adding additional algorithms, by converting the thermal imaging image into an RGB image, the thermal imaging image can achieve a better display effect, facilitate calculation, and greatly reduce the complexity of the image processing algorithm; then the edge information is introduced as a constraint condition in the super-resolution model to obtain the target super-resolution model, and then the RGB image is reversely iterated and solved by the target super-resolution model, thereby achieving high-precision estimation from a low-resolution image to a high-resolution image.

[0175] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0176] An embodiment of the present invention further provides an electronic device, including:

[0177] It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned thermal imaging image processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0178] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned thermal imaging image processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0179] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0180] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0181] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0182] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0183] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0184] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0185] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0186] A thermal imaging image processing method and a thermal imaging image processing device provided by the present invention are introduced in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A thermal imaging image processing method, characterized in that: include: Acquire the original thermal imaging image; Convert the thermal imaging image into an RGB image in color mode; Adding edge information of the RGB image to a preset super-resolution model to obtain a target super-resolution model; The target super-resolution model is used to reconstruct the RGB image to obtain a reconstructed RGB image.

2. The thermal imaging image processing method according to claim 1, characterized in that: The step of converting the thermal imaging image into an RGB image in a color mode comprises: Convert the temperature data of each pixel in the thermal imaging image into an RGB value; Concatenate the RGB values ​​of all pixels to get an RGB image.

3. The thermal imaging image processing method according to claim 2, characterized in that: The step of converting the temperature data of each pixel in the thermal imaging image into an RGB value comprises: The temperature data of each pixel in the thermal imaging image is mapped to an RGB value in a preset color card by scaling and normalizing the minimum and maximum temperatures.

4. The thermal imaging image processing method according to claim 1, characterized in that: The super-resolution model is generated in the following way: Simplifying the preset original super-resolution model to obtain a simplified super-resolution model; Converting the simplified super-resolution model based on compressed sensing to obtain a candidate super-resolution model based on compressed sensing; Constraints are added to the candidate compressed sensing-based super-resolution model to obtain a target super-resolution model.

5. The thermal imaging image processing method according to claim 4, characterized in that: The simplified super-resolution model is simplified to obtain a simplified super-resolution model, including: Downsampling, blurring and noise in the original super-resolution model are simplified to downsampling to obtain a simplified super-resolution model.

6. The thermal imaging image processing method according to claim 1, characterized in that: The step of reconstructing the RGB image by using the target super-resolution model to obtain a reconstructed RGB image includes: S1. After fixing the current candidate sparse coefficients in the target super-resolution model, convert the target super-resolution model to obtain a first model; S2. After fixing the current candidate RGB image in the target super-resolution model, convert the target super-resolution model to obtain a second model; S3, solving the first model based on the shrinkage threshold method to obtain the current pixel point in the current candidate RGB image and the next pixel point in the process of finding the minimum point, and solving the second model based on the shrinkage threshold method to obtain the current candidate sparse coefficient; S4. If the L2 norm of the difference between the next pixel and the current pixel is less than the threshold, the current candidate RGB image is output as the reconstructed RGB image, otherwise, S1 is executed.

7. A thermal imaging image processing device, characterized in that: The device comprises: An acquisition module, used for acquiring original thermal imaging images; A conversion module, used for converting the thermal imaging image into an RGB image in a color mode; A processing module, used for adding edge information of the RGB image to a preset super-resolution model to obtain a target super-resolution model; The reconstruction module is used to reconstruct the RGB image using the target super-resolution model to obtain a reconstructed RGB image.

8. The thermal imaging image processing device according to claim 7, characterized in that: The conversion module comprises: A first conversion submodule, used to convert the temperature data of each pixel in the thermal imaging image into an RGB value; The stitching submodule is used to stitch the RGB values ​​of all pixels to obtain an RGB image.

9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the thermal imaging image processing method according to any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the thermal imaging image processing method according to any one of claims 1 to 6 are implemented.