Thermal Imaging Video Data Processing Method, Device and Storage Medium

By identifying the target thermal image data with different frames in thermal imaging video and obtaining its color value, and generating pseudo-color video frames, the problems of long processing time and high CPU consumption in the prior art are solved, and more efficient video data processing is achieved.

CN113780226BActive Publication Date: 2025-07-29HANGZHOU MICROIMAGE SOFTWARE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111095193.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-17
Publication Date
2025-07-29
Estimated Expiration
2041-09-17

AI Technical Summary

Technical Problem

The prior art uses a long process and requires high CPU performance when converting the grayscale image of thermal imaging video into a pseudo-color video frame.

Method used

By determining the target thermal image data that differs between thermal imaging video frames, only the color values corresponding to these data are obtained and the pseudo-color video frames are generated, avoiding the search and replacement of the color values of the entire frame one by one.

Benefits of technology

Shorten the color value acquisition time, improve processing efficiency, and reduce CPU consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113780226B_ABST
    Figure CN113780226B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a method, device, and storage medium for processing thermal imaging video data, belonging to the field of image processing. In the embodiments of the present application, target thermal imaging data that is different in the second thermal imaging data frame compared to the first thermal imaging data frame is determined. Then, the color value corresponding to the target thermal imaging data is obtained from the correspondence between the thermal imaging data and the color values. Furthermore, a second pseudo-color video frame is generated based on the color value corresponding to the target thermal imaging data and the first pseudo-color video frame. In this way, only the color value corresponding to the target thermal imaging data in the second thermal imaging data frame needs to be obtained from the correspondence between the thermal imaging data and the color values, without the need to obtain the color values corresponding to all the thermal imaging data in the second thermal imaging data frame, shortening the time for obtaining the color values, improving the processing efficiency of the thermal imaging video data, and reducing the CPU consumption of the processing device during the processing process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing, and particularly to a method, apparatus, and storage medium for processing thermal imaging video data. Background Art

[0002] Video frames in the thermal imaging video collected by an infrared thermal imaging device are generally grayscale images. Usually, the grayscale images in the thermal imaging video can be converted into pseudo-color video frames to improve the recognition rate.

[0003] In related technologies, for the grayscale images in the thermal imaging video, the color value corresponding to the grayscale value of each pixel point in each frame of grayscale image can be obtained from the stored mapping relationship between the grayscale value and the color value, and then the obtained color value is used to replace the grayscale value of the corresponding pixel point in the grayscale image to obtain the pseudo-color video frame corresponding to the grayscale image.

[0004] However, when processing the grayscale images in the thermal imaging video by the above method, it is necessary to find the color value corresponding to each pixel point in each frame of grayscale image and perform replacement. The processing process takes a long time and has high requirements for the performance of the processing device CPU (Central Processing Unit). Summary of the Invention

[0005] Embodiments of this application provide a method, apparatus, and storage medium for processing thermal imaging video data, which can shorten the processing time for converting the thermal image data frames in the thermal imaging video data into pseudo-color video frames. The technical solution is as follows:

[0006] On the one hand, a method for processing thermal imaging video data is provided. The method includes:

[0007] Obtain a first pseudo-color video frame corresponding to a first thermal image data frame;

[0008] Determine target thermal image data in which the thermal image data at the corresponding position in the second thermal image data frame has changed compared to the first thermal image data frame. The second thermal image data frame is a thermal image data frame collected after the first thermal image data frame;

[0009] Obtain the color value corresponding to the target thermal image data from the correspondence between the thermal image data and the color value;

[0010] Generate a second pseudo-color video frame corresponding to the second thermal image data frame according to the color value corresponding to the target thermal image data and the first pseudo-color video frame.

[0011] Optionally, the determining target thermal image data in which the thermal image data at the corresponding position in the second thermal image data frame has changed compared to the first thermal image data frame includes:

[0012] Determine the absolute value of the difference between each thermal image data in the second thermal image data frame and the thermal image data at the corresponding position in the first thermal image data frame;

[0013] Use the thermal image data in the second thermal image data frame whose corresponding absolute value of the difference is greater than the reference threshold as the target thermal image data, where the reference threshold is an integer greater than 0.

[0014] Optionally, the first thermal image data frame is any one of M specified thermal image data frames, where there are N thermal image data frames between every two adjacent specified thermal image data frames, the second thermal image data frame is any one of the N thermal image data frames between the first thermal image data frame and the next specified thermal image data frame of the first thermal image data frame, M is an integer not less than 2, and N is an integer greater than 0.

[0015] Optionally, the first thermal image data frame is the thermal image data frame adjacent to the second thermal image data frame before the second thermal image data frame.

[0016] Optionally, generating the second pseudo-color video frame corresponding to the second thermal image data frame according to the color value corresponding to the target thermal image data and the first pseudo-color video frame includes:

[0017] Replace the color value of the pixel point corresponding to the position of the target thermal image data in the first pseudo-color video frame with the color value corresponding to the target thermal image data to obtain the second pseudo-color video frame.

[0018] Optionally, the thermal image data in the thermal image data frame is a grayscale value; or, the thermal image data in the thermal image data frame is temperature data.

