Body temperature measurement method, device, electronic device and readable storage medium
By identifying the temperature measurement area in the thermal imaging video data and performing face detection when necessary, the problem of face detection in the prior art consumes a lot of computing power, achieving more efficient body temperature measurement and resource utilization reduction.
Patent Information
- Application Number
- CN202110891255.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-04
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2041-08-04
AI Technical Summary
The existing thermal imaging temperature measurement technology consumes a lot of computing power in face detection, resulting in a large amount of algorithms and a high system resource occupancy.
By acquiring video data, identify the temperature measurement area of the video frame to be measured, and determine the maximum temperature in the temperature measurement area. Only when the maximum temperature exceeds the normal body temperature range, the face detection algorithm is enabled to output the temperature of the face area.
It significantly reduces the occupation of system resources, improves the temperature measurement efficiency, and reduces the probability of misjudgment.
Smart Images

Figure CN113743222B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of video technology, and in particular to a body temperature measurement method, device, electronic device, and readable storage medium. Background Art
[0002] Affected by the epidemic, non-cooperative temperature measurement technology has received widespread attention. Non-cooperative temperature measurement is usually based on the principle of thermal imaging, such as image processing technology to detect human body temperature. In order to avoid interference from other heat sources, some thermal imaging temperature measurement technologies will first perform face detection and then output the temperature of the face area. The inventors found that this method consumes a lot of computing power on face detection, resulting in a long algorithm time consumption and high system resource usage. Summary of the invention
[0003] In order to solve the problems in the related art, the embodiments of the present disclosure provide a body temperature measurement method, device, electronic device and readable storage medium.
[0004] In a first aspect, a method for measuring body temperature is provided in an embodiment of the present disclosure.
[0005] Specifically, the body temperature measurement method comprises:
[0006] Get video data;
[0007] Identifying a temperature measurement area of a video frame to be temperature measured in the video data;
[0008] Determine the highest temperature in the temperature measurement area;
[0009] When the highest temperature in the temperature measurement area exceeds the normal body temperature range, detecting a face area in the video frame to be measured;
[0010] Output the temperature of the face area.
[0011] Optionally, the video data is thermal imaging video data.
[0012] In combination with the first aspect, in a first implementation of the first aspect of the present disclosure, identifying the temperature measurement area of the video frame to be measured in the video data includes:
[0013] Get the background temperature of the field of view;
[0014] Determine a target area within a valid body temperature range from the video frame to be measured;
[0015] An area whose temperature difference with the background temperature is greater than a temperature threshold is determined from the target area as a temperature measurement area.
[0016] In combination with the first aspect, in a second implementation of the first aspect of the present disclosure, identifying the temperature measurement area of the video frame to be measured in the video data includes:
[0017] Get the background temperature and background score in the field of view;
[0018] Select a pixel point in the video frame to be measured as the current pixel point;
[0019] When the temperature of the current pixel is within the effective body temperature range, determining whether the current pixel belongs to the temperature measurement area according to whether the difference between the temperature of the current pixel and the background temperature of the pixel is greater than a temperature threshold;
[0020] Adjusting the background score of the current pixel by a predetermined change amount, and updating the background temperature of the current pixel and resetting the background score if the background score meets a score threshold condition;
[0021] Select the next pixel point until all pixels are traversed to determine the temperature measurement area.
[0022] Optionally, the method further includes: before adjusting the background score of the current pixel by a predetermined change amount, initializing the background temperature.
[0023] In combination with the second implementation of the first aspect, in a third implementation of the first aspect of the present disclosure, the identifying the temperature measurement area of the video frame to be measured in the video data further includes:
[0024] When the temperature of the current pixel exceeds the valid body temperature range, it is determined that the current pixel does not belong to the temperature measurement area, the background temperature of the current pixel is updated, and the background score is reset.
[0025] In combination with any one of the first to third implementations of the first aspect, in a fourth implementation of the first aspect of the present disclosure, the identifying of the temperature measurement area of the video frame to be temperature measured in the video data also includes optimizing the temperature measurement area through an image corrosion algorithm.
[0026] In combination with the first aspect and any one of the first to fourth implementations of the first aspect, in a fifth implementation of the first aspect of the present disclosure, detecting a face area in the video frame to be measured includes:
[0027] The temperature-measured video frame is detected by a face detection model to obtain a face region. Optionally, the temperature-measured video frame is detected by a thermal imaging face detection model to obtain a face region.
[0028] In combination with the first aspect and any one of the first to fifth implementations of the first aspect, the sixth implementation of the first aspect of the present disclosure further includes:
[0029] When the highest temperature in the temperature measurement area is within the normal body temperature range, the highest temperature in the temperature measurement area is output as the body temperature.
[0030] In a second aspect, a body temperature measurement device is provided in an embodiment of the present disclosure.
[0031] Specifically, the body temperature measuring device comprises:
[0032] An acquisition module, configured to acquire video data;
[0033] An identification module is configured to identify a temperature measurement area of a video frame to be temperature measured in the video data;
[0034] A determination module, configured to determine the highest temperature in the temperature measurement area;
[0035] A detection module is configured to detect a face area in the video frame to be measured temperature when the highest temperature in the temperature measurement area exceeds the normal body temperature range;
[0036] The output module is configured to output the temperature of the face area.
[0037] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising a memory and a processor, wherein the memory is used to store one or more computer instructions, and wherein the one or more computer instructions are executed by the processor to implement the aforementioned method.
[0038] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium on which computer instructions are stored, and the computer instructions implement the aforementioned method when executed by a processor.
[0039] According to the technical solution provided by the embodiment of the present disclosure, by acquiring video data (optionally, the video data is thermal imaging video data); identifying the temperature measurement area of the video frame to be measured in the video data; determining the highest temperature in the temperature measurement area; when the highest temperature in the temperature measurement area exceeds the normal body temperature range, detecting the face area in the video frame to be measured; and outputting the temperature of the face area. The method of the embodiment of the present disclosure first identifies the temperature measurement area, and only enables the face detection algorithm when the temperature measurement area exceeds the normal body temperature range, which greatly reduces the occupation of system resources.
[0040] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Other features, objectives and advantages of the present disclosure will become more apparent through the following detailed description of non-limiting embodiments in conjunction with the accompanying drawings. In the accompanying drawings:
[0042] Figure 1 A flow chart showing a method for measuring body temperature according to an embodiment of the present disclosure is shown;
[0043] Figure 2 A flow chart showing a method for measuring body temperature according to another embodiment of the present disclosure is shown;
[0044] Figure 3 A flow chart showing identification of temperature measurement areas according to an embodiment of the present disclosure is shown;
[0045] Figure 4 A schematic diagram showing a video frame to be measured for temperature according to an embodiment of the present disclosure;
[0046] Figure 5 A flow chart showing identification of temperature measurement areas according to another embodiment of the present disclosure is shown;
[0047] Figure 6 A flowchart showing identification of temperature measurement areas according to another embodiment of the present disclosure is shown;
[0048] Figure 7 A block diagram of a body temperature measurement device according to an embodiment of the present disclosure is shown;
[0049] Figure 8 A block diagram of an electronic device according to an embodiment of the present disclosure is shown;
[0050] Fig. 9 A schematic diagram of the structure of a computer system suitable for implementing a body temperature measurement method according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0051] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for the sake of clarity, parts not related to the description of the exemplary embodiments are omitted in the accompanying drawings.
[0052] In the present disclosure, it should be understood that terms such as "include" or "have" are intended to indicate the presence of features, numbers, steps, behaviors, components, parts, or a combination thereof disclosed in the present specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or a combination thereof exist or are added.
[0053] It should also be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0054] Figure 1A flow chart of a body temperature measurement method according to an embodiment of the present disclosure is shown.
[0055] like Figure 1 As shown, the method includes operations S110 to S150.
[0056] In operation S110, video data is acquired.
[0057] In operation S120, a temperature measurement area of a video frame to be temperature measured in the video data is identified.
[0058] In operation S130, the highest temperature in the temperature measurement area is determined.
[0059] In operation S140, when the highest temperature in the temperature measurement area exceeds the normal body temperature range, a face area in the video frame to be temperature measured is detected.
[0060] In operation S150, the temperature of the face area is output.
[0061] According to the technical solution provided by the embodiment of the present disclosure, by acquiring video data; identifying the temperature measurement area of the video frame to be measured in the video data; determining the highest temperature in the temperature measurement area; when the highest temperature in the temperature measurement area exceeds the normal body temperature range, detecting the face area in the video frame to be measured; and outputting the temperature of the face area. The method of the embodiment of the present disclosure first identifies the temperature measurement area, and only enables the face detection algorithm when the temperature measurement area exceeds the normal body temperature range, which greatly reduces the occupation of system resources.
[0062] The body temperature measurement method of the disclosed embodiment can be applied to facial access control scenarios, and can also be applied to various public places, such as subway stations, libraries, etc.
[0063] The video data of the disclosed embodiment may be thermal imaging video data. A thermal imaging sensor (e.g., an infrared sensor) converts the radiation energy of a detected object into an electrical signal in a non-contact manner, and converts it into a grayscale or pseudo-color image after system processing, namely, thermal imaging. Through continuous detection, thermal images at multiple moments constitute thermal imaging video data.
[0064] According to the embodiment of the present disclosure, thermal imaging video data can be collected by a thermal imaging sensor set at a fixed position. Since the thermal imaging sensor is set at a fixed position, most background objects will not move, and the method of the embodiment of the present disclosure can simplify the human body temperature measurement process through background modeling.
[0065] According to the embodiment of the present disclosure, the temperature measurement area of the video frame to be measured in the video data can be identified based on the correlation between the video frame sequences. In this way, an object that remains motionless for a long time in the field of view can be identified as the background, so there is no need to measure the temperature of the object. It should be noted that in operation 120, the recognition algorithm of the face or other specific targets is not used, which avoids complex recognition operations and reduces the occupation of system resources.
[0066] According to the embodiment of the present disclosure, after determining the temperature measurement area, the highest temperature in the temperature measurement area can be determined. In the thermal imaging image, the value of each pixel represents the temperature at that location, so the temperature measurement area can be traversed to find the highest temperature value.
[0067] According to the embodiment of the present disclosure, if the highest temperature of the temperature measurement area exceeds the normal body temperature range, the face area in the video frame to be measured is detected. The normal body temperature range refers to the body temperature range of a healthy normal person, for example, it can be set to less than 37°C or 37.5°C. When it exceeds this range, for example, reaching 39°C, the face area in the video frame to be measured is further detected, and the temperature measurement result is re-obtained and output in the face area to reduce misjudgment.
[0068] For example, if a person has a body temperature of 36°C and walks into the detection field of view holding a water cup of 39°C, the human body and the water cup may be identified as the temperature measurement area through operation S120, so that the human body temperature may be identified as 39°C in operation S130, resulting in a misjudgment. Through operations S140 and S150, the face area can be further determined to eliminate such misjudgment.
[0069] According to the embodiment of the present disclosure, the temperature video frame to be measured can be detected by a thermal imaging face detection model to obtain a face area. The thermal imaging face detection model can be various artificial intelligence models, such as a convolutional neural network model, and of course other suitable non-deep learning models can also be selected. The convolutional neural network model can be specially trained based on thermal imaging training data, or obtained by transfer learning from a face detection model based on standard visual images.
[0070] According to an embodiment of the present disclosure, the thermal imaging face detection model may not be used. For example, other sensors may be used to obtain auxiliary information of the face position for determining the face area, and the present disclosure does not limit this.
[0071] According to an embodiment of the present disclosure, when the highest temperature of the temperature measurement area is within the normal body temperature range, the highest temperature of the temperature measurement area is output as the body temperature. Optionally, a minimum human body temperature can also be set, such as 33°C or 35°C. If the temperature of the temperature measurement area is within the above-mentioned normal body temperature range, or even lower than the minimum human body temperature or no temperature measurement area is detected, the body temperature measurement result can be directly output, and there is no possibility of identifying a normal person as a fever patient.
[0072] Figure 2 A flow chart of a body temperature measurement method according to another embodiment of the present disclosure is shown.
[0073] like Figure 2 As shown, the method includes operations S210 to S250.
[0074] In operation S210, a temperature measurement area of a video frame to be temperature measured in the video data is identified by a background modeling logic temperature measurement method, and a maximum temperature in the temperature measurement area is determined.
[0075] In operation S220, it is determined whether the highest temperature is within the normal body temperature range. If it is beyond the normal body temperature range, operation S230 is performed; otherwise, operation S250 is performed.
[0076] In operation S230, face detection (such as thermal imaging face detection) is performed to obtain a face area.
[0077] In operation S240, the temperature of the face area is measured.
[0078] In operation S250, the body temperature is output.
[0079] The method of the disclosed embodiment first identifies the temperature of the temperature measurement area, and directly outputs the body temperature when the measured temperature is within the human body temperature range. Otherwise, face detection is used to find the face area for temperature measurement, which greatly reduces the occupancy of system resources.
[0080] Return to reference Figure 1 According to the embodiment of the present disclosure, operation S120 can be implemented in a variety of ways. Figure 3 to Figure 6 The various embodiments shown are illustrated, and these embodiments describe a method for determining a temperature measurement area based on temperature background modeling, but the present disclosure is not limited to this. Those skilled in the art may also use other temperature background establishment methods, or use other global temperature measurement methods instead of the method based on temperature background modeling.
[0081] Figure 3 A flow chart of identifying temperature measurement areas according to an embodiment of the present disclosure is shown.
[0082] like Figure 3 As shown, the method includes operations S310 to S330.
[0083] In operation S310, a background temperature of a viewing area is acquired.
[0084] In operation S320, a target area within a valid body temperature range is determined from the video frame to be measured for temperature.
[0085] In operation S330, a region whose temperature difference with the background temperature is greater than a temperature threshold is determined from the target region as a temperature measurement region.
[0086] According to the embodiment of the present disclosure, the thermal imaging sensor is set at a fixed position and has a fixed field of view, and each position within the field of view includes an attribute parameter representing the background temperature of the position. The position can refer to each pixel as a position, or a region composed of multiple pixels as a position.
[0087] According to the embodiment of the present disclosure, the effective body temperature range refers to the possible temperature range of the human body, and the temperature beyond the effective body temperature range is not considered as the body temperature of the human body. For example, the lower limit of the effective body temperature range can be set to 33°C or 35°C, and the upper limit can be set to 40°C or 42°C.
[0088] According to the embodiment of the present disclosure, the area in the effective body temperature range in the video frame to be measured can be first determined as the target area, and then the temperature of the target area is compared with the background temperature to select the temperature measurement area. For example, there is a fixed object with a temperature of 37°C in the field of view. In the technical solution of the embodiment of the present disclosure, due to the existence of the object, the background temperature of its location is set to 37°C. In the subsequent temperature detection, since there is no large temperature difference, the area will not be identified as the temperature measurement area, avoiding the interference of the object on the body temperature measurement.
[0089] On the contrary, if the background temperature of a certain location is 20℃, when someone enters the area, there is a large temperature difference between their body temperature and the background temperature of 20℃, and the area can be judged as a temperature measurement area through the threshold. The threshold can be set according to the actual situation, for example, it can be set to 10℃. The threshold is used to measure the difference between the current temperature and the background temperature, and the absolute value of the temperature difference can be directly taken for comparison.
[0090] Figure 4 A schematic diagram of a video frame to be measured for temperature according to an embodiment of the present disclosure is shown.
[0091] like Figure 4As shown, within the field of view, the background temperature of area A is about 36°C, and the background temperature of other areas is between 15°C-20°C. In the video frame to be measured at a certain moment, the temperatures of area A and area B are both 36°C, and the temperature of other area C is between 15°C-20°C. When determining the temperature measurement area, first determine area A and area B in the effective body temperature range, and then compare area A and area B with the background temperature. Among them, the temperature difference between area A and the background temperature is very small, does not meet the threshold condition, and is determined as a non-temperature measurement area. The temperature difference between area B and the background temperature is large, meets the threshold condition, and is determined as a temperature measurement area. Finally, area B in the video frame to be measured is determined as the temperature measurement area.
[0092] Combine the following Figure 5 and Figure 6 The optional implementation of background modeling of the present disclosure is introduced. Background modeling is the process of determining the background temperature within the field of view and updating it in real time.
[0093] Figure 5 A flow chart of identifying a temperature measurement area according to another embodiment of the present disclosure is shown.
[0094] like Figure 5 As shown, the method includes operations S510 to S550.
[0095] In operation S510, a background temperature and a background score within a field of view are acquired.
[0096] In operation S520, a pixel point in the video frame to be measured temperature is selected as a current pixel point.
[0097] In operation S530, when the temperature of the current pixel is within the effective body temperature range, it is determined whether the current pixel belongs to the temperature measurement area according to whether the difference between the temperature of the current pixel and the background temperature of the pixel is greater than a temperature threshold.
[0098] In operation S540, the background score of the current pixel is adjusted by a predetermined change amount, and if the background score satisfies a score threshold condition, the background temperature of the current pixel is updated and the background score is reset.
[0099] In operation S550, the next pixel point is selected until all the pixel points are traversed and the temperature measurement area is determined.
[0100] According to the disclosed embodiment, the background score is used to identify stationary objects within the effective temperature range to determine how to update the background temperature. The background temperature and background score can be initialized and given initial values, and then continuously iterated during the detection process.
[0101] According to the embodiment of the present disclosure, traversal may be performed in units of pixels, similar to S320 and S330 above, and the temperature measurement area may be determined by the effective body temperature range and the temperature difference.
[0102] According to the embodiment of the present disclosure, during the traversal process, if the temperature of a pixel is within the effective body temperature range, after determining whether it is a temperature measurement area, the background score of the current pixel is adjusted by a predetermined change amount. During the continuous detection process, the adjustment of the predetermined change amount has a time-accumulated effect on the background score.
[0103] For example, the background score can be initialized to a full value, such as 255, and then the background score value of the area where the temperature has not changed significantly is attenuated by reducing a predetermined change amount each round. When the attenuation reaches a certain threshold, that is, the temperature remains unchanged for a period of time, it can be considered that the position of the pixel is not the position of temperature measurement concern, and it is determined to be a background area, and the temperature of this position can be used to update the background temperature. In the subsequent temperature measurement process, if the temperature still does not change, it will not be identified as a temperature measurement area because the temperature difference condition is no longer met, thereby avoiding interference of this area with the temperature measurement result. Optionally, after using the temperature of this position to update the background temperature, the background score can also be reset.
[0104] Obviously, as an equivalent implementation, the background score may also be initialized to a smaller value, and a predetermined change amount is increased each round, and the background temperature of the position is updated when the background score exceeds a certain threshold.
[0105] According to an embodiment of the present disclosure, the step of identifying the temperature measurement area of the video frame to be temperature measured in the video data further includes:
[0106] When the temperature of the current pixel exceeds the valid body temperature range, it is determined that the current pixel does not belong to the temperature measurement area, the background temperature of the current pixel is updated, and the background score is reset.
[0107] For example, if the temperature of a pixel is 25°C, the subsequent temperature difference judgment will not be performed. The pixel will be directly determined not to belong to the target area, let alone the temperature measurement area. The temperature of the pixel can be used to update the background temperature of the location and reset the background score.
[0108] Combine the following Figure 6 The specific embodiment shown is used to describe the above method.
[0109] Figure 6 A flow chart of identifying temperature measurement areas according to yet another embodiment of the present disclosure is shown.
[0110] like Figure 6 As shown, the method includes operations S601 to S611.
[0111] In operation S601, a pixel point is selected from the temperature-measured video frame to determine whether the pixel point is within the valid body temperature range. If it is within the valid body temperature range, operation S602 is continued to be performed, otherwise operation S611 is performed.
[0112] In operation S602, the absolute value of the difference between the temperature of the current pixel and the background temperature of the pixel is calculated.
[0113] In operation S603, it is determined whether the absolute value of the difference is greater than a preset temperature threshold. If it is greater than the temperature threshold, operation S604 is performed; otherwise, operation S608 is performed.
[0114] In operation S604, the pixel point is marked as a temperature measurement area.
[0115] In operation S605, it is determined whether the background has not been initialized. If it has not been initialized, operation S606 is performed; otherwise, operation S607 is performed.
[0116] In operation S606, the background temperature is initialized.
[0117] Here, the initialization process of S605 and S606 may also be set before the entire process, which is not limited in the embodiment of the present disclosure.
[0118] In operation S607, the background score is decremented, and if the score is too low, the background is updated.
[0119] In operation S608, the pixel point is marked as a non-temperature measurement area, and the process jumps to operation S607.
[0120] In operation S609, it is determined whether the background processing of all pixels is completed. If it is completed, operation S610 is executed, otherwise, the process returns to operation S601 to select the next pixel.
[0121] In operation S610, the temperature measurement area is traversed to obtain the highest temperature.
[0122] In operation S611, the pixel point is marked as a non-temperature measurement area, and the process jumps to operation S609.
[0123] The method of the embodiment of the present disclosure uses a logical temperature measurement method to identify the temperature measurement area, which has a small amount of calculation and occupies less system resources, and can quickly and correctly identify the body temperature in most scenarios. For the body temperature results of suspected fever patients, the above-mentioned operations S140 and 150 (or S230-S250) are used to minimize the probability of misjudgment.
[0124] According to an embodiment of the present disclosure, the step of identifying the temperature measurement region of the video frame to be temperature measured in the video data further comprises optimizing the temperature measurement region by using an image erosion algorithm. This operation may be set between the above operations S609 and S610.
[0125] The erosion algorithm is an algorithm that eliminates boundary points and shrinks the boundary inward, and can be used to eliminate small and meaningless objects. For example, a 3x3 convolution kernel can be used to scan each pixel of the image, and the structural element and the binary image covered by it are operated "and". If both are 1, the pixel of the resulting image is 1, otherwise it is 0. Through the above operation, the boundary can be reduced. The embodiment of the present disclosure optimizes the temperature measurement area by an image erosion algorithm, which can avoid the influence of edge temperature.
[0126] In summary, the technical solution of the embodiment of the present disclosure combines empirical logic with a deep learning algorithm, which significantly reduces the amount of calculation while ensuring the accuracy of temperature measurement, reduces the occupation of system resources, and improves the efficiency of temperature measurement.
[0127] Figure 7 A block diagram of a body temperature measurement device 700 according to an embodiment of the present disclosure is shown. The device 700 can be implemented as part or all of an electronic device through software, hardware, or a combination of both.
[0128] like Figure 7 As shown, the body temperature measurement device 700 includes an acquisition module 710 , an identification module 720 , a determination module 730 , a detection module 740 and an output module 750 .
[0129] An acquisition module 710 is configured to acquire video data;
[0130] An identification module 720 is configured to identify a temperature measurement area of a video frame to be temperature measured in the video data;
[0131] A determination module 730 is configured to determine the highest temperature in the temperature measurement area;
[0132] The detection module 740 is configured to detect a face area in the video frame to be measured when the highest temperature in the temperature measurement area exceeds the normal body temperature range;
[0133] The output module 750 is configured to output the temperature of the face area.
[0134] The aforementioned video data may be thermal imaging video data.
[0135] According to the technical solution provided by the embodiment of the present disclosure, by first identifying the temperature measurement area, the face detection algorithm is enabled only when the temperature measurement area exceeds the normal body temperature range, which greatly reduces the occupation of system resources.
[0136] According to an embodiment of the present disclosure, the identification module 720 is configured to:
[0137] Get the background temperature of the field of view;
[0138] Determine a target area within a valid body temperature range from the video frame to be measured;
[0139] An area whose temperature difference with the background temperature is greater than a temperature threshold is determined from the target area as a temperature measurement area.
[0140] According to an embodiment of the present disclosure, the identification module 720 is configured to:
[0141] Get the background temperature and background score in the field of view;
[0142] Select a pixel point in the video frame to be measured as the current pixel point;
[0143] When the temperature of the current pixel is within the effective body temperature range, determining whether the current pixel belongs to the temperature measurement area according to whether the difference between the temperature of the current pixel and the background temperature of the pixel is greater than a temperature threshold;
[0144] Adjusting the background score of the current pixel by a predetermined change amount, and updating the background temperature of the current pixel and resetting the background score if the background score meets a score threshold condition;
[0145] Select the next pixel point until all pixels are traversed to determine the temperature measurement area.
[0146] According to an embodiment of the present disclosure, the identification module 720 is further configured to:
[0147] When the temperature of the current pixel exceeds the valid body temperature range, it is determined that the current pixel does not belong to the temperature measurement area, the background temperature of the current pixel is updated, and the background score is reset.
[0148] According to an embodiment of the present disclosure, the identification module 720 is further configured to optimize the temperature measurement area through an image corrosion algorithm.
[0149] According to an embodiment of the present disclosure, detecting a face area in the video frame to be measured includes:
[0150] The temperature-measured video frame is detected by a face detection model to obtain a face area.
[0151] According to an embodiment of the present disclosure, the output module 750 is further configured to output the maximum temperature of the temperature measurement area as body temperature when the maximum temperature of the temperature measurement area is within a normal body temperature range.
[0152] The present disclosure also discloses an electronic device, Figure 8 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown.
[0153] like Figure 8 As shown, the electronic device 800 includes a memory 801 and a processor 802, wherein the memory 801 is used to store a program that supports the electronic device to execute the body temperature measurement method or code generation method in any of the above embodiments, and the processor 802 is configured to execute the program stored in the memory 801.
[0154] According to an embodiment of the present disclosure, the memory 801 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 802 to implement the body temperature measurement method described in any of the above embodiments.
[0155] Fig. 9 A schematic diagram of the structure of a computer system suitable for implementing a body temperature measurement method according to an embodiment of the present disclosure is shown.
[0156] like Fig. 9 As shown, the computer system 900 includes a processing unit 901, which can perform various processes in the above-mentioned embodiments according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the system 900 are also stored. The processing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0157] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed. Among them, the processing unit 901 can be implemented as a processing unit such as a CPU, a GPU, a TPU, an FPGA, an NPU, etc.
[0158] In particular, according to an embodiment of the present disclosure, the method described above can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program tangibly contained on a readable medium thereof, and the computer program includes a program code for executing the above method. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 909, and / or installed from the removable medium 911.
[0159] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0160] The units or modules involved in the embodiments described in the present disclosure may be implemented by software or programmable hardware. The units or modules described may also be set in a processor, and the names of these units or modules do not constitute limitations on the units or modules themselves in some cases.
[0161] As another aspect, the present disclosure further provides a computer-readable storage medium, which may be a computer-readable storage medium included in the electronic device or computer system in the above embodiment; or a computer-readable storage medium that exists independently and is not assembled into a device. The computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute the method described in the present disclosure.
[0162] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.
Claims
1. A method for measuring body temperature, comprising: Get video data; Identify the temperature measurement area of the video frame to be measured in the video data, specifically: Get the background temperature and background score in the field of view; Select a pixel point in the video frame to be measured as the current pixel point; When the temperature of the current pixel is within the effective body temperature range, determining whether the current pixel belongs to the temperature measurement area according to whether the difference between the temperature of the current pixel and the background temperature of the pixel is greater than a temperature threshold; Adjusting the background score of the current pixel by a predetermined change amount, and updating the background temperature of the current pixel and resetting the background score if the background score meets a score threshold condition; Select the next pixel point until all the pixel points are traversed and determine the temperature measurement area; Determine the highest temperature in the temperature measurement area; When the highest temperature in the temperature measurement area exceeds the normal body temperature range, detecting a face area in the video frame to be measured; Output the temperature of the face area.
2. The method according to claim 1, wherein: The step of identifying the temperature measurement area of the video frame to be temperature measured in the video data comprises: Get the background temperature of the field of view; Determine a target area within a valid body temperature range from the video frame to be measured; An area whose temperature difference with the background temperature is greater than a temperature threshold is determined from the target area as a temperature measurement area.
3. The method according to claim 1, wherein: The step of identifying the temperature measurement area of the video frame to be temperature measured in the video data further includes: When the temperature of the current pixel exceeds the valid body temperature range, it is determined that the current pixel does not belong to the temperature measurement area, the background temperature of the current pixel is updated, and the background score is reset.
4. The method according to any one of claims 2 to 3, wherein: The identifying the temperature measurement area of the video frame to be temperature measured in the video data also includes optimizing the temperature measurement area by an image corrosion algorithm.
5. The method according to any one of claims 1 to 3, wherein: The video data is thermal imaging video data, and the detecting of the face area in the video frame to be measured temperature includes: The temperature-measured video frame is detected by a thermal imaging face detection model to obtain a face area.
6. The method according to any one of claims 1 to 3, further comprising: When the highest temperature in the temperature measurement area is within the normal body temperature range, the highest temperature in the temperature measurement area is output as the body temperature.
7. A body temperature measuring device, comprising: An acquisition module, configured to acquire video data; An identification module is configured to identify a temperature measurement area of a video frame to be temperature measured in the video data; The identification module is configured to: Get the background temperature and background score in the field of view; Select a pixel point in the video frame to be measured as the current pixel point; When the temperature of the current pixel is within the effective body temperature range, determining whether the current pixel belongs to the temperature measurement area according to whether the difference between the temperature of the current pixel and the background temperature of the pixel is greater than a temperature threshold; Adjusting the background score of the current pixel by a predetermined change amount, and updating the background temperature of the current pixel and resetting the background score if the background score meets a score threshold condition; Select the next pixel point until all the pixel points are traversed and determine the temperature measurement area; A determination module, configured to determine the highest temperature in the temperature measurement area; A detection module is configured to detect a face area in the video frame to be measured temperature when the highest temperature in the temperature measurement area exceeds the normal body temperature range; The output module is configured to output the temperature of the face area.
8. An electronic device, characterized in that: Comprising a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the steps of the method according to any one of claims 1 to 6.
9. A readable storage medium having computer instructions stored thereon, characterized in that: When the computer instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Object detection device
CN103415788A
Human body detection method, background temperature determining method, device, and air conditioning equipment
CN104279688A