US-12618717-B2 - Infrared temperature measurement method, apparatus, and device, and storage medium
Abstract
An infrared temperature measurement method, apparatus, device, and storage medium, which relate to the field of image processing is disclosed. The method comprises: determining a measurement temperature of a to-be-measured target based on a grayscale image captured to obtain a first measurement temperature; determining key point coordinates of the target based on a target image; determining a first distance based on the key point coordinates and configuration information of an infrared temperature measurement device, the first distance is a distance between the target and the infrared temperature measurement device; determining an actual temperature of the target based on the first measurement temperature and the first distance. In this way, the target image ranging and grayscale image temperature measurement can be combined, which not only reduces the influence of distance on the measurement temperature, but also avoids the problem of inaccurate measurement temperature when the distance does not meet the requirements.
Inventors
- Xiaowang CAI
Assignees
- HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO., LTD.
Dates
- Publication Date
- 20260505
- Application Date
- 20210304
- Priority Date
- 20200306
Claims (15)
- 1 . An infrared temperature measurement method, wherein, the method comprises: determining a measurement temperature of a to-be-measured target based on a grayscale image captured to obtain a first measurement temperature; determining key point coordinates of the target based on a target image; determining a first distance based on the key point coordinates and configuration information of an infrared temperature measurement device, wherein the first distance is a distance between the target and the infrared temperature measurement device; determining an actual temperature of the target based on the first measurement temperature and the first distance, wherein, the key point coordinates of the target comprise coordinates of a first key point and coordinates of a second key point, wherein the first key point and the second key point are any two key points whose actual distance is known among key points of the target, the configuration information comprises a focal distance and a pixel size; determining the first distance based on the key point coordinates and the configuration information of the infrared temperature measurement device, comprises: determining a horizontal distance between the first key point and the second key point in the target image, and determining a vertical distance between the first key point and the second key point in the target image, based on the coordinates of the first key point and the coordinates of the second key point to obtain a first horizontal distance and a first vertical distance; determining a second distance based on the first horizontal distance, the first vertical distance, and the pixel size, wherein the second distance is a distance between the first key point and the second key point in the target image; determining the first distance based on a first actual distance, the focal distance, and the second distance, wherein the first actual distance is an actual distance between the first key point and the second key point, wherein, the target image comprises a visible light image, the key point coordinates are facial key point coordinates, before determining the second distance based on the first horizontal distance, the first vertical distance and the pixel size, the method further comprises: if it is determined that a facial area of the target is not a frontal image based on the visible light image, determining a yaw angle and a pitch angle of the target; correcting the first horizontal distance based on the yaw angle and correcting the first vertical distance based on the pitch angle to obtain a second horizontal distance and a second vertical distance; determining the second distance based on the first horizontal distance, the first vertical distance, and the pixel size, comprises: determining the second distance based on the second horizontal distance, the second vertical distance, and the pixel size.
- 2 . The method of claim 1 , wherein the target image comprises the grayscale image or wherein the target image comprises a fusion image determined based on the grayscale image and the visible light image.
- 3 . The method of claim 1 , wherein the key point coordinates are facial key point coordinates, before determining the first distance based on the key point coordinates and the configuration information of the infrared temperature measurement device, the method further comprises: if it is determined that a facial area of the target is not a frontal image based on the visible light image, correcting the facial area based on the key point coordinates; determining key point coordinates of the corrected facial area; determining the first distance based on the key point coordinates and the configuration information of the infrared temperature measurement device, comprises: determining the first distance based on the key point coordinates of the corrected facial area and the configuration information.
- 4 . The method of claim 1 , wherein, determining the first distance based on the first actual distance, the focal distance, and the second distance, comprises: multiplying the first actual distance by the focal distance to obtain a first value; dividing the first value by the second distance to obtain a second value; determining the second value as the first distance.
- 5 . The method of claim 1 , wherein, determining the actual temperature of the target based on the first measurement temperature and the first distance, comprises: determining a corresponding temperature from a first mapping relationship based on the first measurement temperature and the first distance, the first mapping relationship is used for indicating a corresponding relationship among a measurement temperature, the distance between the target and the infrared temperature measurement device, and a temperature; determining the determined temperature as the actual temperature of the target; or determining a measurement temperature of a to-be-measured target based on a grayscale image captured to obtain the first measurement temperature, comprises: determining a facial area of the target in the grayscale image; obtaining an environment temperature; determining the first measurement temperature based on the environment temperature, grayscale values of pixel points in the facial area, and a specified functional relationship, the specified functional relationship is used for indicating a functional relationship among an environment temperature, a grayscale value, and a measurement temperature.
- 6 . The method of claim 5 , wherein determining the facial area of the target in the grayscale image comprises: determining first facial area coordinates of the target in the visible light image, the first facial area coordinates are used for indicating a facial area of the target in the visible light image; determining corresponding second facial area coordinates from a second mapping relationship based on the first facial area coordinates, the second mapping relationship is used for indicating a corresponding relationship between coordinates of a pixel point in the grayscale image and coordinates of a pixel point in the visible light image; determining the facial area of the target in the grayscale image based on the second facial area coordinates; or there is a plurality of pixel points in the facial area, determining the first measurement temperature based on the environment temperature, the grayscale values of the pixel points in the facial area, and the specified functional relationship, comprises: determining a measurement temperature corresponding to each pixel point based on the environment temperature, a grayscale value of each pixel point of the plurality of pixel points, and the specified functional relationship to obtain a second measurement temperature of each pixel point; determining the first measurement temperature based on the second measurement temperature of each pixel point of the plurality of pixel points.
- 7 . An infrared temperature measurement device, wherein, the infrared temperature measurement device comprises an image sensor and a processor; the image sensor is configured for capturing a grayscale image; the processor is configured for performing the following operations: determining a measurement temperature of a to-be-measured target based on the grayscale image captured to obtain a first measurement temperature; determining key point coordinates of the target based on a target image; determining a first distance based on the key point coordinates and configuration information of an infrared temperature measurement device, wherein the first distance is a distance between the target and the infrared temperature measurement device; determining an actual temperature of the target based on the first measurement temperature and the first distance, wherein, the key point coordinates of the target comprise coordinates of a first key point and coordinates of a second key point, wherein the first key point and the second key point are any two key points whose actual distance is known among key points of the target, the configuration information comprises a focal distance and a pixel size; determining the first distance based on the key point coordinates and the configuration information of the infrared temperature measurement device, comprises: determining a horizontal distance between the first key point and the second key point in the target image, and determining a vertical distance between the first key point and the second key point in the target image, based on the coordinates of the first key point and the coordinates of the second key point to obtain a first horizontal distance and a first vertical distance; determining a second distance based on the first horizontal distance, the first vertical distance, and the pixel size, wherein the second distance is a distance between the first key point and the second key point in the target image; determining the first distance based on a first actual distance, the focal distance, and the second distance, wherein the first actual distance is an actual distance between the first key point and the second key point, wherein, the target image comprises a visible light image, the key point coordinates are facial key point coordinates, before determining the second distance based on the first horizontal distance, the first vertical distance and the pixel size, the processor is further configured for performing the following operations: if it is determined that a facial area of the target is not a frontal image based on the visible light image, determining a yaw angle and a pitch angle of the target; correcting the first horizontal distance based on the yaw angle and correcting the first vertical distance based on the pitch angle to obtain a second horizontal distance and a second vertical distance; determining the second distance based on the first horizontal distance, the first vertical distance, and the pixel size, comprises: determining the second distance based on the second horizontal distance, the second vertical distance, and the pixel size.
- 8 . The infrared temperature measurement device of claim 7 , wherein, the infrared temperature measurement device further comprises a temperature sensor, the temperature sensor is configured for obtaining an environment temperature, the environment temperature is used by the processor to determine the first measurement temperature.
- 9 . The infrared temperature measurement device of claim 7 , wherein the infrared temperature measurement device comprises a binocular camera device, the binocular camera device is configured for capturing the grayscale image and the visible light image through the image sensor.
- 10 . A non-transitory computer readable storage medium, wherein, the computer readable storage medium has a computer program stored therein, when the computer program is executed by a processor, the method of claim 1 is implemented.
- 11 . The infrared temperature measurement device of claim 7 , wherein the target image comprises the grayscale image or wherein the target image comprises a fusion image determined based on the grayscale image and the visible light image.
- 12 . The infrared temperature measurement device of claim 7 , wherein the key point coordinates are facial key point coordinates, before determining the first distance based on the key point coordinates and the configuration information of the infrared temperature measurement device, the processor is further configured for performing the following operations: if it is determined that a facial area of the target is not a frontal image based on the visible light image, correcting the facial area based on the key point coordinates; determining key point coordinates of the corrected facial area; determining the first distance based on the key point coordinates and the configuration information of the infrared temperature measurement device, comprises: determining the first distance based on the key point coordinates of the corrected facial area and the configuration information.
- 13 . The infrared temperature measurement device of claim 7 , wherein, determining the first distance based on the first actual distance, the focal distance, and the second distance, comprises: multiplying the first actual distance by the focal distance to obtain a first value; dividing the first value by the second distance to obtain a second value; determining the second value as the first distance.
- 14 . The infrared temperature measurement device of claim 7 , wherein, determining the actual temperature of the target based on the first measurement temperature and the first distance, comprises: determining a corresponding temperature from a first mapping relationship based on the first measurement temperature and the first distance, the first mapping relationship is used for indicating a corresponding relationship among a measurement temperature, the distance between the target and the infrared temperature measurement device, and a temperature; determining the determined temperature as the actual temperature of the target; or determining a measurement temperature of a to-be-measured target based on a grayscale image captured to obtain the first measurement temperature, comprises: determining a facial area of the target in the grayscale image; obtaining an environment temperature; determining the first measurement temperature based on the environment temperature, grayscale values of pixel points in the facial area, and a specified functional relationship, the specified functional relationship is used for indicating a functional relationship among an environment temperature, a grayscale value, and a measurement temperature.
- 15 . The infrared temperature measurement device of claim 14 , wherein determining the facial area of the target in the grayscale image comprises: determining first facial area coordinates of the target in the visible light image, the first facial area coordinates are used for indicating a facial area of the target in the visible light image; determining corresponding second facial area coordinates from a second mapping relationship based on the first facial area coordinates, the second mapping relationship is used for indicating a corresponding relationship between coordinates of a pixel point in the grayscale image and coordinates of a pixel point in the visible light image; determining the facial area of the target in the grayscale image based on the second facial area coordinates; or there is a plurality of pixel points in the facial area, determining the first measurement temperature based on the environment temperature, the grayscale values of the pixel points in the facial area, and the specified functional relationship, comprises: determining a measurement temperature corresponding to each pixel point based on the environment temperature, a grayscale value of each pixel point of the plurality of pixel points, and the specified functional relationship to obtain a second measurement temperature of each pixel point; determining the first measurement temperature based on the second measurement temperature of each pixel point of the plurality of pixel points.
Description
CROSS REFERENCE TO RELATED APPLICATIONS The present application is a national phase application under 35 U.S.C. § 371 of International Application No. PCT/CN2021/079011, filed Mar. 4, 2021, which claims the benefit of priority to Chinese Patent Application No. 202010153100.3 filed with the China National Intellectual Property Administration on Mar. 6, 2020 and entitled “INFRARED TEMPERATURE MEASUREMENT METHOD, APPARATUS, AND DEVICE, AND STORAGE MEDIUM”, each of which are incorporated herein by reference in their entirety. TECHNICAL FIELD Embodiments of the present application relate to the field of image processing, and in particular, to an infrared temperature measurement method, apparatus, device, and storage medium. BACKGROUND When measuring temperature, one generally needs to use a thermometer. Traditional mercury thermometers need a certain time to measure temperature and are inefficient in measuring temperature. Therefore, infrared temperature measurement devices based on infrared light have emerged in the market, which measure temperature relatively quickly and can be used at various passages and ports. However, as the distance between a target and an infrared temperature measurement device will affect the temperature measured by the infrared temperature measurement device, when the distance between the target and the infrared temperature measurement device changes, the temperature measured by the infrared temperature measurement device will change too. Moreover, the temperature measured at a different distance may be different. Therefore, the temperature of the target cannot be accurately determined. In the relevant art, in an infrared temperature measurement device, a capacitive distance sensor used for determining the distance between a target and the infrared temperature measurement device can be integrated, so as to enable obtaining a more accurate temperature when the target is at an appropriate distance. However, this method needs to constantly adjust the distance between the infrared temperature measurement device and the target. If the distance does not meet requirements, the temperature obtained may be inaccurate, thus affecting temperature measuring precision and temperature measuring efficiency. SUMMARY Embodiments of the present application provide an infrared temperature measurement method, apparatus, device, and storage medium, which can solve the problem in the relevant art that temperature cannot be measured when the distance does not meet requirements and thus temperature measuring precision and temperature measuring efficiency are affected. The technical solutions are as follows: In one aspect, an infrared temperature measurement method is provided, the method includes: determining a measurement temperature of a to-be-measured target based on a grayscale image captured to obtain a first measurement temperature;determining key point coordinates of the target based on a target image;determining a first distance based on the key point coordinates and configuration information of an infrared temperature measurement device, wherein the first distance is a distance between the target and the infrared temperature measurement device;determining an actual temperature of the target based on the first measurement temperature and the first distance. In a possible mode of realization of embodiments of the present application, the target image includes the grayscale image; or,the target image includes a visible light image; or,the target image includes a fusion image determined based on the grayscale image and the visible light image. In a possible mode of realization of embodiments of the present application, the key point coordinates of the target include coordinates of a first key point and coordinates of a second key point, wherein the first key point and the second key point are any two key points whose actual distance is known among key points of the target, the configuration information includes a focal distance and a pixel size; determining the first distance based on the key point coordinates and configuration information of the infrared temperature measurement device, includes:determining a horizontal distance between the first key point and the second key point in the target image, and determining a vertical distance between the first key point and the second key point in the target image, based on the coordinates of the first key point and the coordinate of the second key point to obtain a first horizontal distance and a first vertical distance;determining a second distance based on the first horizontal distance, the first vertical distance, and the pixel size, wherein the second distance is a distance between the first key point and the second key point in the target image;determining the first distance based on a first actual distance, the focal distance, and the second distance, wherein the first actual distance is an actual distance between the first key point and the second key