[0019] On the other hand, a thermal imaging video data processing device is provided, and the device includes:

[0020] A first acquisition module, configured to acquire a first pseudo-color video frame corresponding to a first thermal image data frame;

[0021] A determination module, configured to determine target thermal image data whose thermal image data at the corresponding position changes compared with the first thermal image data frame from a second thermal image data frame, where the second thermal image data frame is a thermal image data frame acquired after the first thermal image data frame;

[0022] A second acquisition module, configured to acquire the color value corresponding to the target thermal image data from the correspondence between thermal image data and color values;

[0023] A generation module, configured to generate a second pseudo-color video frame corresponding to the second thermal image data frame according to the color value corresponding to the target thermal image data and the first pseudo-color video frame.

[0024] Optionally, the determining module is mainly configured to:

[0025] Determine the absolute value of the difference between each piece of thermal image data in the second thermal image data frame and the thermal image data at the corresponding position in the first thermal image data frame;

[0026] Use the thermal image data in the second thermal image data frame whose absolute value of the corresponding difference is greater than a reference threshold as the target thermal image data, where the reference threshold is an integer greater than 0.

[0027] Optionally, the first thermal image data frame is any one of M specified thermal image data frames, where there are N thermal image data frames between every two adjacent specified thermal image data frames, the second thermal image data frame is any one of the N thermal image data frames between the first thermal image data frame and the next specified thermal image data frame of the first thermal image data frame, M is an integer not less than 2, and N is an integer greater than 0.

[0028] Optionally, the first thermal image data frame is the thermal image data frame adjacent to the second thermal image data frame before the second thermal image data frame.

[0029] Optionally, the generating module is mainly configured to:

[0030] Replace the color value of the pixel point corresponding to the position of the target thermal image data in the first pseudo-color video frame with the color value corresponding to the target thermal image data to obtain the second pseudo-color video frame.

[0031] Optionally, the thermal image data in the thermal image data frame is a grayscale value; or, the thermal image data in the thermal image data frame is temperature data.

[0032] On the other hand, a thermal imaging video data processing device is provided, and the device includes:

[0033] A processor;

[0034] A memory for storing instructions executable by the processor;

[0035] Wherein, the processor executes the executable instructions in the memory to execute the above-mentioned thermal imaging video data processing method.

[0036] On the other hand, a computer-readable storage medium is provided, and a computer program is stored in the storage medium, and when the computer program is executed by a computer, the steps of the above-mentioned thermal imaging video data processing method are implemented.

[0037] On the other hand, a computer program product containing instructions is provided, and when it runs on a computer, it causes the computer to execute the steps of the above-mentioned thermal imaging video data processing method.

[0038] The beneficial effects brought by the technical solution provided in the embodiments of the present application at least include:

[0039] In the embodiments of the present application, the target thermal image data that is different from the first thermal image data frame is determined in the second thermal image data frame, and then the color value corresponding to the target thermal image data is obtained from the correspondence between the thermal image data and the color value. Furthermore, the second pseudo-color video frame is generated according to the color value corresponding to the target thermal image data and the first pseudo-color video frame. In this way, only the color value corresponding to the target thermal image data in the second thermal image data frame needs to be obtained from the correspondence between the thermal image data and the color value, without obtaining the color values corresponding to all the thermal image data in the second thermal image data frame, which shortens the acquisition time of the color values, improves the processing efficiency of the thermal imaging video data, and reduces the CPU consumption of the processing device during the processing process. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0041] Figure 1 It is a system architecture diagram related to a method for processing thermal imaging video data provided by the embodiments of the present application;

[0042] Figure 2 It is a flowchart of a method for processing thermal imaging video data provided by the embodiments of the present application;

[0043] Figure 3 It is a schematic diagram of generating a second pseudo-color video frame corresponding to a second grayscale image according to the target pixel points of the second grayscale image and the first pseudo-color video frame provided by the embodiments of the present application;

[0044] Figure 4 It is another schematic diagram of generating a second pseudo-color video frame corresponding to a second grayscale image according to the target pixel points of the second grayscale image and the first pseudo-color video frame provided by the embodiments of the present application;

[0045] Figure 5 It is a schematic structural diagram of a device for processing thermal imaging video data provided by the embodiments of the present application;

[0046] Figure 6 It is a schematic structural diagram of a server provided by the embodiments of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0047] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the drawings.

[0048] Before explaining the embodiments of the present application in detail, the application scenarios of the embodiments of the present application will be described first.

[0049] The thermal imaging video data processing method provided by the embodiments of the present application can be used to process the thermal image data frames in the thermal imaging video data collected by an infrared image acquisition device to obtain corresponding pseudo-color video frames. Exemplarily, in an industrial production scenario, thermal imaging devices can be installed in some production workshops to collect thermal imaging video data containing various devices in the production workshop to monitor the operation of each device in the production workshop. In this case, the method of the embodiments of the present application can be used to process the thermal image data frames in the collected thermal imaging video data to obtain the pseudo-color video frame corresponding to each thermal image data frame, so as to improve the visualization performance of the collected thermal imaging video. For another example, in some outdoor scenarios, such as in a forest, infrared thermal imaging devices can be installed to collect thermal imaging video data of wild animals, and the method of the embodiments of the present application can be used to process the thermal image data frames in the thermal imaging video data to obtain the pseudo-color video frame corresponding to each thermal image data frame, so as to better observe the activities of the animals.

