WO2021259365A1 - 一种目标测温方法、装置及测温系统 - Google Patents

一种目标测温方法、装置及测温系统 Download PDF

Info

Publication number
WO2021259365A1
WO2021259365A1 PCT/CN2021/102141 CN2021102141W WO2021259365A1 WO 2021259365 A1 WO2021259365 A1 WO 2021259365A1 CN 2021102141 W CN2021102141 W CN 2021102141W WO 2021259365 A1 WO2021259365 A1 WO 2021259365A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
image
thermal imaging
visible light
target area
Prior art date
Application number
PCT/CN2021/102141
Other languages
English (en)
French (fr)
Inventor
张俊力
唐政
高其涛
Original Assignee
杭州海康威视数字技术股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 杭州海康威视数字技术股份有限公司 filed Critical 杭州海康威视数字技术股份有限公司
Publication of WO2021259365A1 publication Critical patent/WO2021259365A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J5/00Radiation pyrometry, e.g. infrared or optical thermometry
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S5/00Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations
    • G01S5/16Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations using electromagnetic waves other than radio waves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J5/00Radiation pyrometry, e.g. infrared or optical thermometry
    • G01J2005/0077Imaging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20228Disparity calculation for image-based rendering

Definitions

  • This application relates to the field of security technology, in particular to a target temperature measurement method, device and temperature measurement system.
  • thermal imaging camera is used to capture images of targets that enter the monitoring range.
  • the target to be measured is determined, and the target to be measured is The imaging size in the imaging image and the conversion relationship between the thermal imaging target distance and the imaging size are used to calculate the target temperature.
  • the target distance is an important parameter for calculating the target temperature, which directly affects the temperature measurement accuracy.
  • the imaging size of the target is easily affected by the actual environment of the monitoring scene and other factors, resulting in the estimated target distance and the actual target distance. The error of the temperature measurement caused by this is relatively large.
  • the current temperature measurement method uses binocular cameras to measure the temperature of the target.
  • the binocular cameras include visible light cameras and thermal imaging cameras.
  • the visible light cameras and thermal imaging cameras respectively collect images of targets entering the monitoring range.
  • the target distance is converted, and the target in the visible light image is mapped to
  • the gray value of the area where the target is located in the thermal imaging image is obtained, and the target temperature is calculated according to the target distance and the gray value of the area where the target is located.
  • the target size of the target in the visible light image is greatly affected by the changes in the actual posture characteristics of the target, and the preset correspondence between the target size and the target distance is difficult to achieve.
  • the purpose of the embodiments of the present application is to provide a target temperature measurement method, device, and temperature measurement system, so as to improve the accuracy of target temperature measurement.
  • the specific technical solutions are as follows:
  • an embodiment of the present application provides a target temperature measurement method, which includes:
  • Obtaining visible light images and thermal imaging images collected by a binocular camera where the binocular camera includes a visible light camera for collecting visible light images and a thermal imaging camera for collecting thermal imaging images;
  • the target parallax use the preset binocular parallax ranging method to calculate the target distance of the specified target;
  • the temperature of the specified target is calculated.
  • an embodiment of the present application provides a target temperature measurement device, which includes:
  • An acquisition module for acquiring visible light images and thermal imaging images collected by a binocular camera, where the binocular camera includes a visible light camera for collecting visible light images and a thermal imaging camera for collecting thermal imaging images;
  • the target area determination module is used to determine the first target area of the specified target in the visible light image and the second target area of the specified target in the thermal imaging image;
  • the parallax calculation module is used to calculate the target parallax of the specified target by using a preset position difference calculation method according to the position of the first target area in the visible light image and the position of the second target area in the thermal imaging image;
  • the distance calculation module is used to calculate the target distance of the specified target by using the preset binocular disparity ranging method according to the target disparity;
  • the temperature calculation module is used to calculate the temperature of the specified target according to the target distance and the gray value in the second target area.
  • an embodiment of the present application provides an electronic device including a processor and a memory, where the memory stores machine executable instructions that can be executed by the processor, and the machine executable instructions are loaded and executed by the processor to achieve The method provided in the first aspect of the embodiments of the present application.
  • an embodiment of the present application provides a machine-readable storage medium, and the machine-readable storage medium stores machine-executable instructions.
  • the machine-executable instructions When the machine-executable instructions are loaded and executed by a processor, they implement the first On the one hand the method provided.
  • an embodiment of the present application provides a temperature measurement system, the temperature measurement system includes a binocular camera and a processor; the binocular camera includes a visible light camera and a thermal imaging camera;
  • Visible light camera used to collect visible light images
  • Thermal imaging camera used to collect thermal imaging images
  • the processor is used to obtain the visible light image and the thermal imaging image collected by the binocular camera; determine the first target area of the specified target in the visible light image and the second target area of the specified target in the thermal imaging image; according to the first target area Use the preset position difference calculation method to calculate the target parallax of the specified target; according to the target parallax, use the preset binocular parallax ranging method to calculate the target distance of the specified target; according to the target The distance and the gray value in the second target area are used to calculate the temperature of the specified target.
  • the target temperature measurement method, device and temperature measurement system determine the first target area in the visible light image of the specified target and the thermal imaging image of the specified target by acquiring visible light images and thermal imaging images collected by a binocular camera
  • the second target area in the imaging image according to the position of the first target area in the visible light image and the position of the second target area in the thermal imaging image, use the preset position difference calculation method to calculate the target parallax of the specified target, according to Target parallax, using the preset binocular parallax ranging method to calculate the target distance of the specified target, and calculate the temperature of the specified target according to the target distance and the gray value in the second target area.
  • the specified target After obtaining the visible light image and the thermal imaging image, determine the first target area of the specified target in the visible light image and the second target area of the specified target in the thermal imaging image. Regardless of the posture feature of the specified target, the specified target is in the visible light
  • the target area in the image and the thermal imaging image are the same or similar in size. According to the position of the first target area in the visible light image and the position of the second target area in the thermal imaging image, the calculated target parallax of the specified target characterizes the first target area.
  • the position difference between a target area and a second target area, and the target parallax is actually determined by the target distance between the specified target and the binocular camera, so the binocular parallax measurement method can be used to calculate the target distance of the specified target , And because the target distance does not need to be based on the target size when using the binocular parallax measurement method, the target distance will not be affected by changes in attitude characteristics. Therefore, the calculated target distance is guaranteed to be closer to the actual target distance.
  • the distance and the gray value in the second target area, the calculated temperature of the specified target is more accurate, and the accuracy of the target temperature measurement is improved.
  • FIG. 1 is a schematic flowchart of a target temperature measurement method provided by an embodiment of this application
  • FIG. 2 is an image example of a visible light image and a thermal imaging image provided by an embodiment of the application
  • FIG. 3 is a schematic diagram of another flow chart of a target temperature measurement method provided by an embodiment of the application.
  • Figure 4 is a schematic diagram of a temperature alternate calibration board provided by an embodiment of the application.
  • FIG. 5 is a schematic diagram of a structure of a target temperature measuring device provided by an embodiment of the application.
  • FIG. 6 is a schematic diagram of another structure of a target temperature measuring device provided by an embodiment of the application.
  • FIG. 7 is an example of matching a target frame on a visible light image with a thermal imaging image according to an embodiment of the application
  • FIG. 8 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
  • Fig. 9 is a schematic structural diagram of a temperature measurement system according to an embodiment of the application.
  • the target temperature measurement method provided by the embodiment of the present application is first introduced.
  • This method is applied to electronic devices with image processing capabilities.
  • it can be a computer remotely connected to a binocular camera, or a binocular camera equipped with a processor (the specific target temperature measurement method is determined by the processing in the binocular camera). ⁇ Execute) and so on.
  • the target temperature measurement method provided in the embodiment of the present application can be implemented by at least one of software, hardware circuit, and logic circuit provided in an electronic device.
  • a process of the target temperature measurement method provided by the embodiment of the present application may include the following steps.
  • S102 Determine a first target area of the specified target in the visible light image and a second target area of the specified target in the thermal imaging image.
  • S104 Calculate the target distance of the designated target by using a preset binocular disparity ranging method according to the target disparity.
  • S105 Calculate the temperature of the designated target according to the target distance and the gray value in the second target area.
  • the first target area of the specified target in the visible light image and the second target area of the specified target in the thermal imaging image are determined, regardless of the posture of the specified target Feature, the size of the target area of the specified target in the visible light image and the thermal imaging image is the same or similar.
  • the specified target is calculated according to the position of the first target area in the visible light image and the position of the second target area in the thermal image
  • the target disparity represents the position difference between the first target area and the second target area, and the target disparity is actually determined by the target distance between the specified target and the binocular camera, so the binocular disparity measurement method can be used to calculate
  • the target distance of the specified target is calculated, and because the target distance does not need to be based on the target size when using the binocular parallax measurement method, the target distance will not be affected by the change of attitude characteristics. Therefore, the calculated target distance is guaranteed to be closer to the actual target distance.
  • the calculated temperature of the specified target is more accurate, which improves the accuracy of target temperature measurement.
  • a binocular camera is used to measure the temperature of a target, and the binocular camera includes a visible light camera and a thermal imaging camera.
  • the visible light camera is the most common type of camera in daily life, and the images collected are color images.
  • the color images collected by the visible light camera are referred to as visible light images.
  • Thermal imaging camera is a kind of camera that uses thermal imaging technology. Its working principle is: human body and other natural targets will have infrared radiation, which is the result of the thermal movement of molecules inside the object, and its radiation energy is proportional to the fourth power of its own temperature. The wavelength of radiation is inversely proportional to its temperature.
  • Thermal imaging technology is based on the level of radiation energy of the detected object, which is transformed into a thermal image of the target object through system processing, displayed in gray value or pseudo-color, and detected at different distances
  • the target radiation intensity is different, and the gray value displayed is also different.
  • the temperature of the target can be calculated by the level of the target gray value at different distances.
  • the grayscale image/pseudo-color image collected by the thermal imaging camera is referred to as the thermal imaging image.
  • the camera in the camera is affected by the characteristics of the optical lens, so that the imaging often has radial distortion. Therefore, it is generally necessary to calibrate the camera to obtain the calibration parameters of the camera, and perform image correction on the collected image based on the calibration parameters.
  • Camera calibration is divided into two types: monocular camera calibration and binocular camera calibration: monocular camera calibration mainly calculates the camera's internal parameters (including camera focal length, imaging origin coordinates, and 5 distortion parameters that constitute the distortion vector) and external parameters (calibration objects) In addition to obtaining the internal and external parameters of each camera (that is, the aforementioned internal parameters and the aforementioned external parameters), the binocular camera calibration also needs to measure the relative positional relationship between the two cameras (that is, the relative position of one camera).
  • Rotation matrix and translation vector for another camera Since the embodiment of the present application uses a binocular camera, in addition to calculating the internal and external parameters of the visible light camera and the thermal imaging camera during calibration, it is also necessary to measure the relative position relationship between the visible light camera and the thermal imaging camera.
  • the visible light image and thermal imaging image acquired by the electronic device may be images that have undergone image correction, or may be the original visible light image and thermal imaging image collected by the visible light camera and the thermal imaging camera.
  • the electronic device can also record the image transformation relationship. After obtaining the visible light image and the thermal imaging image, use the recorded image transformation relationship to transform the visible light image and the thermal imaging image to eliminate distortion. The process of transforming the imaging image is the image correction.
  • the electronic device can use the target detection method based on deep learning technology, the target recognition method based on deep learning, the traditional feature matching method, etc., to determine the first designated target from the visible light image.
  • the target area, the second target area of the designated target is determined from the thermal imaging image.
  • the designated target refers to a specific target, such as people, animals, objects, etc.
  • a method of combining target detection technology with target matching technology can be used to perform the first target area of the specified target in the visible light image and the second target area of the specified target in the thermal imaging image.
  • Confirm that is, determine the area where the specified target is located in the visible light image as the first target area, and determine the area where the specified target is located in the thermal imaging image as the second target area.
  • the target detection is performed on at least one of the visible light image and the thermal imaging image. If only one of the images is selected for target detection, the target matching area of the other image (according to the specified detection The target area of the target area where the target is located is determined) to match the target area of the specified target; if target detection is performed on both images, the target detected in the two images can be matched.
  • S102 may be specifically implemented through the following steps:
  • the first step is to perform target detection on the visible light image, and determine the first target area of the specified target in the visible light image.
  • the second step is to determine the target matching area in the thermal imaging image according to the position of the first target area.
  • the third step is to perform target matching in the target matching area based on the first target area to obtain the second target area of the specified target in the thermal imaging image.
  • the visible light image is a color image, it has richer color information than the visible light image. Therefore, the target feature can be accurately obtained from the visible light image. Therefore, the target detection method based on deep learning technology or the traditional feature matching method, etc. , The designated target can be detected from the visible light image, and the first target area of the designated target in the visible light image can be obtained.
  • the visible light camera and the thermal imaging camera are arranged together to collect images in the same monitoring range. Therefore, there is a certain correspondence between the visible light image and the thermal imaging image. According to this correspondence, according to the position of the first target area, It is possible to roughly determine the area range of the specified target in the thermal imaging image (that is, the target matching area in the thermal imaging image), and because the thermal imaging image is a grayscale image or a pseudo-color image, there is no obvious target feature, and in the actual scene There are often situations where multiple targets appear at the same time, and the contour of the target can be judged according to the grayscale change, but the contour of the first target area and the designated target are generally consistent.
  • the first target area can be used to match in the target matching area through one or more of the gray value change of the target contour boundary, the target size, and the position. If a certain target in the target matching area If the target area matches the first target area, it can be determined that the target area is the second target area of the specified target in the thermal imaging image.
  • S102 may be specifically implemented through the following steps:
  • the first step is to perform target detection on the visible light image, determine the first target area of the specified target in the visible light image, perform target detection on the thermal imaging image, and determine the area to be matched for each target in the thermal imaging image.
  • the second step is to perform target matching on the first target area and each to-be-matched area, and determine the to-be-matched area that matches the first target area as the second target area of the specified target in the thermal imaging image.
  • the designated target can be detected from the visible light image, and the first target area of the designated target in the visible light image can be obtained.
  • the target segmentation method based on deep learning technology can be used to determine the regions to be matched for each target in the thermal imaging image. Since the thermal imaging image is a grayscale image or a pseudo-color image, it lacks richness compared to visible light images. There is no obvious target feature, and there are often multiple targets appearing at the same time in the actual scene. When performing target detection on thermal imaging images, only the approximate outline of the target can be judged based on the grayscale change (that is, each The target area to be matched).
  • the first target area After obtaining the first target area and each to-be-matched area, the first target area can be matched with each to-be-matched area respectively.
  • the method of target matching can be based on information training such as the gray value change of the target contour boundary and the target size.
  • the obtained neural network model is matched, and finally the area to be matched that matches the first target area is determined as the second target area of the specified target in the thermal imaging image.
  • the two After determining the first target area and the second target area, due to the target distance between the designated target and the binocular camera, when the first target area and the second target area are placed in the same coordinate system, the two There is often a certain gap between the positions between the two. This position difference is called target parallax. Therefore, in order to calculate the target distance, the position of the first target area in the visible light image and the position of the second target area in the thermal imaging image can be used to calculate the target distance. Use the preset position difference calculation method to calculate the target parallax of the specified target.
  • the preset position difference calculation method may be based on the position of the first target area in the visible light image and the position of the second target area in the thermal imaging image, mapping the first target area and the second target area to the same coordinate system Next, calculate the difference between the coordinates of the two target areas representing the same point in this coordinate system. Since the visible light camera and the thermal imaging camera collect images from the same monitoring range, the size of the collected images is the same. Due to the different viewing angles, the two images have overlapping parts. Therefore, the visible light image and the thermal imaging image can also be overlapped.
  • the target parallax of the specified target can be obtained, as shown in Figure 2.
  • the target distance of the specified target can be calculated.
  • the relationship between the target parallax and the target distance can be defined.
  • the relationship between the target parallax and the target distance is inversely proportional, that is, the closer the target is to the binocular camera, the greater the target parallax. big.
  • the target distance is also related to the lens focal length of the binocular camera, the baseline distance between the visible light camera and the thermal imaging camera, etc.
  • the binocular parallax ranging method can specifically be the binocular parallax ranging formula That is, the binocular disparity ranging method can be implemented based on the binocular disparity ranging formula, where the binocular disparity ranging formula can be specifically as shown in formula (1).
  • D is the target distance
  • f is the lens focal length of the binocular camera
  • B is the baseline distance between the visible light camera and the thermal imaging camera
  • XL is the target parallax.
  • the baseline distance can refer to the optical axis of the visible light camera and the thermal imaging camera. The vertical distance between the optical axes.
  • the binocular temperature measurement technology using visible light image fusion thermal imaging image is different from the way that the visible light monocular camera estimates the target distance through the correspondence between the target imaging size and the target distance.
  • the target distance is calculated by the target parallax. Distance, the target distance will not be affected by the change of the posture feature, therefore, the calculated target distance is more accurate, and since the target distance is not affected by the change of the posture feature, the scene adaptability of the embodiment of the present application is better, and the temperature measurement result It is also more accurate and stable, and the target temperature measurement method is more robust.
  • there is no need to record the corresponding relationship between the target imaging size and the target distance which saves the storage space of the electronic device, and can realize the ranging and temperature measurement of various types of targets.
  • the traditional method of calculating the target temperature can be used to calculate the temperature of the specified target according to the target distance and the gray value in the second target area.
  • the calculation of the target temperature can adopt the formula shown in formula (2):
  • T is the target temperature
  • a, b, and c are the preset specific gravities, which can be obtained from the blackbody temperature measurement experiment simulation
  • T1 is the temperature value calculated based on the gray value in the second target area
  • T1 f(K)
  • K is the gray value in the second target area
  • f( ⁇ ) is a function used to represent the mapping relationship between gray value and temperature value
  • T2 is the ambient temperature value, which can be directly obtained
  • S105 can be specifically implemented through the following steps:
  • the first step is to determine the temperature measurement points of interest in the second target area according to the target type of the specified target.
  • the second step is to read the gray value of the temperature measurement point of interest from the thermal imaging image.
  • the third step is to calculate the temperature of the specified target according to the target distance and the gray value of the temperature measurement point of interest.
  • the temperature measurement points of interest When measuring the temperature of a target, due to the different target types, the temperature measurement points of interest will be different. For example, when measuring the temperature of a person, pay more attention to the temperature of the forehead, and when measuring the temperature of an object, pay more attention to the object.
  • the temperature at the bottom therefore, the target type of the specified target (which can be obtained during target detection or pre-input) can be used to determine the temperature measurement point of interest in the second target area, then the second target area
  • the gray value inside specifically refers to the gray value of the temperature measurement point of interest. When calculating the temperature, it is specifically calculated based on the target distance and the gray value of the temperature measurement point of interest.
  • the method may further include: superimposing the temperature on the visible light image for display.
  • the visible light image is a color image with more complete target characteristics. Compared with the grayscale image or pseudo-color image of the thermal imaging image, it is convenient for users to view. Therefore, the real-time visible light image collected by the visible light camera is generally displayed. , So that the user can view the real-time monitoring content. After the temperature of the specified target is measured, the temperature can be superimposed on the visible light image. In this way, the user can see the temperature of the specified target in real time and know which targets are abnormal in time. Yes, the way of displaying the temperature in the visible light image can be: displaying the temperature around the designated target, or separately opening up a temperature display area, which displays the target attributes and temperature of the designated target.
  • another process of the target temperature measurement method provided by the embodiment of the present application, as shown in FIG. 3, may include the following steps.
  • S301 Acquire visible light images and thermal imaging images collected by a binocular camera, where the binocular camera includes a visible light camera for collecting visible light images and a thermal imaging camera for collecting thermal imaging images.
  • S302 Perform image correction on the visible light image and the thermal imaging image according to the calibration parameters of the pre-calibrated binocular camera.
  • S303 Determine a first target area of the specified target in the corrected visible light image and a second target area of the specified target in the corrected thermal imaging image.
  • S305 Calculate the target distance of the designated target by using a preset binocular disparity ranging method according to the target disparity.
  • S306 Calculate the temperature of the designated target according to the target distance and the gray value in the second target area.
  • the visible light image and the thermal imaging image acquired by the electronic device are the original visible light image and the thermal imaging image, that is, the visible light image and the thermal imaging image that have not undergone image correction.
  • Image and thermal imaging image for image correction refers to: according to the calibration parameters obtained after the binocular camera calibration, the visible light image and the thermal imaging image are respectively distorted and aligned, so that the imaging origin coordinates of the visible light image and the thermal imaging image are consistent, and the optical axis of the two cameras Parallel, the imaging planes of the two cameras are coplanar (that is, by making the optical axes of the two cameras parallel to ensure that the imaging planes of the two cameras are coplanar), the epipolar lines are aligned. In this way, any point on an image and its corresponding point on another image must have the same line number, and the corresponding point can be matched by a one-dimensional search on this line.
  • the calibration parameters include the internal and external parameters of the visible light camera, the internal and external parameters of the thermal imaging camera, and the relative position relationship between the visible light camera and the thermal imaging camera.
  • S302 may specifically: perform image correction on the visible light image according to the internal and external parameters of the visible light camera to obtain a visible light correction image; perform image correction on the thermal imaging image according to the internal and external parameters of the thermal imaging camera to obtain a thermal imaging correction image; The relative position relationship, the visible light correction image and the thermal imaging correction image are corrected to the same polar plane.
  • the corrected visible light image and the thermal imaging image are on the same polar plane, that is, the number of image lines corresponding to the polar plane of the target is the same.
  • the calibration method of the binocular camera may specifically be: using a pre-adjusted temperature alternate calibration board, and adopting the Zhang Zhengyou calibration method to calibrate the binocular camera, wherein the temperature alternate calibration
  • the board includes a black block and a white bottom plate (in other possible embodiments, it can also be a white block and a black bottom plate).
  • the temperature alternate calibration board is: the temperature difference between the black block and the white bottom plate is adjusted by the temperature controller to make thermal imaging The camera collects the image of the alternate temperature calibration board after meeting the preset astrolabe effect.
  • the calibration of the binocular camera mainly adopts the Zhang Zhengyou calibration method. Since the thermal imaging image cannot distinguish the image color, the calibration of the thermal imaging camera cannot be achieved by using the traditional black and white astrolabe calibration plate. Therefore, in the embodiment of this application, In, the original black and white astrolabe calibration board is improved, and the temperature information is combined with black and white.
  • the darker color (larger grayscale, that is, the grayscale greater than the preset upper grayscale threshold) is the target of temperature
  • the lower target the lighter color (the gray scale is smaller, that is, the gray scale is less than the preset lower gray threshold) is the target with higher temperature, so the temperature alternate calibration board as shown in Figure 4 is designed, the upper gray The degree threshold is greater than or equal to the lower gray threshold.
  • the temperature controller is used to adjust the temperature difference between the black block and the white bottom plate in the alternate temperature calibration board.
  • the black block is made of temperature insulating material, and is isolated from the white bottom plate by using temperature insulating material.
  • the temperature difference between the black block and the white bottom plate is adjusted at a certain distance in advance through the temperature controller, so that the thermal imaging camera collects the image of the alternate temperature calibration board to meet the preset astrolabe effect.
  • the preset astrolabe effect is a visible astrolabe imaging effect with alternating bright and dark and clear outlines.
  • the first target area and the second target area are determined, the target parallax of the specified target is calculated, the target distance of the specified target is calculated, and the temperature of the specified target is calculated.
  • the specific execution of these steps can be carried out in the above-mentioned embodiment. , I won’t repeat it here.
  • the automatic calibration of the binocular camera can be quickly completed by using the temperature alternate calibration board, which saves the calibration time.
  • an embodiment of the present application provides a target temperature measurement device.
  • the device may include:
  • the acquiring module 510 is configured to acquire visible light images and thermal imaging images collected by a binocular camera, where the binocular camera includes a visible light camera for collecting visible light images and a thermal imaging camera for collecting thermal imaging images;
  • the target area determining module 520 is configured to determine the first target area of the specified target in the visible light image and the second target area of the specified target in the thermal imaging image;
  • the disparity calculation module 530 is configured to calculate the target disparity of the specified target according to the position of the first target area in the visible light image and the position of the second target area in the thermal imaging image, using a preset position difference calculation method;
  • the distance calculation module 540 is configured to calculate the target distance of the designated target by using a preset binocular disparity ranging method according to the target disparity;
  • the temperature calculation module 550 is used to calculate the temperature of the designated target according to the target distance and the gray value in the second target area.
  • the device may further include: an image correction module, configured to perform image correction on the visible light image and the thermal imaging image according to the calibration parameters of the pre-calibrated binocular camera;
  • the target area determining module 520 may be specifically used to determine the first target area of the specified target in the corrected visible light image and the second target area of the specified target in the corrected thermal imaging image.
  • the calibration parameters include the internal and external parameters of the visible light camera, the internal and external parameters of the thermal imaging camera, and the relative positional relationship between the visible light camera and the thermal imaging camera;
  • the image correction module can be specifically used to perform image correction on the visible light image according to the internal and external parameters of the visible light camera to obtain a visible light correction image; according to the internal and external parameters of the thermal imaging camera, perform image correction on the thermal imaging image to obtain the thermal imaging correction image; The relative position relationship, the visible light correction image and the thermal imaging correction image are corrected to the same polar plane.
  • the device may further include: a calibration module for using a pre-adjusted temperature alternate calibration board to calibrate the binocular camera using the Zhang Zhengyou calibration method, wherein the temperature alternate calibration board includes black blocks and The white bottom plate and the temperature alternate calibration plate are: the temperature difference between the black block and the white bottom plate is adjusted by the temperature controller, so that the image of the temperature alternate calibration plate collected by the thermal imaging camera meets the preset astrolabe effect.
  • the target area determination module 520 may be specifically used to perform target detection on the visible light image, and determine the first target area of the specified target in the visible light image; according to the position of the first target area, determine the thermal imaging image Target matching area of the target; based on the first target area, perform target matching in the target matching area to obtain the second target area of the specified target in the thermal imaging image.
  • the target area determination module 520 may be specifically used to perform target detection on the visible light image, determine the first target area of the specified target in the visible light image; perform target detection on the thermal imaging image, and determine the thermal imaging image To-be-matched regions of each target; perform target matching on the first target region and each to-be-matched region, and determine the to-be-matched region matching the first target region as the second target region of the specified target in the thermal imaging image.
  • the temperature calculation module 550 can be specifically used to determine the temperature measurement point of interest in the second target area according to the target type of the specified target; from the thermal imaging image, read the temperature measurement point of interest Gray value: Calculate the temperature of the specified target according to the target distance and the gray value of the temperature measurement point of interest.
  • the device may further include: a display module for superimposing the temperature on the visible light image for display.
  • the first target area of the specified target in the visible light image and the second target area of the specified target in the thermal imaging image are determined, regardless of the posture of the specified target Feature, the size of the target area of the specified target in the visible light image and the thermal imaging image is the same or similar.
  • the specified target is calculated according to the position of the first target area in the visible light image and the position of the second target area in the thermal image
  • the target disparity represents the position difference between the first target area and the second target area, and the target disparity is actually determined by the target distance between the specified target and the binocular camera, so the binocular disparity measurement method can be used to calculate
  • the target distance of the specified target is calculated, and because the target distance does not need to be based on the target size when using the binocular parallax measurement method, the target distance will not be affected by the change of attitude characteristics. Therefore, the calculated target distance is guaranteed to be closer to the actual target distance.
  • the calculated temperature of the specified target is more accurate, which improves the accuracy of target temperature measurement.
  • the target temperature measurement method in the embodiment of the present application is applied to epidemic prevention and control, abnormal body temperature target detection, and capture scenes.
  • epidemic prevention and control period there are a large number of people flowing in subways, hotels, shopping malls, stations and other scenes. It is necessary to monitor the body temperature of the people entering and leaving. When an abnormal temperature is found, the target image is captured and the alarm is issued to prohibit the abnormal target from entering the place.
  • a binocular camera including a visible light camera and a thermal imaging camera is set up at the entrance of a subway security checkpoint, a hotel or a shopping mall, and an electronic device with a display screen is set up at the monitoring personnel.
  • the electronic device includes a processor, which mainly includes the following 7 modules (as shown in Figure 6): binocular camera calibration module 601, image correction module 602, target detection module 603, target matching module 604, target ranging module 605 , The target temperature measurement location selection module 606 and the target temperature measurement module 607.
  • the binocular camera calibration module 601 is used to calibrate the binocular camera. Specifically, the binocular camera can be calibrated in the manner in the embodiment shown in FIG. 2, which will not be repeated here.
  • the image correction module 602 is used to perform image correction on the acquired visible light image and thermal imaging image.
  • the calibration parameters of the binocular camera calibration module 601 after calibration of the binocular camera are stored in the image correction module 602.
  • the image correction module 602 can perform image correction on the visible light image and the thermal imaging image according to the internal and external parameters of the visible light camera and the thermal imaging camera.
  • the visible light image and the thermal imaging image are corrected to the same polar plane, that is, the number of image lines corresponding to the polar plane of the target is the same, as shown in FIG. 7.
  • the target detection module 603 is used to detect the person who needs temperature measurement on the visible light image. Specifically, a variety of algorithms such as deep learning detection network can be used to obtain the person's target frame (tx, ty, w, h), where tx, ty Is the coordinates of the upper left corner of the target box, w and h are the width and height of the target box, as shown in Figure 7.
  • the target matching module 604 is used to perform target matching on the thermal imaging image. Using visible light tx and ty coordinates as the starting point, find the same polar plane of the target on the thermal imaging image, and select a rectangular area of W*h on the thermal imaging image, where W identifies the width of the original image, and h identifies the target frame High; the target frame in the visible light image and the rectangular area in the thermal imaging image are matched with the target contour boundary gray value change and other information. After the target matching is completed, the target frame (Rx, Ry, Rw, Rh).
  • the target ranging module 605 is used to calculate the target distance based on the parallax between the target frame on the visible light image and the target frame on the thermal imaging image. Specifically, the visible light image and the thermal imaging image are stacked together to calculate the relative position difference XL of the target , The position difference is the target disparity. After the target disparity XL is calculated, the binocular disparity ranging formula (formula (1)) is used to calculate the target distance.
  • the target temperature measurement location selection module 606 is used to find the temperature measurement point of interest from the target frame (Rx, Ry, Rw, Rh) on the thermal imaging image. For personnel, assume that the temperature measurement point of interest is the point with the lowest gray value in the target frame (Rx, Ry, Rw, Rh), and read the gray value of the temperature measurement point of interest.
  • the target temperature measurement module 607 is configured to calculate the target temperature according to the target distance and the gray value of the temperature measurement point of interest.
  • the capture mechanism When an abnormal temperature of a human target is detected, the capture mechanism is triggered to capture the human target with an abnormal temperature and the temperature of the human target is displayed in the visible light image displayed on the display screen, and an alarm is issued.
  • An embodiment of the present application also provides an electronic device, as shown in FIG. 8, including a processor 801 and a memory 802, where the memory 802 stores machine executable instructions that can be executed by the processor 801, and the machine executable instructions are processed by the processor 801.
  • the device 801 is loaded and executed to implement the target temperature measurement method provided in the embodiment of the present application.
  • the foregoing memory may include RAM (Random Access Memory, random access memory), and may also include NVM (Non-volatile Memory, non-volatile memory), for example, at least one disk storage.
  • the memory may also be at least one storage device located far away from the foregoing processor.
  • the above-mentioned processor may be a general-purpose processor, including CPU, NP (Network Processor, network processor), etc.; it may also be DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit, application specific integrated circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • CPU Central Processing Unit
  • NP Network Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • Other programmable logic devices discrete gates or transistor logic devices, discrete hardware components.
  • the memory 802 and the processor 801 may perform data transmission through a wired connection or a wireless connection, and the electronic device and other devices may communicate through a wired communication interface or a wireless communication interface. What is shown in FIG. 8 is only an example of data transmission through the bus, and is not intended to limit the specific connection mode.
  • the processor reads the machine executable instructions stored in the memory, and loads and executes the machine executable instructions, so as to realize: after obtaining the visible light image and the thermal imaging image, determine that the specified target is in the visible light
  • the first target area in the image and the second target area of the specified target in the thermal imaging image, regardless of the posture feature of the specified target, the specified target in the visible light image and the thermal imaging image have the same or similar size of the target area, according to the first The position of the target area in the visible light image and the position of the second target area in the thermal imaging image.
  • the calculated target parallax of the specified target represents the position difference between the first target area and the second target area, and the target The parallax is actually determined by the target distance between the designated target and the binocular camera. Therefore, the target distance of the designated target can be calculated by the binocular parallax measurement method, and the target distance does not need to be based on the target size when the binocular parallax measurement method is used to calculate the target distance , The target distance will not be affected by the change of the posture feature. Therefore, the calculated target distance is guaranteed to be closer to the actual target distance, so that the specified target is calculated according to the target distance and the gray value in the second target area The temperature is more accurate, which improves the accuracy of target temperature measurement.
  • the embodiments of the present application provide a machine-readable storage medium, and the machine-readable storage medium stores machine-executable instructions.
  • the machine-executable instructions When the machine-executable instructions are loaded and executed by a processor, the goals provided in the embodiments of the present application are achieved. Temperature measurement method.
  • the machine-readable storage medium stores machine executable instructions that execute the target temperature measurement method provided in the embodiments of the present application at runtime, so that it can be realized: after obtaining the visible light image and the thermal imaging image, determine The first target area of the specified target in the visible light image and the second target area of the specified target in the thermal imaging image are output.
  • the size of the target area in the visible light image and the thermal imaging image of the specified target is the same or Similar, according to the position of the first target area in the visible light image and the position of the second target area in the thermal imaging image, the calculated target parallax of the specified target represents the position between the first target area and the second target area
  • the target parallax is actually determined by the target distance between the designated target and the binocular camera. Therefore, the target distance of the designated target can be calculated using the binocular parallax measurement method, and the target distance is calculated by the binocular parallax measurement method It does not need to be based on the target size, and the target distance will not be affected by the change of attitude characteristics. Therefore, the calculated target distance is guaranteed to be closer to the actual target distance, so according to the target distance and the gray value in the second target area, The calculated temperature of the specified target is more accurate, which improves the accuracy of target temperature measurement.
  • a computer program product containing instructions is also provided, which when running on a computer, causes the computer to execute any of the target temperature measurement methods in the foregoing embodiments.
  • the temperature measurement system includes a binocular camera 910 and a processor 920; the binocular camera 910 includes a visible light camera 911 and a thermal imaging camera 912;
  • the visible light camera 911 is used to collect visible light images
  • Thermal imaging camera 912 used to collect thermal imaging images
  • the processor 920 is configured to acquire the visible light image and the thermal imaging image collected by the binocular camera 910; determine the first target area of the specified target in the visible light image and the second target area of the specified target in the thermal imaging image; The position of the target area and the position of the second target area are calculated using the preset position difference calculation method to calculate the target parallax of the specified target; according to the target parallax, the preset binocular parallax ranging method is used to calculate the target distance of the specified target; According to the target distance and the gray value in the second target area, the temperature of the specified target is calculated.
  • the temperature measurement system provided by the embodiment of the application may be a distributed system, that is, the binocular camera and the processor are two independently distributed devices; the temperature measurement system provided by the embodiment of the application may also be one device, that is, the binocular The camera and processor are integrated in one hardware device.
  • the processor obtains the visible light image and the thermal imaging image, it determines the first target area of the specified target in the visible light image and the second target area of the specified target in the thermal imaging image, regardless of the specified target
  • a posture feature that specifies that the size of the target area in the visible light image and the thermal imaging image of the target is the same or similar, calculated according to the position of the first target area in the visible light image and the position of the second target area in the thermal imaging image
  • the target disparity of the specified target represents the position difference between the first target area and the second target area, and the target disparity is actually determined by the target distance between the specified target and the binocular camera, so the binocular disparity measurement method is used
  • the target distance of the specified target can be calculated.
  • the target distance will not be affected by the change of the attitude characteristics. Therefore, the calculated target distance is guaranteed to be closer to the actual target distance, so that it is based on the target distance and the gray in the second target area. Degree value, the calculated temperature of the specified target is more accurate, which improves the accuracy of target temperature measurement.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD (Digital Versatile Disc)), or a semiconductor medium (such as an SSD (Solid State Disk)), etc. .