[0050] It should be noted that the above are only some exemplary application scenarios given by the embodiments of the present application, and do not constitute a limitation on the application scenarios of the thermal imaging video data processing method provided by the embodiments of the present application.

[0051] Figure 1 is the system architecture diagram involved in a thermal imaging video data processing method provided by the embodiments of the present application. As Figure 1 shown, the system includes a video processing device 101 and an infrared thermal imaging device 102. Among them, the infrared thermal imaging device 102 can establish a communication connection with the video processing device 101.

[0052] The infrared thermal imaging device 102 collects the thermal imaging video data of the target and sends the collected thermal imaging video data to the video processing device 101. Correspondingly, the video processing device 101 receives the thermal imaging video data sent by the infrared thermal imaging device 102 and processes each thermal image data frame in the thermal imaging video data by using the method provided by the embodiments of the present application.

[0053] Among them, the video processing device 101 can be a server or a server cluster, or a cloud platform providing video processing services. Or, the video processing device 101 can also be a terminal device, such as a smart phone, a tablet computer, a notebook computer, a personal computer, etc. The embodiments of the present application do not make any limitations in this regard.

[0054] Optionally, in some possible implementation manners, the video processing device 101 may also be integrated in the infrared thermal imaging device 102, that is, the video processing device 101 may be a video processing unit included in the infrared thermal imaging device 102.

[0055] Next, the thermal imaging video data processing method provided in the embodiments of the present application will be introduced.

[0056] Figure 2 is a flowchart of a thermal imaging video data processing method provided in the embodiments of the present application. This method can be applied to Figure 1 the video processing device shown in, such as Figure 2 shown, the method includes the following steps:

[0057] Step 201: Obtain a first pseudo-color video frame corresponding to the first thermal image data frame.

[0058] In one implementation manner, the video processing device may obtain the color value corresponding to each thermal image data in the first thermal image data frame from the correspondence between the thermal image data and the color value, and then replace each thermal image data in the first thermal image data frame with the corresponding color value to obtain the first pseudo-color video frame.

[0059] The thermal image data in the thermal image data frame in the embodiments of the present application may be grayscale values. For example, the range of grayscale values represented by 8-bit data is 0-255. Alternatively, the thermal image data may also be temperature data, where the temperature data may refer to the data before the signal collected by the infrared thermal imaging device is converted into grayscale values. For example, the temperature data may be the data obtained after the electrical signal output by the infrared detector in the infrared thermal imaging device is converted by an analog-to-digital converter or other data that can represent the temperature of the detected target. The embodiments of the present application do not make any limitations in this regard.

[0060] Exemplarily, when the thermal image data in the thermal image data frame is a grayscale value, the first thermal image data frame is a frame of grayscale image. For the convenience of description, the first thermal image data frame is referred to as the first grayscale image herein. In this case, the video processing device may obtain the correspondence between the grayscale value and the color value, and then, according to the grayscale value of each pixel point in the first grayscale image, obtain the color value corresponding to each grayscale value from the correspondence between the grayscale value and the color value, and then replace the grayscale value of each pixel point in the first grayscale image with the corresponding color value to obtain the first pseudo-color video frame corresponding to the first grayscale image.

[0061] Among them, the color value may be an RGB value or other formats of color values. The embodiments of the present application do not make any limitations in this regard.

[0062] Optionally, when the thermal image data in the thermal image data frame is temperature data, the thermal image data frame is a matrix composed of multiple temperature data. In this case, the video processing device can first convert the thermal image data in the first thermal image data frame into gray values, that is, convert the first thermal image data frame into a first gray image. Then, obtain the first pseudo-color video frame corresponding to the first gray image. The specific implementation of obtaining the first pseudo-color video frame corresponding to the first gray image can refer to the above implementation, and this application will not elaborate here.

[0063] Optionally, when the thermal image data in the first thermal image data frame is temperature data, the video processing device can also obtain the correspondence between the temperature data and the color values, and directly obtain the color value corresponding to each temperature data in the first thermal image data frame from the correspondence between the temperature data and the color values. Then, replace each temperature data in the first thermal image data frame with the corresponding color value to obtain the first pseudo-color video frame.

[0064] In another implementation, the first pseudo-color video frame can also be generated according to the pseudo-color video frame corresponding to the previous thermal image data frame of the first thermal image data frame. That is, the first pseudo-color video frame can be obtained by replacing some color values in the pseudo-color video frame corresponding to the previous thermal image data frame of the first thermal image data frame through the method introduced in the following steps 202-204.

[0065] It should be noted that the color value of each pixel point in the first pseudo-color video frame obtained by the above method is obtained through the correspondence between the thermal image data and the color values. Therefore, the color generated by the color value of each pixel point is not the true color of the pseudo-color video frame itself. Therefore, this video frame is called a pseudo-color video frame.

[0066] In addition, the above first thermal image data frame can be any one of the M specified thermal image data frames, where there can be N thermal image data frames between every two adjacent specified thermal image data frames. It should be noted that N is an integer greater than 0, M can be a preset integer not less than 2, and the size of M can be set according to the change range of the thermal image data in two adjacent thermal image data frames in the thermal imaging video data. This application does not limit this.

[0067] For example, the 1st, 11th, and 21st thermal image data frames in the thermal imaging video data can be used as the specified thermal image data frames, and any one of the 1st, 11th, and 21st thermal image data frames can be used as the first thermal image data frame.

[0068] Optionally, the above first thermal image data frame can also be any one of the thermal image data frames in the thermal imaging video data except the last thermal image data frame.

[0069] Step 202: Determine target thermal image data in the second thermal image data frame whose thermal image data has changed at the corresponding position compared to the first thermal image data frame.

[0070] When the first thermal image data frame is any one of M specified thermal image data frames, the video processing device may use any one of the N thermal image data frames between the first thermal image data frame and the next specified thermal image data frame as the second thermal image data frame; when the first thermal image data frame is any one of the thermal imaging video data except the last thermal image data frame, the video processing device may use the thermal image data frame adjacent to the first thermal image data frame after the first thermal image data frame as the second thermal image data frame. On this basis, the video processing device first determines the absolute value of the difference between each thermal image data in the second thermal image data frame and the thermal image data at the corresponding position in the first thermal image data frame; then, it uses the thermal image data in the second thermal image data frame whose corresponding absolute value of the difference is greater than the reference threshold as the target thermal image data, where the reference threshold is an integer greater than 0.

[0071] Exemplarily, when the thermal image data in the first thermal image data frame and the second thermal image data frame is a gray value, that is, when both the first thermal image data frame and the second thermal image data frame are gray images, the video processing device may compare the gray value of each pixel point in the second thermal image data frame with the gray value of the pixel point at the corresponding position in the first thermal image data frame, and use the pixel point in the second thermal image data frame whose gray value has changed compared to the pixel point at the corresponding position in the first thermal image data frame as the target thermal image data.

[0072] Exemplarily, the video processing device may calculate the difference data frame between the second thermal image data frame and the first thermal image data frame, and the gray value of each pixel point in the difference data frame is the absolute value of the gray difference between the pixel points at the corresponding positions in the second thermal image data frame and the first thermal image data frame. Then, the pixel point in the second thermal image data frame corresponding to the pixel point in the difference data frame whose gray value is greater than the reference threshold is used as the target thermal image data.

[0073] For example, assume that the gray value of a certain pixel point in the second thermal image data frame is 120, while the gray value of the pixel point at the corresponding position in the first thermal image data frame is 125. After calculating the difference data frame between the second thermal image data frame and the first thermal image data frame, the gray value of the pixel point at this position in the difference data frame will be 5. Assume that the reference threshold is 3. At this time, since this gray value is greater than the reference threshold, the pixel point with a gray value of 120 in the second thermal image data frame can be used as a target thermal image data of the second thermal image data frame.

[0074] When the thermal image data in the first thermal image data frame and the second thermal image data frame are temperature data, the video processing device may first convert the temperature data into grayscale values. Then, referring to the above implementation, it can determine the target thermal image data whose thermal image data at the corresponding position in the second thermal image data frame has changed compared with that in the first thermal image data frame. This is not elaborated in this embodiment of the present application. Alternatively, the video processing device may directly calculate the absolute value of the temperature difference between the temperature data in the second thermal image data frame and the temperature data at the corresponding position in the first thermal image data frame to obtain a difference data frame. At this time, the difference data frame will contain multiple absolute values of temperature differences. Then, the temperature data corresponding to the absolute value of the temperature difference greater than the reference threshold in the difference data frame is used as the target thermal image data.

[0075] Optionally, in some possible cases, when the second thermal image data frame is the thermal image data frame adjacent to the first thermal image data frame after the first thermal image data frame, the video processing device may also determine the difference data frame between the second thermal image data frame and the first thermal image data frame according to the second thermal image data frame, the first thermal image data frame, and one or more consecutive thermal image data frames adjacent to the first thermal image data frame before the first thermal image data frame. Then, according to the difference data frame, it determines the target thermal image data whose thermal image data at the corresponding position in the second thermal image data frame has changed compared with that in the first thermal image data frame.

[0076] Exemplarily, taking the second thermal image data frame, the first thermal image data frame, and the previous thermal image data frame of the first thermal image data frame as an example, for the convenience of description, the previous thermal image data frame of the first thermal image data frame is called the third thermal image data frame. The video processing device first calculates the absolute value of the difference between the thermal image data in the first thermal image data frame and the thermal image data at the corresponding position in the third thermal image data frame to obtain a first candidate difference frame, and then calculates the absolute value of the difference between the thermal image data in the second thermal image data frame and the thermal image data at the corresponding position in the first thermal image data frame to obtain a second candidate difference frame. Then, it calculates the average value of the thermal image data at the same position in the first candidate difference frame and the second candidate difference frame to obtain the difference data frame corresponding to the second thermal image data frame and the first thermal image data frame. Then, the video processing device may use the thermal image data corresponding to the thermal image data greater than the reference threshold in the difference data frame as the target thermal image data.