Abstract

本申请实施例提供了一种目标测温方法、装置及测温系统,通过获取双目相机采集的可见光图像和热成像图像,确定指定目标在可见光图像中的第一目标区域以及指定目标在热成像图像中的第二目标区域,根据第一目标区域在可见光图像中的位置及第二目标区域在热成像图像中的位置,利用预设的位置差计算方法,计算指定目标的目标视差,根据目标视差,利用预设的双目视差测距方法,计算指定目标的目标距离,根据目标距离及第二目标区域内的灰度值,计算指定目标的温度。目标距离并不受姿态特征变化的影响,因此,计算得到的目标距离保证与实际的目标距离更为接近,计算出的指定目标的温度更为准确,提高了目标测温的精度。

Description

一种目标测温方法、装置及测温系统
本申请要求于2020年06月24日提交中国专利局、申请号为202010590792.8发明名称为“一种目标测温方法、装置及测温系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及安防技术领域,特别是涉及一种目标测温方法、装置及测温系统。
背景技术
随着热成像技术的不断发展,利用热成像相机对目标进行测温,在公共卫生安全和异常目标布控等领域的应用越来越广泛。传统的测温方法中,采用热成像相机对进入监控范围内的目标进行图像采集,通过检测采集到的热成像图像中区域灰度值变化,确定待测温目标,根据待测温目标在热成像图像中的成像大小以及热成像目标距离和成像大小的换算关系,计算目标温度。可见,目标距离是计算目标温度的重要参数,直接影响着测温精度,然而,目标的成像大小容易受到监控场景的实际环境等因素影响,导致估计出的目标距离与实际的目标距离具有较大的误差,由此引起测温的误差较大。
为了解决上述问题,当前的测温方法中,采用双目相机对目标进行测温,双目相机包括可见光相机和热成像相机,可见光相机和热成像相机分别对进入监控范围内的目标进行图像采集,利用可见光测距技术,根据可见光相机采集到的可见光图像中的目标尺寸、以及预先设置的该目标的目标尺寸与目标距离的对应关系,换算出目标距离,将可见光图像中的该目标映射到热成像图像中对应的位置处,得到该目标在热成像图像中所处区域的灰度值,根据目标距离和该目标所处区域的灰度值,计算目标温度。
然而,在实际的应用场景下,目标在可见光图像中的目标尺寸受该目标的实际姿态特征变化的影响较大,而预先设置的该目标的目标尺寸与目标距离的对应关系很难做到完全覆盖该目标的各种姿态特征变化,当姿态特征变化时,会使得换算出的目标距离误差较大,导致测温的误差仍然较大。
发明内容
本申请实施例的目的在于提供一种目标测温方法、装置及测温系统,以提高目标测温的精度。具体技术方案如下:
第一方面,本申请实施例提供了一种目标测温方法,该方法包括:
获取双目相机采集的可见光图像和热成像图像,其中,双目相机包括用于采集可见光图像的可见光相机、以及用于采集热成像图像的热成像相机;
确定指定目标在可见光图像中的第一目标区域、以及指定目标在热成像图像中的第二目标区域;
根据第一目标区域在可见光图像中的位置及第二目标区域在热成像图像中的位置,利用预设的位置差计算方法,计算指定目标的目标视差;
根据目标视差,利用预设的双目视差测距方法,计算指定目标的目标距离;
根据目标距离及第二目标区域内的灰度值,计算指定目标的温度。
第二方面,本申请实施例提供了一种目标测温装置,该装置包括:
获取模块,用于获取双目相机采集的可见光图像和热成像图像,其中,双目相机包括用于采集可见光图像的可见光相机、以及用于采集热成像图像的热成像相机;
目标区域确定模块,用于确定指定目标在可见光图像中的第一目标区域、以及指定目标在热成像图像中的第二目标区域;
视差计算模块,用于根据第一目标区域在可见光图像中的位置及第二目标区域在热成像图像中的位置,利用预设的位置差计算方法,计算指定目标的目标视差;
距离计算模块,用于根据目标视差,利用预设的双目视差测距方法,计算指定目标的目标距离;
温度计算模块,用于根据目标距离及第二目标区域内的灰度值,计算指定目标的温度。
第三方面,本申请实施例提供了一种电子设备,包括处理器和存储器,其中,存储器存储有能够被处理器执行的机器可执行指令,机器可执行指令由处理器加载并执行,以实现本申请实施例第一方面所提供的方法。
第四方面,本申请实施例提供了一种机器可读存储介质,机器可读存储介质内存储有机器可执行指令,机器可执行指令在被处理器加载并执行时,实现本申请实施例第一方面所提供的方法。
第五方面,本申请实施例提供了一种测温系统,该测温系统包括双目相机及处理器;双目相机包括可见光相机及热成像相机;
可见光相机,用于采集可见光图像;
热成像相机,用于采集热成像图像;
处理器,用于获取双目相机采集的可见光图像和热成像图像;确定指定目标在可见光图像中的第一目标区域、以及指定目标在热成像图像中的第二目标区域;根据第一目标区 域的位置及第二目标区域的位置,利用预设的位置差计算方法,计算指定目标的目标视差;根据目标视差,利用预设的双目视差测距方法,计算指定目标的目标距离;根据目标距离及第二目标区域内的灰度值,计算指定目标的温度。
本申请实施例提供的一种目标测温方法、装置及测温系统,通过获取双目相机采集的可见光图像和热成像图像,确定指定目标在可见光图像中的第一目标区域以及指定目标在热成像图像中的第二目标区域,根据第一目标区域在可见光图像中的位置及第二目标区域在热成像图像中的位置,利用预设的位置差计算方法,计算指定目标的目标视差,根据目标视差,利用预设的双目视差测距方法,计算指定目标的目标距离,根据目标距离及第二目标区域内的灰度值,计算指定目标的温度。在获取到可见光图像和热成像图像后,确定出指定目标在可见光图像中的第一目标区域、指定目标在热成像图像中的第二目标区域,不论指定目标为何种姿态特征,指定目标在可见光图像和热成像图像中的目标区域大小相同或相近,根据第一目标区域在可见光图像中的位置及第二目标区域在热成像图像中的位置,所计算出的指定目标的目标视差表征了第一目标区域和第二目标区域之间的位置差,而该目标视差实际是由指定目标与双目相机间的目标距离所决定的,因此利用双目视差测量方法可以计算出指定目标的目标距离,并且由于利用双目视差测量方法计算目标距离时无需基于目标尺寸,目标距离并不会受到姿态特征变化的影响,因此,计算得到的目标距离保证与实际的目标距离更为接近,从而根据目标距离及第二目标区域内的灰度值,计算出的指定目标的温度更为准确,提高了目标测温的精度。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的实施例。
图1为本申请实施例提供的目标测温方法的一种流程示意图;
图2为本申请实施例提供的可见光图像与热成像图像叠在一起后的图像示例;
图3为本申请实施例提供的目标测温方法的另一种流程示意图;
图4为本申请实施例提供的温度交替标定板示意图;
图5为本申请实施例提供的目标测温装置的一种结构示意图;
图6为本申请实施例提供的目标测温装置的另一种结构示意图;
图7为本申请实施例提供的可见光图像上目标框与热成像图像匹配的示例;
图8为本申请实施例提供的电子设备的结构示意图;
图9为本申请实施例的测温系统的结构示意图。
具体实施方式
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。本领域普通技术人员基于本申请中的实施例所获得的所有其他实施例,都属于本申请保护的范围。
为了提高目标测温的精度,本申请实施例提供了一种目标测温方法、装置及测温系统。下面,首先对本申请实施例所提供的目标测温方法进行介绍。该方法应用于具有图像处理能力的电子设备,例如,可以为与双目相机远程连接的计算机,也可以为配备有处理器的双目相机(具体的目标测温方法由双目相机中的处理器执行)等。本申请实施例所提供的目标测温方法可以被设置于电子设备中的软件、硬件电路和逻辑电路中的至少一种实现。
如图1所示,本申请实施例所提供的目标测温方法的一种流程,可以包括如下步骤。
S101,获取双目相机采集的可见光图像和热成像图像,其中,双目相机包括用于采集可见光图像的可见光相机、以及用于采集热成像图像的热成像相机。
S102,确定指定目标在可见光图像中的第一目标区域、以及指定目标在热成像图像中的第二目标区域。
S103,根据第一目标区域在可见光图像中的位置及第二目标区域在热成像图像中的位置,利用预设的位置差计算方法,计算指定目标的目标视差。
S104,根据目标视差,利用预设的双目视差测距方法,计算指定目标的目标距离。
S105,根据目标距离及第二目标区域内的灰度值,计算指定目标的温度。
应用本申请实施例,在获取到可见光图像和热成像图像后,确定出指定目标在可见光图像中的第一目标区域、指定目标在热成像图像中的第二目标区域,不论指定目标为何种姿态特征,指定目标在可见光图像和热成像图像中的目标区域大小相同或相近,根据第一目标区域在可见光图像中的位置及第二目标区域在热成像图像中的位置,所计算出的指定目标的目标视差表征了第一目标区域和第二目标区域之间的位置差,而该目标视差实际是由指定目标与双目相机间的目标距离所决定的,因此利用双目视差测量方法可以计算出指定目标的目标距离,并且由于利用双目视差测量方法计算目标距离时无需基于目标尺寸,目标距离并不会受到姿态特征变化的影响,因此,计算得到的目标距离保证与实际的目标距离更为接近,从而根据目标距离及第二目标区域内的灰度值,计算出的指定目标的温度更为准确,提高了目标测温的精度。
本申请实施例中,利用双目相机进行目标测温,双目相机包括可见光相机和热成像相 机。可见光相机为日常生活中最常见的一种相机,采集到的图像为彩色图像,在本申请实施例中,将可见光相机采集到的彩色图像称为可见光图像。热成像相机为采用热成像技术的一种相机,其工作原理为:人体等自然界目标都会有红外辐射,这是物体内部分子热运动的结果,其辐射能量与自身温度的四次方成正比,辐射出的波长与其温度成反比,热成像技术就是根据探测到的物体的辐射能量的高低,经系统处理转变为目标物体的热图像,以灰度值或伪彩色显示出来,不同距离下探测到的目标辐射强度不同,展现的灰度值也不同,通过不同距离下目标灰度值的高低可以计算出目标的温度。在本申请实施例中,将热成像相机采集到的灰度图像/伪彩色图像称为热成像图像。
相机中的摄像头由于受光学透镜的特性影响,使得成像往往存在径向畸变,因此,一般需要对相机进行标定,得到相机的标定参数,基于标定参数,对采集到的图像进行图像矫正。相机标定分为单目相机标定和双目相机标定两类:单目相机标定主要是计算相机的内参(包括相机焦距、成像原点坐标、构成畸变向量的5个畸变参数)和外参(标定物的世界坐标);双目相机标定除了要得出每个相机的内外参(即前述内参和前述外参)以外,还需要通过标定来测量两个相机之间的相对位置关系(即一个相机相对于另一个相机的旋转矩阵和平移向量)。由于本申请实施例利用的是双目相机,因此,标定时除了要计算出可见光相机和热成像相机的内外参,还需要测量可见光相机和热成像相机之间的相对位置关系。
在本申请实施例中,电子设备所获取到的可见光图像和热成像图像,可以是已经进行过图像矫正的图像,也可以是可见光相机和热成像相机采集的原始的可见光图像和热成像图像。电子设备中还可以记录有图像变换关系,在获取到可见光图像和热成像图像后,利用所记录的图像变换关系,对可见光图像和热成像图像进行变换,以消除畸变,该对可见光图像和热成像图像进行变换的过程即为图像矫正。
针对获取到的可见光图像和热成像图像,电子设备可以采用基于深度学习技术的目标检测方法、基于深度学习的目标识别方法、传统的特征匹配方法等,从可见光图像中确定出指定目标的第一目标区域、从热成像图像中确定出指定目标的第二目标区域。其中,指定目标是指某一个特定的目标,例如人、动物、物品等。在本申请实施例的一种实现方式中,可以采用目标检测技术融合目标匹配技术的方式,对指定目标在可见光图像中的第一目标区域、指定目标在热成像图像中的第二目标区域进行确定,即在可见光图像中确定指定目标所处的区域作为第一目标区域,并在热成像图像中确定指定目标所处的区域作为第二目标区域。具体的,是对可见光图像和热成像图像中的至少一张图像进行目标检测,如果只选择对其中一张图像进行目标检测,则需要在另一张图像的目标匹配区域(根据检测到的指定目标所处目标区域的位置确定)内匹配出指定目标的目标区域;如果对两张图像都进行目标检测,则可以对两张图像检测到的目标进行匹配。
在本申请实施例的一种实现方式中,S102具体可以通过如下步骤实现:
第一步,对可见光图像进行目标检测,确定指定目标在可见光图像中的第一目标区域。
第二步,根据第一目标区域的位置,确定热成像图像中的目标匹配区域。
第三步,基于第一目标区域,在目标匹配区域中进行目标匹配,得到指定目标在热成像图像中的第二目标区域。
由于可见光图像是彩色图像,相对于可见光图像,具有更为丰富的颜色信息,所以从可见光图像中可以准确地获知目标特征,因此,采用基于深度学习技术的目标检测方法或者传统的特征匹配方法等,可以从可见光图像中检测出指定目标,并且得到指定目标在可见光图像中的第一目标区域。
可见光相机和热成像相机布局在一起,对相同的监控范围进行图像采集,因此,可见光图像和热成像图像之间具有一定的对应关系,按照这种对应关系,根据第一目标区域的位置,就可以大致确定出指定目标在热成像图像中的区域范围(即热成像图像中的目标匹配区域),而由于热成像图像是灰度图或者伪彩色图,没有明显的目标特征,且实际场景中往往存在多个目标同时出现的情况,可以根据灰度变化判断出目标的轮廓,但是第一目标区域与指定目标的轮廓大体上是吻合的。
因此,可以用第一目标区域,通过目标轮廓边界灰度值变化、目标尺寸大小、位置等信息中的一种或多种信息,到目标匹配区域中进行匹配,如果目标匹配区域中某一个目标的目标区域与第一目标区域匹配上,则可以确定该目标区域为指定目标在热成像图像中的第二目标区域。采用本实施例,可以解决热成像图像和可见光图像中目标相似特征较少、匹配较难的问题。
在本申请实施例的另一种实现方式中,S102具体可以通过如下步骤实现:
第一步,对可见光图像进行目标检测,确定指定目标在可见光图像中的第一目标区域,并对热成像图像进行目标检测,确定热成像图像中各个目标的待匹配区域。
第二步,将第一目标区域分别与各待匹配区域进行目标匹配,确定与第一目标区域相匹配的待匹配区域为指定目标在热成像图像中的第二目标区域。
如上述,采用基于深度学习技术的目标检测方法或者传统的特征匹配方法等,可以从可见光图像中检测出指定目标,并且得到指定目标在可见光图像中的第一目标区域。针对热成像图像,可以采用基于深度学习技术的目标分割方法等,确定出热成像图像中各个目标的待匹配区域,由于热成像图像是灰度图或者伪彩色图,相较于可见光图像缺少丰富的颜色信息,没有明显的目标特征,且实际场景中往往存在多个目标同时出现的情况,则在 对热成像图像进行目标检测时,只能够根据灰度变化判断出目标的大致轮廓(即各个目标的待匹配区域)。
在得到第一目标区域和各待匹配区域后,可以将第一目标区域分别与各待匹配区域进行目标匹配,目标匹配的方式可以采用基于目标轮廓边界灰度值变化、目标尺寸大小等信息训练得到的神经网络模型进行匹配,最终确定与第一目标区域相匹配的待匹配区域为指定目标在热成像图像中的第二目标区域。
在确定第一目标区域和第二目标区域后,由于受指定目标与双目相机间的目标距离影响,在将第一目标区域与第二目标区域放到同一坐标系下的时候,两者之间的位置往往具有一定的差距,这种位置差称为目标视差,因此,为了计算目标距离,可以根据第一目标区域在可见光图像中的位置和第二目标区域在热成像图像中的位置,利用预设的位置差计算方法,计算出指定目标的目标视差。
其中,预设的位置差计算方法可以是根据第一目标区域在可见光图像中的位置和第二目标区域在热成像图像中的位置,将第一目标区域和第二目标区域映射到同一坐标系下,在该坐标系下计算两个目标区域表征同一点的坐标之差。由于可见光相机和热成像相机是对相同的监控范围进行图像采集,所采集到的图像大小一致,由于视角不同,两个图像有重合的部分,因此,也可以将可见光图像和热成像图像的重合部分叠在一起,在叠后的图像(即将可见光图像和热成像图像的重合部分叠在一起后得到的图像)中,就可以直观地观察到第一目标区域和第二目标区域的位置差,从而基于叠后的图像,就可以获得指定目标的目标视差,如图2所示。
在得到指定目标的目标视差后,根据目标视差,利用预设的双目视差测距方法,即可计算出指定目标的目标距离。双目视差测距方法中可以限定目标视差与目标距离之间的关系,一般情况下,目标视差与目标距离之间呈反比关系,也就是说,目标离双目相机越近,则目标视差越大。目标距离除了受目标距离影响以外,还与双目相机的镜头焦距、可见光相机和热成像相机之间的基线距等参数相关,因此,双目视差测距方法具体可以为双目视差测距公式,即双目视差测距方法可以是基于双目视差测距公式实现的,其中,双目视差测距公式具体可以如公式(1)所示。
D=f*B/XL         (1)
其中,D为目标距离、f为双目相机的镜头焦距、B为可见光相机和热成像相机之间的基线距、XL为目标视差,基线距可以是指可见光相机的光轴与热成像相机的光轴之间的垂直距离。
本申请实施例中,采用可见光图像融合热成像图像的双目测温技术,与可见光单目相 机通过目标成像大小和目标距离的对应关系预估目标距离的方式不同,是通过目标视差计算出目标距离,目标距离并不会受到姿态特征变化的影响,因此,计算得到的目标距离更加精准,并且由于目标距离不受姿态特征变化的影响,本申请实施例的场景适应性更好,测温结果也更为准确、稳定,目标测温方法的鲁棒性更强。本申请实施例中也无需记载目标成像大小和目标距离的对应关系,节省了电子设备的存储空间,能够实现多种类目标的测距测温。
在计算出目标距离后,可以利用传统的计算目标温度的方式,根据目标距离及第二目标区域内的灰度值,计算指定目标的温度。其中,计算目标温度可以采用如公式(2)所示的公式:
T=a*T1+b*T2+c*T3         (2)
其中,T为目标温度;a、b、c为预设比重,可由黑体测温实验模拟获得;T1为基于第二目标区域内的灰度值计算出的温度值,T1=f(K),K为第二目标区域内的灰度值,f(·)为用于表示灰度值与温度值之间映射关系的函数;T2为环境温度值,可直接获得;T3为基于目标距离补偿的温度值,T3=g(x),x为目标距离,g(·)为用于表示目标距离与温度值之间映射关系的函数。
在本申请实施例的一种实现方式中,S105具体可以通过如下步骤实现:
第一步,根据指定目标的目标类型,确定第二目标区域内的感兴趣测温点。
第二步,从热成像图像中,读取感兴趣测温点的灰度值。
第三步,根据目标距离及感兴趣测温点的灰度值,计算指定目标的温度。
在对目标进行测温时,由于目标种类的不同,所关注的测温点也会不相同,例如对人进行测温时,更关注额头的温度,而对物体进行测温时,更关注物体底部的温度,因此,可以根据指定目标的目标类型(可以是在进行目标检测时得到的,也可以是预先输入的),确定第二目标区域内的感兴趣测温点,则第二目标区域内的灰度值具体指的就是感兴趣测温点的灰度值,则在进行温度计算时,具体是根据目标距离和感兴趣测温点的灰度值进行计算。
在本申请实施例的一种实现方式中,在S105之后,该方法还可以包括:将温度叠加到可见光图像中进行显示。
如上述,可见光图像是彩色图像,具有更完整的目标特征,相比于热成像图像的灰度图或伪彩图,便于用户查看,因此,一般是将可见光相机采集的实时的可见光图像进行显示,以便用户查看实时的监控内容,在测出指定目标的温度后,可以将该温度叠加到可见 光图像中,这样,用户可以实时地看到指定目标的温度,及时获知哪些目标的温度异常,具体的,可见光图像中显示温度的方式可以是:在指定目标的周围显示温度,或者,单独地开辟一个温度显示区域,该温度显示区域中显示指定目标的目标属性和温度。
基于图1所示实施例,本申请实施例所提供的目标测温方法的另一种流程,如图3所示,可以包括如下步骤。
S301,获取双目相机采集的可见光图像和热成像图像,其中,双目相机包括用于采集可见光图像的可见光相机、以及用于采集热成像图像的热成像相机。
S302,根据预先标定的双目相机的标定参数,对可见光图像及热成像图像进行图像矫正。
S303,确定指定目标在矫正后的可见光图像中的第一目标区域、以及指定目标在矫正后的热成像图像中的第二目标区域。
S304,根据第一目标区域在可见光图像中的位置及第二目标区域在热成像图像中的位置,利用预设的位置差计算方法,计算指定目标的目标视差。
S305,根据目标视差,利用预设的双目视差测距方法,计算指定目标的目标距离。
S306,根据目标距离及第二目标区域内的灰度值,计算指定目标的温度。
在本申请实施例的一种实现方式中,电子设备所获取到的可见光图像和热成像图像是原始的可见光图像和热成像图像,即未经过图像矫正的可见光图像和热成像图像,需要对可见光图像和热成像图像进行图像矫正。图像矫正是指:根据双目相机标定后获得的标定参数,分别对可见光图像和热成像图像消除畸变和行对准,使得可见光图像及所述热成像图像的成像原点坐标一致、两相机光轴平行、两相机的成像平面共面(即通过使得两相机光轴平行,保障两相机的成像平面共面)、极线行对齐。这样一幅图像上任意一点与其在另一幅图像上的对应点必然具有相同的行号,在该行进行一维搜索即可匹配到对应点。
在本申请实施例的一种实现方式中,标定参数包括可见光相机的内外参、热成像相机的内外参,以及可见光相机与热成像相机之间的相对位置关系。相应的,S302具体可以为:根据可见光相机的内外参,对可见光图像进行图像矫正,得到可见光矫正图像;根据热成像相机的内外参,对热成像图像进行图像矫正,得到热成像矫正图像;根据相对位置关系,将可见光矫正图像及热成像矫正图像矫正至同一极平面。
通过上述的图像矫正过程,矫正后的可见光图像和热成像图像在同一极平面上,即目标的极平面对应的图像行数一致。
在本申请实施例的一种实现方式中,双目相机的标定方式,具体可以为:利用预先调整好的温度交替标定板,采用张正友标定法,对双目相机进行标定,其中,温度交替标定板包括黑色块和白色底板(在其他可能的实施例中也可以是白色块和黑色底板),温度交替标定板为:通过温度控制器对黑色块和白色底板的温差进行调整,以使热成像相机采集温度交替标定板的图像满足预设星盘状效果后得到。
在本申请实施例中,双目相机的标定主要采用张正友标定法,由于热成像图像无法区分图像色彩,采用传统的黑白星盘标定板无法实现热成像相机的标定,因此,在本申请实施例中,改善原有的黑白星盘标定板,将温度信息与黑白色相结合,热成像图像中,颜色较深(灰度较大,即灰度大于预设上限灰度阈值)的目标为温度较低的目标,颜色较浅(灰度较小,即灰度小于预设下限灰度阈值)的目标为温度较高的目标,因此设计了如图4所示的温度交替标定板,上限灰度阈值大于或等于下限灰度阈值。其中,温度控制器用于调节温度交替标定板中黑色块和白色底板的温差,黑色块采用隔温材料制作,与白色底板之间采用隔温材料隔离。在利用温度交替标定板进行标定时,预先在一定距离上,通过温度控制器对黑色块和白色底板的温差进行调整,使得热成像相机采集温度交替标定板的图像满足预设星盘状效果,其中,预设星盘状效果为可见亮暗交替、轮廓清晰的星盘状成像效果。在预先调整好温度交替标定板后,利用该温度交替标定板,采用传统的张正友标定法,即可标定可见光相机和热成像相机的内外参,再通过该温度交替标定板在热成像图像和可见光图像上的对应位置关系,计算出可见光相机和热成像相机之间的相对位置关系。
本申请实施例中,确定第一目标区域、第二目标区域,计算指定目标的目标视差,计算指定目标的目标距离,计算指定目标的温度,这些步骤的具体执行可以采用上述实施例中的方式,这里不再赘述。
本申请实施例中,利用温度交替标定板可以快速完成双目相机的自动标定,节省了标定时间。
基于上述方法实施例,本申请实施例提供了一种目标测温装置,如图5所示,该装置可以包括:
获取模块510,用于获取双目相机采集的可见光图像和热成像图像,其中,双目相机包括用于采集可见光图像的可见光相机、以及用于采集热成像图像的热成像相机;
目标区域确定模块520,用于确定指定目标在可见光图像中的第一目标区域、以及指定目标在热成像图像中的第二目标区域;
视差计算模块530,用于根据第一目标区域在可见光图像中的位置及第二目标区域在热成像图像中的位置,利用预设的位置差计算方法,计算指定目标的目标视差;
距离计算模块540,用于根据目标视差,利用预设的双目视差测距方法,计算指定目标的目标距离;
温度计算模块550,用于根据目标距离及第二目标区域内的灰度值,计算指定目标的温度。
在一种实施例中,该装置还可以包括:图像矫正模块,用于根据预先标定的双目相机的标定参数,对可见光图像及热成像图像进行图像矫正;
目标区域确定模块520,具体可以用于确定指定目标在矫正后的可见光图像中的第一目标区域、以及指定目标在矫正后的热成像图像中的第二目标区域。
在一种实施例中,标定参数包括可见光相机的内外参、热成像相机的内外参,以及可见光相机与热成像相机之间的相对位置关系;
图像矫正模块,具体可以用于根据可见光相机的内外参,对可见光图像进行图像矫正,得到可见光矫正图像;根据热成像相机的内外参,对热成像图像进行图像矫正,得到热成像矫正图像;根据相对位置关系,将可见光矫正图像及热成像矫正图像矫正至同一极平面。
在一种实施例中,该装置还可以包括:标定模块,用于利用预先调整好的温度交替标定板,采用张正友标定法,对双目相机进行标定,其中,温度交替标定板包括黑色块和白色底板,温度交替标定板为:通过温度控制器对黑色块和白色底板的温差进行调整,以使热成像相机采集温度交替标定板的图像满足预设星盘状效果后得到。
在一种实施例中,目标区域确定模块520,具体可以用于对可见光图像进行目标检测,确定指定目标在可见光图像中的第一目标区域;根据第一目标区域的位置,确定热成像图像中的目标匹配区域;基于第一目标区域,在目标匹配区域中进行目标匹配,得到指定目标在热成像图像中的第二目标区域。
在一种实施例中,目标区域确定模块520,具体可以用于对可见光图像进行目标检测,确定指定目标在可见光图像中的第一目标区域;对热成像图像进行目标检测,确定热成像图像中各个目标的待匹配区域;将第一目标区域分别与各待匹配区域进行目标匹配,确定与第一目标区域相匹配的待匹配区域为指定目标在热成像图像中的第二目标区域。
在一种实施例中,温度计算模块550,具体可以用于根据指定目标的目标类型,确定第二目标区域内的感兴趣测温点;从热成像图像中,读取感兴趣测温点的灰度值;根据目标距离及感兴趣测温点的灰度值,计算指定目标的温度。
在一种实施例中,该装置还可以包括:显示模块,用于将温度叠加到可见光图像中进行显示。
应用本申请实施例,在获取到可见光图像和热成像图像后,确定出指定目标在可见光图像中的第一目标区域、指定目标在热成像图像中的第二目标区域,不论指定目标为何种姿态特征,指定目标在可见光图像和热成像图像中的目标区域大小相同或相近,根据第一目标区域在可见光图像中的位置及第二目标区域在热成像图像中的位置,所计算出的指定目标的目标视差表征了第一目标区域和第二目标区域之间的位置差,而该目标视差实际是由指定目标与双目相机间的目标距离所决定的,因此利用双目视差测量方法可以计算出指定目标的目标距离,并且由于利用双目视差测量方法计算目标距离时无需基于目标尺寸,目标距离并不会受到姿态特征变化的影响,因此,计算得到的目标距离保证与实际的目标距离更为接近,从而根据目标距离及第二目标区域内的灰度值,计算出的指定目标的温度更为准确,提高了目标测温的精度。
为了便于理解,下面结合具体的应用场景,对本申请实施例所提供的目标测温方法和目标测温装置进行介绍。
本申请实施例的目标测温方法应用于疫情防控、异常体温目标检测和抓拍场景。在疫情防控期间,地铁、酒店、商场、车站等场景中有大量的人员流动,需要对进出人群进行体温监测,当发现体温异常目标之后,抓拍目标图像并报警,禁止异常目标人员进入场所。
因此在地铁安检口、酒店或商场入口处,架设一台包括可见光相机和热成像相机的双目相机,并在监控人员处设置一台具有显示屏的电子设备。电子设备中包括处理器,处理器主要包括如下7个模块(如图6所示):双目相机标定模块601、图像矫正模块602、目标检测模块603、目标匹配模块604、目标测距模块605、目标测温位置选取模块606和目标测温模块607。
其中,双目相机标定模块601用于对双目相机进行标定,具体可以采用如图2所示实施例中的方式对双目相机进行标定,这里不再赘述。
图像矫正模块602用于对获取的可见光图像和热成像图像进行图像矫正。双目相机标定模块601对双目相机标定后的标定参数存储在图像矫正模块602中,图像矫正模块602可以根据可见光相机和热成像相机的内外参,对可见光图像和热成像图像进行图像矫正,同时根据可见光相机和热成像相机之间的相对位置关系,将可见光图像和热成像图像矫正到同一个极平面上,即目标的极平面对应的图像行数一致,如图7所示。
目标检测模块603用于在可见光图像上对需要测温的人员进行检测,具体可采用深度学习检测网络等多种算法,获取人员的目标框(tx,ty,w,h),其中tx、ty为目标框左上角坐标,w、h为目标框的宽和高,如图7所示。
目标匹配模块604用于对热成像图像进行目标匹配。以可见光tx、ty坐标为起始点,在 热成像图像上找到目标的同一极平面,并在热成像图像上选取W*h的一段矩形区域,其中W标识原图的宽、h标识目标框的高;将可见光图像中的目标框、热成像图像中的矩形区域,通过目标轮廓边界灰度值变化等信息进行目标匹配,完成目标匹配后,输出热成像图像上的目标框(Rx,Ry,Rw,Rh)。
目标测距模块605用于基于可见光图像上的目标框和热成像图像上的目标框的视差来计算目标距离,具体的,将可见光图像和热成像图像叠到一起,计算目标的相对位置差XL,该位置差即为目标视差,计算出目标视差XL后,使用双目视差测距公式(公式(1))计算目标距离。
目标测温位置选取模块606用于从热成像图像上的目标框(Rx,Ry,Rw,Rh)内寻找出感兴趣测温点。对于人员来讲,假设感兴趣测温点为目标框(Rx,Ry,Rw,Rh)内灰度值最低的点,读取该感兴趣测温点的灰度值。
目标测温模块607用于根据目标距离和该感兴趣测温点的灰度值,计算目标温度。
当监测到人员目标温度异常时,触发抓拍机制,抓拍温度异常的人员目标并在显示屏显示的可见光图像中显示出该人员目标的温度,进行报警。
本申请实施例还提供了一种电子设备,如图8所示,包括处理器801和存储器802,其中,存储器802存储有能够被处理器801执行的机器可执行指令,机器可执行指令由处理器801加载并执行,以实现本申请实施例提供的目标测温方法。
上述存储器可以包括RAM(Random Access Memory,随机存取存储器),也可以包括NVM(Non-volatile Memory,非易失性存储器),例如至少一个磁盘存储器。在一种实施例中,存储器还可以是至少一个位于远离前述处理器的存储装置。
上述处理器可以是通用处理器,包括CPU、NP(Network Processor,网络处理器)等;还可以是DSP(Digital Signal Processor,数字信号处理器)、ASIC(Application Specific Integrated Circuit,专用集成电路)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
存储器802与处理器801之间可以通过有线连接或者无线连接的方式进行数据传输,并且电子设备与其他设备之间可以通过有线通信接口或者无线通信接口进行通信。图8所示的仅为通过总线进行数据传输的示例,不作为具体连接方式的限定。
本申请实施例中,处理器通过读取存储器中存储的机器可执行指令,并通过加载和执行机器可执行指令,能够实现:在获取到可见光图像和热成像图像后,确定出指定目标在可见光图像中的第一目标区域、指定目标在热成像图像中的第二目标区域,不论指定目标 为何种姿态特征,指定目标在可见光图像和热成像图像中的目标区域大小相同或相近,根据第一目标区域在可见光图像中的位置及第二目标区域在热成像图像中的位置,所计算出的指定目标的目标视差表征了第一目标区域和第二目标区域之间的位置差,而该目标视差实际是由指定目标与双目相机间的目标距离所决定的,因此利用双目视差测量方法可以计算出指定目标的目标距离,并且由于利用双目视差测量方法计算目标距离时无需基于目标尺寸,目标距离并不会受到姿态特征变化的影响,因此,计算得到的目标距离保证与实际的目标距离更为接近,从而根据目标距离及第二目标区域内的灰度值,计算出的指定目标的温度更为准确,提高了目标测温的精度。
另外,本申请实施例提供了一种机器可读存储介质,机器可读存储介质内存储有机器可执行指令,机器可执行指令在被处理器加载并执行时,实现本申请实施例提供的目标测温方法。
本申请实施例中,机器可读存储介质存储有在运行时执行本申请实施例所提供的目标测温方法的机器可执行指令,因此能够实现:在获取到可见光图像和热成像图像后,确定出指定目标在可见光图像中的第一目标区域、指定目标在热成像图像中的第二目标区域,不论指定目标为何种姿态特征,指定目标在可见光图像和热成像图像中的目标区域大小相同或相近,根据第一目标区域在可见光图像中的位置及第二目标区域在热成像图像中的位置,所计算出的指定目标的目标视差表征了第一目标区域和第二目标区域之间的位置差,而该目标视差实际是由指定目标与双目相机间的目标距离所决定的,因此利用双目视差测量方法可以计算出指定目标的目标距离,并且由于利用双目视差测量方法计算目标距离时无需基于目标尺寸,目标距离并不会受到姿态特征变化的影响,因此,计算得到的目标距离保证与实际的目标距离更为接近,从而根据目标距离及第二目标区域内的灰度值,计算出的指定目标的温度更为准确,提高了目标测温的精度。
在本申请提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中任一目标测温方法。
本申请实施例提供了一种测温系统,如图9所示,该测温系统包括双目相机910及处理器920;双目相机910包括可见光相机911及热成像相机912;
可见光相机911,用于采集可见光图像;
热成像相机912,用于采集热成像图像;
处理器920,用于获取双目相机910采集的可见光图像和热成像图像;确定指定目标在可见光图像中的第一目标区域、以及指定目标在热成像图像中的第二目标区域;根据第一目标区域的位置及第二目标区域的位置,利用预设的位置差计算方法,计算指定目标的目 标视差;根据目标视差,利用预设的双目视差测距方法,计算指定目标的目标距离;根据目标距离及第二目标区域内的灰度值,计算指定目标的温度。
本申请实施例所提供的测温系统可以为分布式系统,即双目相机和处理器为两个独立分布的设备;本申请实施例所提供的测温系统也可以为一个设备,即双目相机和处理器集成在一个硬件设备中。
应用本申请实施例,处理器在获取到可见光图像和热成像图像后,确定出指定目标在可见光图像中的第一目标区域、指定目标在热成像图像中的第二目标区域,不论指定目标为何种姿态特征,指定目标在可见光图像和热成像图像中的目标区域大小相同或相近,根据第一目标区域在可见光图像中的位置及第二目标区域在热成像图像中的位置,所计算出的指定目标的目标视差表征了第一目标区域和第二目标区域之间的位置差,而该目标视差实际是由指定目标与双目相机间的目标距离所决定的,因此利用双目视差测量方法可以计算出指定目标的目标距离,目标距离并不会受到姿态特征变化的影响,因此,计算得到的目标距离保证与实际的目标距离更为接近,从而根据目标距离及第二目标区域内的灰度值,计算出的指定目标的温度更为准确,提高了目标测温的精度。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、DSL(Digital Subscriber Line,数字用户线))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如软盘、硬盘、磁带)、光介质(例如DVD(Digital Versatile Disc,数字多功能光盘))、或者半导体介质(例如SSD(Solid State Disk,固态硬盘))等。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所 固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于目标测温装置、电子设备、机器可读存储介质、计算机程序产品和测温系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。