[0077] Optionally, in some other possible cases, the video processing device may also generate a background thermal image data frame according to the first thermal image data frame and other thermal image data frames before the first thermal image data frame. Then, the video processing device may refer to the above method to determine the thermal image data whose thermal image data at the corresponding position in the second thermal image data frame has changed compared with that in the background thermal image data frame, and use these thermal image data as the target thermal image data.

[0078] Step 203: Obtain the color value corresponding to the target thermal image data from the correspondence between the thermal image data and the color value.

[0079] When the thermal image data is a grayscale value, from the above steps, it can be known that the target thermal image data is the target pixel point. The video processing device can obtain the color value corresponding to the grayscale value of each target pixel point from the correspondence between the grayscale value and the color value.

[0080] Optionally, when the thermal image data is temperature data, the video processing device can first convert the temperature data into a grayscale value, and then obtain the color value corresponding to the grayscale value converted from each target thermal image data from the correspondence between the grayscale value and the color value. Alternatively, the video processing device can also directly obtain the color value corresponding to each target thermal image data from the correspondence between the temperature data and the color value.

[0081] Step 204: Generate a second pseudo-color video frame corresponding to the second thermal image data frame according to the color value corresponding to the target thermal image data and the first pseudo-color video frame.

[0082] In one implementation, the video processing device replaces the color value of the pixel point corresponding to the position of the target thermal image data in the first pseudo-color video frame with the color value corresponding to the target thermal image data to obtain the second pseudo-color video frame.

[0083] It should be noted that the video processing device can copy the first pseudo-color video frame. After that, determine the pixel points corresponding to the target thermal image data in the second thermal image data frame in the copied first pseudo-color video frame. Then, replace the color values of these pixel points with the corresponding color values of the target thermal image data. For the pixel points in the first pseudo-color video frame that do not correspond to the target thermal image data in the second thermal image data frame, keep the color values of these pixel points unchanged, so as to obtain the second pseudo-color video frame corresponding to the second thermal image data frame.

[0084] Exemplarily, when the target thermal image data is a grayscale value and the color value is an RGB value, the generation process of the second pseudo-color video frame is described as an example. Refer to Figure 3 , Figure 3 Figure A in is the copied first pseudo-color video frame, and Figure B is the second thermal image data frame. As Figure 3 shown, the pixel points f, g, j, k in the second thermal image data are the target thermal image data. Among them, the pixel points corresponding to the pixel points f, g, j, k in the first pseudo-color video frame are 6, 7, 10, 11 respectively. At this time, the RGB values of the pixel points 6, 7, 10, 11 in the first pseudo-color video frame can be replaced with the RGB values corresponding to the pixel points f, g, j, k in the second grayscale image, so as to obtain the second pseudo-color video frame shown in Figure C in Figure 3 .

[0085] In another implementation, as can be seen from step 202 above, the video processing device can determine the target thermal image data in the second thermal image data frame by calculating the difference data frame between the first thermal image data frame and the second thermal image data frame. Based on this, the video processing device can assign the thermal image data greater than the reference threshold in the difference data frame to a first value, and assign the thermal image data not greater than the reference threshold to a second value to obtain a binarized data frame. Here, the first value and the second value are different. For example, the first value is 1, the second value is 0, or the first value is 255, the second value is 0, etc. After obtaining the binarized data frame, since the thermal image data corresponding to the thermal image data assigned to the first value in the binarized data frame in the second thermal image data frame is the target thermal image data, the video processing device can replace the thermal image data assigned to the first value in the binarized data frame with the color value of the target thermal image data at the corresponding position in the second thermal image data frame, and replace the thermal image data assigned to the second value with the color value of the pixel at the corresponding position in the first pseudo-color video frame, thereby obtaining the second pseudo-color video frame.

[0086] Exemplarily, when the thermal image data is a grayscale value and the color value is an RGB value, refer to Figure 4 , Figure 4 Figure A in it is the first pseudo-color video frame, and Figure B is the second thermal image data frame. As shown in Figure 4 , the pixel points f, g, j, k in the second thermal image data frame are the target thermal image data. According to the second thermal image data frame, a binarized image as shown in Figure D in Figure 4 can be obtained. Among them, the pixel values of the pixel points corresponding to the target thermal image data in the second thermal image data frame in this binarized image are all assigned the value 1, and the remaining pixel points are assigned the value 0. After obtaining the binarized image, the grayscale value of the pixel points assigned the value 1 in the binarized image can be replaced with the RGB values corresponding to the pixel points f, g, j, k at the corresponding positions in the second thermal image data frame, and the grayscale value of the pixel points assigned the value 0 in the binarized image can be replaced with the RGB values of the pixel points at the corresponding positions in the first pseudo-color video frame, thereby obtaining the second pseudo-color video frame as shown in Figure C in Figure 4 .

[0087] In another implementation, the video processing device can also replace the target thermal image data in the second thermal image data frame with the color value corresponding to the target thermal image data. After that, the other thermal image data in the second thermal image data frame except the target thermal image data is replaced with the color value of the pixel at the corresponding position in the first pseudo-color video frame, thereby obtaining the second pseudo-color video frame.

[0088] After obtaining the above-mentioned second pseudo-color video frame, for the next thermal image data frame of the second thermal image data frame, the video processing device may use the second thermal image data frame as the first thermal image data frame, and the next thermal image data frame as the new second thermal image data frame, and then continue to obtain the pseudo-color video frame of the next thermal image data frame by using the method in the above steps 202-204. This application embodiment will not be elaborated here.

[0089] In the embodiment of this application, the target thermal image data that is different from the first thermal image data frame in the second thermal image data frame is determined. Then, the color value corresponding to the target thermal image data is obtained from the correspondence between the thermal image data and the color value. Furthermore, the second pseudo-color video frame is generated according to the color value corresponding to the target thermal image data and the first pseudo-color video frame. In this way, only the color value corresponding to the target thermal image data in the second thermal image data frame needs to be obtained from the correspondence between the thermal image data and the color value, without obtaining the color values corresponding to all the thermal image data in the second thermal image data frame, which shortens the acquisition time of the color values, improves the processing efficiency of the thermal imaging video data, and reduces the CPU consumption of the processing device during the processing.

[0090] In addition, in the embodiment of this application, the thermal image data in the thermal image data frame may refer to temperature data. In this case, the video processing device may directly obtain the temperature data that has changed in the second thermal image data frame compared with the first thermal image data frame, and then directly obtain the color value corresponding to the changed temperature data from the correspondence between the temperature data and the color value to generate the pseudo-color video frame corresponding to the second thermal image data frame. In this way, it is not necessary to generate a grayscale image anymore, and the thermal image data frame containing temperature data can be directly converted into a pseudo-color video frame, which improves the processing efficiency of the thermal imaging video data and reduces the CPU consumption of the processing device during the processing.

[0091] Next, the thermal imaging video data processing device provided by the embodiment of this application will be introduced.

[0092] See Figure 5 , the embodiment of this application provides a thermal imaging video data processing device 500. This device may be implemented in the form of software or hardware as a part of the video processing device in the foregoing embodiment. The device 500 includes: a first acquisition module 501, a determination module 502, a second acquisition module 503, and a generation module 504.

[0093] Among them, the first acquisition module 501 is used to acquire the first pseudo-color video frame corresponding to the first thermal image data frame.

[0094] It should be noted that the first thermal image data frame can be any one of M specified thermal image data frames. There are N thermal image data frames between every two adjacent specified thermal image data frames. Here, M is an integer not less than 2, and N is an integer greater than 0. That is to say, the first acquisition module 501 can acquire any one of the M specified thermal image data frames as the first thermal image data frame. Alternatively, the first thermal image data frame can be any one of the thermal image data frames in the thermal imaging video data except the last one.

[0095] The determination module 502 is configured to determine, from the second thermal image data frame, target thermal image data whose thermal image data at the corresponding position compared with the first thermal image data frame has changed. The second thermal image data frame is a thermal image data frame acquired after the first thermal image data frame.

[0096] Optionally, when the first acquisition module 501 acquires a thermal image data frame as the first thermal image data frame from the M specified thermal image data frames, the determination module 502 is configured to acquire any one of the N thermal image data frames between the first thermal image data frame and the next specified thermal image data frame of the first thermal image data frame as the second thermal image data frame. When the first thermal image data frame is any one of the thermal image data frames in the thermal imaging video data except the last one, the determination module 502 is configured to use the next thermal image data frame of the first thermal image data frame as the second thermal image data frame. Then, the determination module 502 is configured to determine, from the second thermal image data frame, target thermal image data whose thermal image data at the corresponding position compared with the first thermal image data frame has changed.

[0097] Exemplarily, the determination module 502 is mainly configured to: determine the absolute value of the difference between each thermal image data in the second thermal image data frame and the thermal image data at the corresponding position in the first thermal image data frame; use the thermal image data in the second thermal image data frame whose corresponding absolute value of the difference is greater than the reference threshold as the target thermal image data, and the reference threshold is an integer greater than 0.

[0098] It should be noted that the thermal image data in the above first thermal image data frame and second thermal image data frame can be grayscale values or temperature data.

[0099] The second acquisition module 503 is configured to acquire the color value corresponding to the target thermal image data from the correspondence between the thermal image data and the color value.

[0100] The generation module 504 is configured to generate a second pseudo-color video frame corresponding to the second thermal image data frame according to the color value corresponding to the target thermal image data and the first pseudo-color video frame.

[0101] Exemplarily, the generation module 504 is configured to: replace the color value of the pixel point corresponding to the position of the target thermal image data in the first pseudo-color video frame with the color value corresponding to the target thermal image data to obtain the second pseudo-color video frame.