Claims (11)

  1. 一种目标测温方法,其特征在于,所述方法包括:
    获取双目相机采集的可见光图像和热成像图像,其中,所述双目相机包括用于采集所述可见光图像的可见光相机、以及用于采集所述热成像图像的热成像相机;
    确定指定目标在所述可见光图像中的第一目标区域、以及所述指定目标在所述热成像图像中的第二目标区域;
    根据所述第一目标区域在所述可见光图像中的位置及所述第二目标区域在所述热成像图像中的位置,利用预设的位置差计算方法,计算所述指定目标的目标视差;
    根据所述目标视差,利用预设的双目视差测距方法,计算所述指定目标的目标距离;
    根据所述目标距离及所述第二目标区域内的灰度值,计算所述指定目标的温度。
  2. 根据权利要求1所述的方法,其特征在于,在所述确定指定目标在所述可见光图像中的第一目标区域、以及所述指定目标在所述热成像图像中的第二目标区域之前,所述方法还包括:
    根据预先标定的所述双目相机的标定参数,对所述可见光图像及所述热成像图像进行图像矫正;
    所述确定指定目标在所述可见光图像中的第一目标区域、以及所述指定目标在所述热成像图像中的第二目标区域,包括:
    确定指定目标在矫正后的所述可见光图像中的第一目标区域、以及所述指定目标在矫正后的所述热成像图像中的第二目标区域。
  3. 根据权利要求2所述的方法,其特征在于,所述标定参数包括所述可见光相机的内外参、所述热成像相机的内外参,以及所述可见光相机与所述热成像相机之间的相对位置关系;
    所述根据预先标定的所述双目相机的标定参数,对所述可见光图像及所述热成像图像进行图像矫正,包括:
    根据所述可见光相机的内外参,对所述可见光图像进行图像矫正,得到可见光矫正图像;
    根据所述热成像相机的内外参,对所述热成像图像进行图像矫正,得到热成像矫正图像;
    根据所述相对位置关系,将所述可见光矫正图像及所述热成像矫正图像矫正至同一极平面。
  4. 根据权利要求2所述的方法,其特征在于,所述双目相机的标定方式,包括:
    利用预先调整好的温度交替标定板,采用张正友标定法,对所述双目相机进行标定,其中,所述温度交替标定板包括黑色块和白色底板,所述温度交替标定板为:通过温度控制器对所述黑色块和所述白色底板的温差进行调整,以使所述热成像相机采集所述温度交替标定板的图像满足预设星盘状效果后得到。
  5. 根据权利要求1或2所述的方法,其特征在于,所述确定指定目标在所述可见光图像中的第一目标区域、以及所述指定目标在所述热成像图像中的第二目标区域,包括:
    对所述可见光图像进行目标检测,确定指定目标在所述可见光图像中的第一目标区域;
    根据所述第一目标区域的位置,确定所述热成像图像中的目标匹配区域;
    基于所述第一目标区域,在所述目标匹配区域中进行目标匹配,得到所述指定目标在所述热成像图像中的第二目标区域。
  6. 根据权利要求1或2所述的方法,其特征在于,所述确定指定目标在所述可见光图像中的第一目标区域、以及所述指定目标在所述热成像图像中的第二目标区域,包括:
    对所述可见光图像进行目标检测,确定指定目标在所述可见光图像中的第一目标区域;
    对所述热成像图像进行目标检测,确定所述热成像图像中各个目标的待匹配区域;
    将所述第一目标区域分别与各待匹配区域进行目标匹配,确定与所述第一目标区域相匹配的待匹配区域为所述指定目标在所述热成像图像中的第二目标区域。
  7. 根据权利要求1所述的方法,其特征在于,所述根据所述目标距离及所述第二目标区域内的灰度值,计算所述指定目标的温度,包括:
    根据所述指定目标的目标类型,确定所述第二目标区域内的感兴趣测温点;
    从所述热成像图像中,读取所述感兴趣测温点的灰度值;
    根据所述目标距离及所述感兴趣测温点的灰度值,计算所述指定目标的温度。
  8. 根据权利要求1所述的方法,其特征在于,在所述根据所述目标距离及所述第二目标区域内的灰度值,计算所述指定目标的温度之后,所述方法还包括:
    将所述温度叠加到所述可见光图像中进行显示。
  9. 一种目标测温装置,其特征在于,所述装置包括:
    获取模块,用于获取双目相机采集的可见光图像和热成像图像,其中,所述双目相机包括用于采集所述可见光图像的可见光相机、以及用于采集所述热成像图像的热成像相机;
    目标区域确定模块,用于确定指定目标在所述可见光图像中的第一目标区域、以及所述指定目标在所述热成像图像中的第二目标区域;
    视差计算模块,用于根据所述第一目标区域在所述可见光图像中的位置及所述第二目标区域在所述热成像图像中的位置,利用预设的位置差计算方法,计算所述指定目标的目标视差;
    距离计算模块,用于根据所述目标视差,利用预设的双目视差测距方法,计算所述指定目标的目标距离;
    温度计算模块,用于根据所述目标距离及所述第二目标区域内的灰度值,计算所述指定目标的温度。
  10. 一种测温系统,其特征在于,所述测温系统包括双目相机及处理器;所述双目相机包括可见光相机及热成像相机;
    所述可见光相机,用于采集可见光图像;
    所述热成像相机,用于采集热成像图像;
    所述处理器,用于获取所述双目相机采集的可见光图像和热成像图像;确定指定目标在所述可见光图像中的第一目标区域、以及所述指定目标在所述热成像图像中的第二目标区域;根据所述第一目标区域的位置及所述第二目标区域的位置,利用预设的位置差计算方法,计算所述指定目标的目标视差;根据所述目标视差,利用预设的双目视差测距方法,计算所述指定目标的目标距离;根据所述目标距离及所述第二目标区域内的灰度值,计算所述指定目标的温度。
  11. 一种非瞬时计算机可读存储介质,所述非瞬时计算机可读存储介质存储指令,其特征在于,所述指令在由处理器执行时使得所述处理器执行如权利要求1至8中任一权项所述的数据存储方法中的步骤。