[0102] In summary, in the embodiment of the present application, the thermal imaging video data processing device determines the target thermal imaging data that is different in the second thermal imaging data frame compared with the first thermal imaging data frame. Then, it obtains the color value corresponding to the target thermal imaging data from the correspondence between the thermal imaging data and the color value. Furthermore, it generates the second pseudo-color video frame according to the color value corresponding to the target thermal imaging data and the first pseudo-color video frame. In this way, only the color value corresponding to the target thermal imaging data in the second thermal imaging data frame needs to be obtained from the correspondence between the thermal imaging data and the color value, without obtaining the color values corresponding to all the thermal imaging data in the second thermal imaging data frame, which shortens the time for obtaining the color values, improves the processing efficiency of the thermal imaging video data, and reduces the CPU consumption of the processing device during the processing process.

[0103] It should be noted that when the thermal imaging video data processing device provided in the above embodiment processes the thermal imaging video data, only the division of the above functional modules is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the thermal imaging video data processing device provided in the above embodiment and the embodiment of the thermal imaging video data processing method belong to the same concept. For the specific implementation process, please refer to the method embodiment and will not be elaborated here.

[0104] Figure 6 It is a schematic structural diagram of a server shown according to an exemplary embodiment. The functions of the video processing device in the above embodiment can be implemented by the Figure 6 server shown in. This server can be a server in a background server cluster. Specifically:

[0105] The server 600 includes a central processing unit (CPU) 601, a system memory 604 including a random access memory (RAM) 602 and a read-only memory (ROM) 603, and a system bus 605 connecting the system memory 604 and the central processing unit 601. The server 600 also includes a basic input / output system (Input / Output, I / O system) 606 for facilitating the transfer of information between various components within the computer, and a mass storage device 607 for storing an operating system 613, application programs 614, and other program modules 615.

[0106] The basic input / output system 606 includes a display 608 for displaying information and input devices 609 such as a mouse, keyboard, etc. for user input of information. Both the display 608 and the input devices 609 are connected to the central processing unit 601 through an input / output controller 610 connected to the system bus 605. The basic input / output system 606 may also include an input / output controller 610 for receiving and processing inputs from multiple other devices such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 610 also provides outputs to a display screen, printer, or other types of output devices.

[0107] The mass storage device 607 is connected to the central processing unit 601 through a mass storage controller (not shown) connected to the system bus 605. The mass storage device 607 and its associated computer-readable medium provide non-volatile storage for the server 600. That is, the mass storage device 607 may include computer-readable media (not shown) such as a hard disk or a CD-ROM (Compact Disc Read-Only Memory) drive.

[0108] Without loss of generality, computer-readable media can include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes RAM, ROM, EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), flash memory, or other solid-state storage devices, CD-ROM, DVD (Digital Versatile Disc), or other optical storage, magnetic tape cartridges, tapes, disk storage, or other magnetic storage devices. Of course, those skilled in the art will know that computer storage media is not limited to the above several types. The above system memory 604 and mass storage device 607 can be collectively referred to as memory.

[0109] According to various embodiments of the present application, the server 600 can also run by connecting to a remote computer on the network such as the Internet. That is, the server 600 can be connected to the network 612 through a network interface unit 611 connected to the system bus 606, or rather, the network interface unit 611 can also be used to connect to other types of networks or remote computer systems (not shown).

[0110] The above-mentioned memory further includes one or more programs, which are stored in the memory and configured to be executed by the CPU. The one or more programs include instructions for performing the thermal imaging video data processing method provided in the embodiments of the present application.

[0111] The embodiments of the present application also provide a computer-readable storage medium. When the instructions in the storage medium are executed by the processor of the server, the server can execute the thermal imaging video data processing method provided in the above embodiments. For example, the computer-readable storage medium may be a ROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc. It should be noted that the computer-readable storage medium mentioned in the embodiments of the present application may be a non-volatile storage medium, in other words, a non-transitory storage medium.

[0112] It should be understood that all or part of the steps for implementing the above embodiments can be realized by software, hardware, firmware or any combination thereof. When implemented by software, it can be realized in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The computer instructions can be stored in the above-mentioned computer-readable storage medium.

[0113] That is to say, in some embodiments, a computer program product containing instructions is also provided. When it runs on a computer, the computer is enabled to execute the thermal imaging video data processing method provided in the above embodiments.

[0114] The above description is not intended to limit the embodiments of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present application shall be included in the protection scope of the embodiments of the present application.

Claims

1. A method for processing thermal imaging video data, characterized in that, The method includes: Obtaining a first pseudo-color video frame corresponding to a first thermal image data frame, where the first thermal image data is any one of M specified thermal image data frames. There are N thermal image data frames between every two adjacent specified thermal image data frames, N is an integer greater than 0, M is an integer not less than 2, and the size of M is determined according to the change amplitude of the thermal image data in two adjacent thermal image data frames in the thermal imaging video data. The color of each pixel point in the first pseudo-color video frame is determined based on the first thermal image data frame and the correspondence between the thermal image data and the color value; Determining the absolute value of the difference between the thermal image data in the first thermal image data frame and the thermal image data at the corresponding position in the third thermal image data frame to obtain a first candidate difference frame, where the third thermal image data frame is the thermal image data frame before the first thermal image data frame; determining the absolute value of the difference between the thermal image data in the second thermal image data frame and the thermal image data at the corresponding position in the first thermal image data frame to obtain a second candidate difference frame; determining the average value of the thermal image data at the same position in the first candidate difference frame and the second candidate difference frame to obtain a difference data frame, and taking the thermal image data in the second thermal image data frame corresponding to the thermal image data greater than a reference threshold in the difference data frame as the target thermal image data, where the reference threshold is an integer greater than 0; when the first thermal image data is any one of the M specified thermal image data frames, the second thermal image data frame is any one of the N thermal image data frames between the first thermal image data frame and the next specified thermal image data frame of the first thermal image data frame; Obtaining the color value corresponding to the target thermal image data from the correspondence between the thermal image data and the color value; Replacing the color value of the pixel point corresponding to the position of the target thermal image data in the first pseudo-color video frame with the color value corresponding to the target thermal image data to obtain a second pseudo-color video frame corresponding to the second thermal image data frame, or assigning the thermal image data greater than the reference threshold in the difference data frame to a first value, assigning the thermal image data not greater than the reference threshold in the difference data frame to a second value to obtain a binarized data frame; replacing the thermal image data assigned to the first value in the binarized data frame with the color value of the target thermal image data at the corresponding position in the second thermal image data frame, and replacing the thermal image data assigned to the second value in the binarized data frame with the color value of the pixel point at the corresponding position in the first pseudo-color video frame to obtain the second pseudo-color video frame; or replacing the target thermal image data in the second thermal image data frame with the color value corresponding to the target thermal image data, and replacing the other thermal image data in the second thermal image data frame except the target thermal image data with the color value of the pixel point at the corresponding position in the first pseudo-color video frame to obtain the second pseudo-color video frame.

2. The method according to claim 1, wherein The thermal image data in the thermal image data frame is a grayscale value; or the thermal image data in the thermal image data frame is temperature data.

3. A thermal imaging video data processing device, characterized in that, The device includes: A first acquisition module, configured to acquire a first pseudo-color video frame corresponding to a first thermal image data frame, where the first thermal image data is any one of M specified thermal image data frames, and there are N thermal image data frames between every two adjacent specified thermal image data frames, N is an integer greater than 0, M is an integer not less than 2, and the size of M is determined according to the change amplitude of the thermal image data in two adjacent thermal image data frames in the thermal imaging video data. The color of each pixel point in the first pseudo-color video frame is determined based on the first thermal image data frame and the correspondence between the thermal image data and the color value; A determination module, configured to determine the absolute value of the difference between the thermal image data in the first thermal image data frame and the thermal image data at the corresponding position in the third thermal image data frame to obtain a first candidate difference frame, where the third thermal image data frame is the previous thermal image data frame of the first thermal image data frame; determine the absolute value of the difference between the thermal image data in the second thermal image data frame and the thermal image data at the corresponding position in the first thermal image data frame to obtain a second candidate difference frame; determine the average value of the thermal image data at the same position in the first candidate difference frame and the second candidate difference frame to obtain a difference data frame, and use the thermal image data in the second thermal image data frame corresponding to the thermal image data greater than a reference threshold in the difference data frame as the target thermal image data, where the reference threshold is an integer greater than 0; in the case where the first thermal image data is any one of the M specified thermal image data frames, the second thermal image data frame is any one of the N thermal image data frames between the first thermal image data frame and the next specified thermal image data frame of the first thermal image data frame; A second acquisition module, configured to acquire the color value corresponding to the target thermal image data from the correspondence between the thermal image data and the color value; A generation module, configured to replace the color value of the pixel point corresponding to the position of the target thermal image data in the first pseudo-color video frame with the color value corresponding to the target thermal image data to obtain a second pseudo-color video frame corresponding to the second thermal image data frame, or assign a first value to the thermal image data greater than the reference threshold in the difference data frame, assign a second value to the thermal image data not greater than the reference threshold in the difference data frame to obtain a binarized data frame; replace the thermal image data assigned with the first value in the binarized data frame with the color value of the target thermal image data at the corresponding position in the second thermal image data frame, and replace the thermal image data assigned with the second value in the binarized data frame with the color value of the pixel point at the corresponding position in the first pseudo-color video frame to obtain the second pseudo-color video frame; or replace the target thermal image data in the second thermal image data frame with the color value corresponding to the target thermal image data, and replace the other thermal image data in the second thermal image data frame except the target thermal image data with the color value of the pixel point at the corresponding position in the first pseudo-color video frame to obtain the second pseudo-color video frame.

4. The device according to claim 3, characterized in that, The thermal image data in the thermal image data frame is a grayscale value; or, the thermal image data in the thermal image data frame is temperature data.

5. 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 computer, it implements the thermal imaging video data processing method according to claim 1 or 2.

Citation Information

Patent Citations

  • Two-waveband video fast naturalness color integration method based on color look-up table

    CN101867685A

  • Method for enhancing gas infrared image based on self-adaption time-domain filtering and morphology

    CN102609907A

  • Pseudo color control device and pseudo color control method

    CN104422523A