PCT/CN2021/102141 2020-06-24 2021-06-24 一种目标测温方法、装置及测温系统 WO2021259365A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010590792.8A CN113834571A (zh) 2020-06-24 2020-06-24 一种目标测温方法、装置及测温系统
CN202010590792.8 2020-06-24

Publications (1)

Publication Number Publication Date
WO2021259365A1 true WO2021259365A1 (zh) 2021-12-30

Family

ID=78964761

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/102141 WO2021259365A1 (zh) 2020-06-24 2021-06-24 一种目标测温方法、装置及测温系统

Country Status (2)

Country Link
CN (1) CN113834571A (zh)
WO (1) WO2021259365A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114419076A (zh) * 2022-03-28 2022-04-29 杭州微影软件有限公司 一种数据处理方法及装置
CN115597551A (zh) * 2022-12-14 2023-01-13 成都量芯集成科技有限公司(Cn) 一种手持激光辅助双目扫描装置及方法
CN116754077A (zh) * 2023-08-14 2023-09-15 川开电气有限公司 一种配电柜视频监控测温系统及方法

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012005445A2 (ko) * 2010-07-05 2012-01-12 Joo Hoon 3차원 입체 열상 카메라 시스템
CN102809434A (zh) * 2011-05-30 2012-12-05 安讯士有限公司 温度记录法测量的方法和装置
CN104374547A (zh) * 2014-11-17 2015-02-25 国家电网公司 可见光相机与红外热像仪相机参数联合标定的方法及装置
CN109472826A (zh) * 2018-10-26 2019-03-15 国网四川省电力公司电力科学研究院 基于双目视觉的定位方法及装置
CN111062990A (zh) * 2019-12-13 2020-04-24 哈尔滨工程大学 一种面向水下机器人目标抓取的双目视觉定位方法
CN111127445A (zh) * 2019-12-26 2020-05-08 智洋创新科技股份有限公司 基于深度学习的配网线路高温区域检测方法与系统
CN111202504A (zh) * 2020-02-12 2020-05-29 上海云从汇临人工智能科技有限公司 一种异常对象管理方法、系统、机器可读介质及设备
CN111323125A (zh) * 2020-02-28 2020-06-23 北京格灵深瞳信息技术有限公司 一种测温方法、装置及计算机存储介质、电子设备
CN111795744A (zh) * 2020-05-25 2020-10-20 无锡海鸿信息技术有限公司 基于双目摄像头测距的红外测温补偿方法

Family Cites Families (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE602007000971D1 (de) * 2006-01-20 2009-06-10 Fluke Corp Kamera mit Bildmischung aus sichtbarem Licht und Infrarotlicht
JP2009117976A (ja) * 2007-11-02 2009-05-28 Panasonic Corp 撮像装置
US8853631B2 (en) * 2009-11-23 2014-10-07 Flir Systems Ab Camera with two visual imaging subsystems for determining parallax and for focusing an infrared imaging subsystem
CN103245322B (zh) * 2013-04-10 2015-11-11 南京航空航天大学 一种基于双目立体视觉的测距方法及系统
CN204496642U (zh) * 2015-04-08 2015-07-22 天津艾思科尔科技有限公司 一种双波段图像型火灾探测装置
CN105354851B (zh) * 2015-11-20 2018-07-17 中国安全生产科学研究院 对距离自适应的红外与可见光视频融合方法
CN105261029B (zh) * 2015-11-20 2018-08-21 中国安全生产科学研究院 基于双目视觉进行火源定位和灭火的机器人
CN205793054U (zh) * 2015-11-20 2016-12-07 中国安全生产科学研究院 对距离自适应的红外与可见光视频融合系统
CN107169405B (zh) * 2017-03-17 2020-07-03 上海云从企业发展有限公司 基于双目摄像机活体识别的方法及装置
CN107067470B (zh) * 2017-04-05 2019-09-06 东北大学 基于红外热像仪与深度相机的便携式三维温度场重建系统
CN106989824B (zh) * 2017-04-26 2019-01-29 华中科技大学 一种红外测温成像装置及检测方法
CN207366082U (zh) * 2017-10-31 2018-05-15 深圳领标科技开发有限公司 一种热成像监控测温预警系统
CN108010085B (zh) * 2017-11-30 2019-12-31 西南科技大学 基于双目可见光相机与热红外相机的目标识别方法
CN207798262U (zh) * 2017-12-06 2018-08-31 杭州柯林电气股份有限公司 基于红外可见光的变压器温度在线监测系统
CN108108704A (zh) * 2017-12-28 2018-06-01 努比亚技术有限公司 人脸识别方法及移动终端
CN108254738A (zh) * 2018-01-31 2018-07-06 沈阳上博智像科技有限公司 避障告警方法、装置及存储介质
WO2019182355A1 (ko) * 2018-03-20 2019-09-26 주식회사 엠테이크 열화상센서를 갖는 스마트폰, 차량, 카메라 및 이를 이용한 디스플레이 및 감지 방법
CN110361092B (zh) * 2018-04-11 2020-12-18 杭州海康微影传感科技有限公司 一种图像配准方法、装置及热成像摄像机
CN108688565A (zh) * 2018-06-06 2018-10-23 钧捷科技(北京)有限公司 一种高动态双目cmos摄像系统及使用方法
CN109059868A (zh) * 2018-06-29 2018-12-21 电子科技大学 一种基于自适应匹配窗口的双目测距方法
CN109101935A (zh) * 2018-08-20 2018-12-28 深圳市中视典数字科技有限公司 基于热成像相机的人物动作捕捉系统和方法
CN109798981A (zh) * 2019-02-18 2019-05-24 浙江大华技术股份有限公司 温度确定方法、测温设备、存储介质
CN110110629B (zh) * 2019-04-25 2021-05-28 北京工业大学 面向室内环境控制的人员信息检测方法与系统
CN111310692B (zh) * 2020-02-25 2021-04-02 云从科技集团股份有限公司 一种检测对象管理方法、系统、机器可读介质及设备
CN111220277A (zh) * 2020-02-27 2020-06-02 北京遥感设备研究所 一种智能红外体温筛查系统
CN111327788B (zh) * 2020-02-28 2022-05-17 北京迈格威科技有限公司 相机组的同步方法、测温方法、装置及电子系统

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012005445A2 (ko) * 2010-07-05 2012-01-12 Joo Hoon 3차원 입체 열상 카메라 시스템
CN102809434A (zh) * 2011-05-30 2012-12-05 安讯士有限公司 温度记录法测量的方法和装置
CN104374547A (zh) * 2014-11-17 2015-02-25 国家电网公司 可见光相机与红外热像仪相机参数联合标定的方法及装置
CN109472826A (zh) * 2018-10-26 2019-03-15 国网四川省电力公司电力科学研究院 基于双目视觉的定位方法及装置
CN111062990A (zh) * 2019-12-13 2020-04-24 哈尔滨工程大学 一种面向水下机器人目标抓取的双目视觉定位方法
CN111127445A (zh) * 2019-12-26 2020-05-08 智洋创新科技股份有限公司 基于深度学习的配网线路高温区域检测方法与系统
CN111202504A (zh) * 2020-02-12 2020-05-29 上海云从汇临人工智能科技有限公司 一种异常对象管理方法、系统、机器可读介质及设备
CN111323125A (zh) * 2020-02-28 2020-06-23 北京格灵深瞳信息技术有限公司 一种测温方法、装置及计算机存储介质、电子设备
CN111795744A (zh) * 2020-05-25 2020-10-20 无锡海鸿信息技术有限公司 基于双目摄像头测距的红外测温补偿方法

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114419076A (zh) * 2022-03-28 2022-04-29 杭州微影软件有限公司 一种数据处理方法及装置
CN115597551A (zh) * 2022-12-14 2023-01-13 成都量芯集成科技有限公司(Cn) 一种手持激光辅助双目扫描装置及方法
CN116754077A (zh) * 2023-08-14 2023-09-15 川开电气有限公司 一种配电柜视频监控测温系统及方法

Also Published As

Publication number Publication date
CN113834571A (zh) 2021-12-24

Similar Documents

Publication Publication Date Title
WO2021259365A1 (zh) 一种目标测温方法、装置及测温系统
CN111091063B (zh) 活体检测方法、装置及系统
JP7293169B2 (ja) 動画カメラフォーカス用途における距離測定デバイス
CN111339951A (zh) 体温测量方法、装置及系统
Somboonkaew et al. Mobile-platform for automatic fever screening system based on infrared forehead temperature
CN105865723B (zh) 气体泄漏检测非均匀校正方法及气体泄漏检测装置
EP3588004B1 (en) Stereoscopic camera and height acquisition method therefor and height acquisition system
US20230366738A1 (en) Systems and methods for temperature measurement
CN111323125B (zh) 一种测温方法、装置及计算机存储介质、电子设备
WO2022142570A1 (zh) 一种图像融合方法、装置、图像处理设备及双目系统
WO2022241964A1 (zh) 测温方法、计算机设备和计算机可读存储介质
US20230105139A1 (en) Infrared temperature measurement method, apparatus, and device, and storage medium
WO2022257794A1 (zh) 可见光图像和红外图像的处理方法及装置
WO2022218161A1 (zh) 用于目标匹配的方法、装置、设备及存储介质
TWI468658B (zh) 鏡頭檢測裝置及方法
JP6266948B2 (ja) 黄疸測定システム
CN113749646A (zh) 基于单目视觉的人体身高测量方法、装置及电子设备
KR100930594B1 (ko) 안면 영상 촬영장치 및 그의 안면 특징점 검출 방법
WO2023185375A1 (zh) 一种深度图生成系统、方法及自主移动设备
CN101980299B (zh) 基于棋盘标定的摄像机映射方法
JP7040627B2 (ja) 算出装置、情報処理方法およびプログラム
CN113269036A (zh) 确定热成像上人脸坐标的方法、系统、设备和存储介质
CN113587895A (zh) 双目测距方法及装置
CN112330726B (zh) 一种图像处理方法及装置
US11783564B2 (en) Contactless parameters measurement system and method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21828079

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21828079

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 21828079

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED (10.07.2023)