Infrared target pixel clustering method and device, and storage medium
Patent Information
- Application Number
- CN202511010305.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2045-07-18
AI Technical Summary
[0003]本申请实施例提供了一种红外目标像素点的聚类方法及装置、存储介质,以至少解决相关技术中无法对红外目标像素点进行精准聚类的问题
[0023]通过本申请,预先划分多个温度区间,基于测温对象上的目标点的目标温度,确定出目标温度所在的目标温度区间,从而对不同温度区间的针对性处理,确定与目标温度区间对应的目标灰度阈值,最后基于目标温度对应的目标灰度阈值以及目标点的灰度值,对目标图像中的像素点进行动态聚类,解决了相关技术中无法对红外目标像素点进行精准聚类的问题,达到了对红外目标像素点精准聚类的效果。
Smart Images

Figure CN120689642B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of infrared thermal imaging technology, and more specifically, to a method and apparatus for clustering infrared target pixels, and a storage medium. Background Technology
[0002] Infrared thermometry devices, due to their non-contact temperature measurement advantage, capture infrared radiation and convert it into a grayscale image to measure the temperature of a target object. However, fluctuations in ambient temperature can cause changes in the response characteristics of infrared detectors. To ensure the accuracy of infrared thermometry, the temperature measurement value can be compensated according to the pixel values of the target being measured. Most related technologies use a fixed grayscale threshold for clustering to determine the pixel values of the target. This grayscale threshold setting is not flexible enough, and because the temperature distribution of the target is uneven, the corresponding grayscale values also differ. Using a fixed grayscale threshold for clustering makes it impossible to accurately cluster the pixels. Summary of the Invention
[0003] This application provides a method, apparatus, and storage medium for clustering infrared target pixels, in order to at least solve the problem in related technologies that it is impossible to accurately cluster infrared target pixels.
[0004] According to one embodiment of this application, a clustering method for infrared target pixels is provided, comprising: determining the target temperature of a measured target point, wherein the target point is located on a temperature measuring object, and the temperature measuring object is an object whose temperature is measured by a temperature measuring device; determining a target temperature interval from a pre-divided plurality of temperature intervals, and determining a target grayscale threshold corresponding to the target temperature interval, wherein different temperature intervals correspond to different grayscale thresholds; and clustering pixels in a target image that correspond to a plurality of points on the temperature measuring object, based on the target grayscale threshold and the grayscale of the target point, wherein the plurality of points include the target point, and the target image is an image of the temperature measuring object.
[0005] In one exemplary embodiment, before determining the target grayscale threshold corresponding to the target temperature range, the method further includes: determining the calibration sensitivity of the temperature measuring device to the target temperature under a normal temperature calibration environment, wherein the calibration sensitivity is used to indicate the change of the grayscale of the target point with the target temperature; determining a correction function for the sensitivity of the temperature measuring device to the target temperature under other temperature environments; and determining a grayscale threshold corresponding to each of the temperature ranges based on the calibration sensitivity and the correction function.
[0006] In an exemplary embodiment, determining the grayscale threshold corresponding to each of the temperature ranges based on the calibration sensitivity and the correction function includes: for any temperature range included in the plurality of temperature ranges, determining the grayscale threshold corresponding to any of the temperature ranges in the following manner: determining a first grayscale threshold coefficient corresponding to a first temperature range, wherein the first temperature range is any of the temperature ranges, and the value of the first grayscale threshold coefficient is proportional to a predetermined temperature value included in the first temperature range; and determining the first grayscale threshold corresponding to the first temperature range based on the calibration sensitivity, a first correction function of the sensitivity of the temperature measuring device to the target temperature in the first temperature range, and the first grayscale threshold coefficient.
[0007] In an exemplary embodiment, determining a first grayscale threshold corresponding to the first temperature range based on the above-mentioned calibration sensitivity, a first correction function for the sensitivity of the temperature measuring device to the target temperature within the first temperature range, and the first grayscale threshold coefficient includes: when the first temperature range is less than or equal to the first temperature threshold, determining the first grayscale threshold using the following formula: Where c1 is the first grayscale threshold coefficient, g(Th1,Th2,Th3) is the first correction function, and Th1,Th2,Th3 are multiple temperatures corresponding to the temperature measuring device within the first temperature range. Here, Ts is the aforementioned calibration sensitivity, Ts is the aforementioned target temperature, and Gs is the aforementioned grayscale value of the target point; when the aforementioned first temperature range is greater than the aforementioned first temperature threshold and less than the aforementioned second temperature threshold, the aforementioned first grayscale threshold is determined by the following formula: in, is the first grayscale threshold coefficient mentioned above, g(Th1,Th2,Th3) is the first correction function mentioned above, and Th1,Th2,Th3 are multiple temperatures corresponding to the temperature measuring device under the first temperature range mentioned above. To round up Here, Ts is the aforementioned calibrated sensitivity, Ts is the aforementioned target temperature, and Gs is the aforementioned grayscale value of the target point; when the aforementioned first temperature range is greater than or equal to the aforementioned second temperature threshold, the aforementioned first grayscale threshold is determined by the following formula: Where c3 is the first grayscale threshold coefficient, g(Th1,Th2,Th3) is the first correction function, and Th1,Th2,Th3 are multiple temperatures corresponding to the temperature measuring device within the first temperature range. The above-mentioned calibration sensitivity, Ts is the above-mentioned target temperature, and Gs is the above-mentioned gray level of the target point.
[0008] In one exemplary embodiment, determining a correction function for the sensitivity of the temperature measuring device to the target temperature under other temperature environments includes: determining the calibration temperature of the temperature measuring device under the ambient temperature calibration environment, wherein the calibration temperature includes a first external ambient temperature of the temperature measuring device, a first internal cavity temperature of the temperature measuring device, and a first infrared focal plane temperature of the temperature measuring device; determining other temperatures of the temperature measuring device under the other temperature environments, wherein the other temperatures include a second external ambient temperature of the temperature measuring device, a second internal cavity temperature of the temperature measuring device, and a second infrared focal plane temperature of the temperature measuring device; and determining the correction function based on the calibration temperature and the other temperatures.
[0009] In an exemplary embodiment, determining the correction function based on the calibration temperature and the other temperatures described above includes: determining the correction function g(Th1,Th2,Th3) using the following formula: g(Th1,Th2,Th3)=k1×(Th2-Th2c)×e |(Th3-Th3c)-(Th1-Th1c)| Wherein, k1 is the first coefficient used to indicate the sensitivity of the temperature measurement of the above-mentioned temperature measuring device, Th1c, Th2c, and Th3c are the first external ambient temperature, the first internal cavity temperature, and the first infrared focal plane temperature, respectively, and Th1, Th2, and Th3 are the second external ambient temperature, the second internal cavity temperature, and the second infrared focal plane temperature, respectively.
[0010] In an exemplary embodiment, clustering the pixels in the target image corresponding to multiple points on the temperature measuring object includes: determining multiple target pixels from the pixels of the multiple points, and clustering the multiple target pixels into one class, wherein the absolute value of the difference between the gray level of the target pixel and the gray level of the target point is less than or equal to the target gray level threshold, and the target pixel and the pixel of the target point are in the same connected region; after clustering the pixels in the target image corresponding to multiple points on the temperature measuring object, the method further includes: calculating the sum of the pixel values of the target pixels and the pixel values of the target points to obtain the target pixel value of the target image.
[0011] In an exemplary embodiment, determining multiple target pixels from the pixels of the aforementioned multiple points includes: using the pixels of the target points as the origin, searching to the left and right of the target points respectively to obtain a first pixel, wherein the absolute value of the difference between the gray level of the first pixel and the gray level of the target point is less than or equal to the target gray level threshold, and the first pixel and the pixels of the target points are in the same connected component; using the pixels of the first target points as the origin, searching to the left and right of the first target points respectively to obtain a second pixel, wherein the first target points are pixels above and below the target points, the absolute value of the difference between the gray level of the second pixel and the gray level of the target points is less than or equal to the target gray level threshold, and the second pixel and the pixels of the target points are in the same connected component; and determining the first pixel and the second pixel as the target pixels.
[0012] According to another embodiment of this application, an infrared target pixel clustering device is provided, comprising: a first determining module, configured to determine the target temperature of a measured target point, wherein the target point is located on a temperature measuring object, and the temperature measuring object is an object whose temperature is measured by a temperature measuring device; a second determining module, configured to determine the target temperature interval from a plurality of pre-divided temperature intervals, and to determine a target grayscale threshold corresponding to the target temperature interval, wherein different temperature intervals correspond to different grayscale thresholds; and a first clustering module, configured to cluster pixels in a target image that correspond to a plurality of points on the temperature measuring object based on the target grayscale threshold and the grayscale of the target point, wherein the plurality of points include the target point, and the target image is an image of the temperature measuring object.
[0013] In one exemplary embodiment, the apparatus further includes: a third determining module, configured to determine the calibration sensitivity of the temperature measuring device to the target temperature under a normal temperature calibration environment before determining the target grayscale threshold corresponding to the target temperature range, wherein the calibration sensitivity is used to indicate the change of the grayscale of the target point with the target temperature; a fourth determining module, configured to determine a correction function for the sensitivity of the temperature measuring device to the target temperature under other temperature environments; and a fifth determining module, configured to determine the grayscale threshold corresponding to each of the temperature ranges based on the calibration sensitivity and the correction function.
[0014] In an exemplary embodiment, the fifth determining module includes: for any temperature range included in the plurality of temperature ranges, determining a grayscale threshold corresponding to any of the temperature ranges in the following manner: a first determining submodule is used to determine a first grayscale threshold coefficient corresponding to a first temperature range, wherein the first temperature range is any of the temperature ranges, and the value of the first grayscale threshold coefficient is proportional to a predetermined temperature value included in the first temperature range; a second determining submodule is used to determine a first grayscale threshold corresponding to the first temperature range based on the calibration sensitivity, a first correction function of the sensitivity of the temperature measuring device to the target temperature in the first temperature range, and the first grayscale threshold coefficient.
[0015] In an exemplary embodiment, the second determining submodule includes: a first determining unit, configured to determine the first grayscale threshold by means of the following formula when the first temperature range is less than or equal to a first temperature threshold: Where c1 is the first grayscale threshold coefficient, g(Th1,Th2,Th3) is the first correction function, and Th1,Th2,Th3 are multiple temperatures corresponding to the temperature measuring device within the first temperature range. The above-mentioned calibration sensitivity, Ts is the above-mentioned target temperature, and Gs is the gray level of the above-mentioned target point; the second determining unit is used to determine the above-mentioned first gray level threshold by the following formula when the above-mentioned first temperature range is greater than the above-mentioned first temperature threshold and less than the second temperature threshold: in, is the first grayscale threshold coefficient mentioned above, g(Th1,Th2,Th3) is the first correction function mentioned above, and Th1,Th2,Th3 are multiple temperatures corresponding to the temperature measuring device under the first temperature range mentioned above. To round up The above-mentioned calibration sensitivity, Ts is the above-mentioned target temperature, and Gs is the gray level of the above-mentioned target point; the third determining unit is used to determine the above-mentioned first gray level threshold by the following formula when the above-mentioned first temperature range is greater than or equal to the above-mentioned second temperature threshold: Where c3 is the first grayscale threshold coefficient, g(Th1,Th2,Th3) is the first correction function, and Th1,Th2,Th3 are multiple temperatures corresponding to the temperature measuring device within the first temperature range. The above-mentioned calibration sensitivity, Ts is the above-mentioned target temperature, and Gs is the above-mentioned gray level of the target point.
[0016] In one exemplary embodiment, the fourth determining module includes: a third determining submodule, configured to determine the calibration temperature of the temperature measuring device under the aforementioned room temperature calibration environment, wherein the calibration temperature includes the first external ambient temperature of the temperature measuring device, the first internal cavity temperature of the temperature measuring device, and the first infrared focal plane temperature of the temperature measuring device; a fourth determining submodule, configured to determine other temperatures of the temperature measuring device under the aforementioned other temperature environments, wherein the other temperatures include the second external ambient temperature of the temperature measuring device, the second internal cavity temperature of the temperature measuring device, and the second infrared focal plane temperature of the temperature measuring device; and a fifth determining submodule, configured to determine the correction function based on the aforementioned calibration temperature and the aforementioned other temperatures.
[0017] In an exemplary embodiment, the fifth determining submodule includes a fourth determining unit, configured to determine the correction function g(Th1,Th2,Th3) using the following formula: g(Th1,Th2,Th3)=k1×(Th2-Th2c)×e |(Th3-Th3c)-(Th1-Th1c)| Wherein, k1 is the first coefficient used to indicate the sensitivity of the temperature measurement of the above-mentioned temperature measuring device, Th1c, Th2c, and Th3c are the first external ambient temperature, the first internal cavity temperature, and the first infrared focal plane temperature, respectively, and Th1, Th2, and Th3 are the second external ambient temperature, the second internal cavity temperature, and the second infrared focal plane temperature, respectively.
[0018] In an exemplary embodiment, the first clustering module includes: a sixth determining submodule, configured to determine multiple target pixels from the pixels of the multiple points, and cluster the multiple target pixels into one class, wherein the absolute value of the difference between the gray level of the target pixel and the gray level of the target point is less than or equal to the target gray level threshold, and the target pixel and the pixel of the target point are in the same connected domain; the device further includes: a first calculation module, configured to cluster the pixels in the target image corresponding to the multiple points on the temperature measuring object, and then calculate the sum of the pixel values of the target pixels and the pixel values of the target points to obtain the target pixel value of the target image.
[0019] In an exemplary embodiment, the sixth determining submodule includes: a first search unit, configured to search to the left and right of the target point, using the pixel of the target point as the origin, to obtain a first pixel, wherein the absolute value of the difference between the grayscale of the first pixel and the grayscale of the target point is less than or equal to the target grayscale threshold, and the first pixel and the pixel of the target point are in the same connected region; a second search unit, configured to search to the left and right of the first target point, using the pixel of the first target point as the origin, to obtain a second pixel, wherein the first target point is a pixel above and below the target point, the absolute value of the difference between the grayscale of the second pixel and the grayscale of the target point is less than or equal to the target grayscale threshold, and the second pixel and the pixel of the target point are in the same connected region; and a fifth determining unit, configured to determine the first pixel and the second pixel as the target pixel.
[0020] According to another embodiment of this application, a computer program product is also provided, including a computer program configured to have a processor perform the steps in any of the above method embodiments.
[0021] According to yet another embodiment of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, and the computer program is configured to have a processor perform the steps in any of the above method embodiments.
[0022] According to another embodiment of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is configured to execute the computer program to perform the steps in any of the above method embodiments.
[0023] This application pre-divides multiple temperature ranges, determines the target temperature range based on the target temperature of the target point on the temperature measurement object, and then performs targeted processing on different temperature ranges to determine the target grayscale threshold corresponding to the target temperature range. Finally, based on the target grayscale threshold corresponding to the target temperature and the grayscale value of the target point, the pixels in the target image are dynamically clustered, solving the problem that related technologies cannot accurately cluster infrared target pixels and achieving the effect of accurate clustering of infrared target pixels. Attached Figure Description
[0024] Figure 1 This is a hardware structure block diagram of a mobile terminal for a clustering method of infrared target pixels according to an embodiment of this application;
[0025] Figure 2This is a flowchart of a clustering method for infrared target pixels according to an embodiment of this application;
[0026] Figure 3 This is a schematic diagram of a clustering method for infrared target pixels according to an embodiment of this application;
[0027] Figure 4 This is a schematic diagram of a clustering method for infrared target pixels according to a specific embodiment of this application. Figure 1 ;
[0028] Figure 5 This is a flowchart of a clustering method for infrared target pixels according to a specific embodiment of this application;
[0029] Figure 6 This is a schematic diagram of a clustering method for infrared target pixels according to a specific embodiment of this application. Figure 2 ;
[0030] Figure 7 This is a structural block diagram of an infrared target pixel clustering device according to an embodiment of this application. Detailed Implementation
[0031] The embodiments of this application will be described in detail below with reference to the accompanying drawings and examples.
[0032] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0033] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a clustering method of infrared target pixels according to an embodiment of this application. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0034] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to a clustering method for infrared target pixels in this embodiment of the application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0035] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0036] This embodiment provides a clustering method for infrared target pixels. Figure 2 This is a flowchart of a clustering method for infrared target pixels according to an embodiment of this application, as shown below. Figure 2 As shown, the process includes the following steps:
[0037] Step S202: Determine the target temperature of the measured target point, wherein the target point is located on the object to be measured, and the object to be measured is the object whose temperature is measured by the temperature measuring device.
[0038] Optionally, the object of temperature measurement is the actual object or area for which the infrared temperature measurement device measures temperature. It can be any object capable of emitting infrared radiation, including but not limited to industrial equipment, buildings, human bodies, forests, etc. The scope of the object of temperature measurement can be the entire scene or a specific part or object within the scene.
[0039] Optionally, the temperature measuring device is an infrared temperature measuring device, including but not limited to an infrared thermal imager, an infrared thermometer, and an infrared temperature measuring system.
[0040] Optionally, the target point is one or more infrared thermometric feature target points located on the object being measured, also known as points of interest, including but not limited to global highest temperature point, global lowest temperature point, regional highest temperature point, regional lowest temperature point, line highest temperature point, line lowest temperature point, and single target point.
[0041] Optionally, determining the target temperature of the measured target point includes: determining the thermal radiation energy of the target point; converting the thermal radiation energy into the gray level of the target point; and calculating the target temperature corresponding to the gray level of the target point based on the conversion relationship between gray level and temperature. The conversion relationship between gray level and temperature can be obtained by calibrating an infrared thermometer on multiple standard blackbody radiation sources under a fixed ambient temperature environment.
[0042] Optionally, determining the target temperature of the measured target point includes: determining the thermal radiation energy of the target point; converting the thermal radiation energy into the grayscale value of the target point; and calculating the target temperature corresponding to the target grayscale value using an infrared temperature measurement algorithm based on the ambient temperature Th1c, internal cavity temperature Th2c, infrared focal plane temperature Th3c, and target grayscale value Gs of the infrared temperature measuring device under normal temperature calibration conditions. For example, if the ambient temperature is 23℃, the internal cavity temperature is 25℃, the infrared focal plane temperature is 27℃, and the reference grayscale value is 4096, where the reference grayscale value is the standard for calculating the grayscale difference and is related to the response and parameters of the infrared temperature measuring device. The narrower the temperature measurement range, the larger the reference grayscale value; the larger the temperature measurement range, the smaller the reference grayscale value. As shown in Table 1, Table 1 contains the temperature data collected by the infrared temperature measuring device.
[0043]
[0044]
[0045] For example, in the first row: the temperature value of 10℃ is the temperature value measured by the infrared thermometer, the gray value of 3921 is the gray value corresponding to 10℃, 10℃-20℃ is the temperature difference between 10℃ and 20℃ of the infrared thermometer, and the gray value difference of 100 is the gray value difference between 10℃ and 20℃ of the infrared thermometer when the ambient temperature is 24℃, that is, 4021-3921=100.
[0046] When the ambient temperature is 23℃, the internal cavity temperature is 25℃, the reference grayscale is 4096, and the target grayscale measured by the infrared thermometer is 4360, the internal cavity temperature is between 20℃ and 30℃. The target temperature is: 4360-4096=264>75, 264-75=189<200, 25+5+189 / 200*10=39.45℃.
[0047] Step S204: Determine the target temperature range where the target temperature is located from the pre-divided multiple temperature ranges, and determine the target grayscale threshold corresponding to the target temperature range, wherein the grayscale thresholds corresponding to different temperature ranges are different.
[0048] Optionally, a temperature range refers to several continuous or discontinuous temperature segments into which the temperature measurement range is divided according to certain standards. By dividing the temperature range, target points at different temperatures can be associated with specific grayscale thresholds.
[0049] Optionally, the target grayscale threshold is a grayscale value limit used in infrared image processing to determine whether a pixel belongs to a specific temperature target. It is determined based on the target temperature range, with different temperature ranges corresponding to different grayscale thresholds. This dynamically adapts to the grayscale representation of the temperature-measuring object in the target image under different temperature conditions. Setting the target grayscale threshold is crucial for the accurate identification and clustering of pixels, ensuring that only those pixels that match the target temperature are classified as part of the temperature-measuring object.
[0050] Step S206: Based on the target grayscale threshold and the grayscale of the target point, cluster the pixels in the target image that correspond to multiple points on the temperature measuring object, wherein the multiple points include the target point, and the target image is an image of the temperature measuring object.
[0051] Optionally, the target image can be an infrared grayscale thermal image of the object being measured.
[0052] In this embodiment, the entity executing the above steps can be a terminal, a server, a specific processor set in the terminal or server, or a processor or processing device set relatively independently of the terminal or server, but is not limited thereto.
[0053] Through the above steps, multiple temperature ranges are pre-divided. Based on the target temperature of the target point on the temperature measurement object, the target temperature range is determined. This allows for targeted processing of different temperature ranges, determining the target grayscale threshold corresponding to the target temperature range, and finally, based on the target grayscale threshold corresponding to the target temperature and the grayscale value of the target point, dynamically clustering the pixels in the target image. This solves the problem of inaccurate clustering of infrared target pixels in related technologies, achieving the effect of accurate clustering of infrared target pixels.
[0054] In one exemplary embodiment, before determining the target grayscale threshold corresponding to the target temperature range, the method further includes: determining the calibration sensitivity of the temperature measuring device to the target temperature under a normal temperature calibration environment, wherein the calibration sensitivity is used to indicate the change of the grayscale of the target point with the target temperature; determining a correction function for the sensitivity of the temperature measuring device to the target temperature under other temperature environments; and determining a grayscale threshold corresponding to each of the temperature ranges based on the calibration sensitivity and the correction function.
[0055] Optionally, calibration sensitivity refers to the change in grayscale value output by the temperature measuring device for every degree change in the target temperature. For example, in a temperature control monitoring system for a waste incineration plant, the calibration sensitivity of an infrared thermometer at a normal temperature of 25°C is 25 grayscale units / °C. This means that under these conditions, if the target temperature rises from 45°C to 46°C, the grayscale value of the target point will theoretically increase by 25 grayscale units. This calibration sensitivity provides the basis for subsequent temperature measurement and compensation.
[0056] Optionally, the correction function is used to adjust the calibration sensitivity to adapt to changes in ambient temperature or the state of the temperature measuring equipment. Due to factors such as ambient temperature and equipment thermal drift, the sensitivity obtained under calibration conditions may no longer be applicable to other temperature environments. The correction function dynamically adjusts the sensitivity by mathematically modeling these environmental changes, ensuring the consistency and accuracy of measurement results under different conditions. For example, in the incineration plant scenario mentioned above, if the ambient temperature drops to 5°C, the correction function may adjust the sensitivity to 30 gray units / °C. This is because in low-temperature environments, the thermal radiation of objects changes, and the energy received by the infrared detector also changes accordingly. The correction function adjusts the amount of gray change by calculating the relationship between ambient temperature change and sensitivity to maintain the accuracy of temperature measurement. Similarly, if the ambient temperature rises to 40°C, the correction function may adjust the sensitivity to 20 gray units / °C to cope with the impact of high temperature on thermal radiation and detector response.
[0057] Alternatively, other temperature environments are various environmental conditions other than the normal temperature calibration environment.
[0058] In this embodiment, by determining the calibration sensitivity under normal temperature calibration conditions, the temperature measuring device can accurately quantify the impact of temperature changes on grayscale values. Simultaneously, the introduction of a correction function allows the device to adjust its temperature measurement sensitivity according to real-time ambient temperature changes. This dynamic adjustment capability enables the device to maintain high-precision temperature measurement under different environments, avoiding measurement errors caused by ambient temperature fluctuations. Furthermore, based on the grayscale threshold determined by the calibration sensitivity and correction function, pixels in the target image can be more accurately classified, grouping pixels belonging to the same temperature target into one category. This achieves the goal of avoiding target information loss or misjudgment due to improper threshold settings.
[0059] In an exemplary embodiment, determining the grayscale threshold corresponding to each of the temperature ranges based on the calibration sensitivity and the correction function includes: for any temperature range included in the plurality of temperature ranges, determining the grayscale threshold corresponding to any of the temperature ranges in the following manner: determining a first grayscale threshold coefficient corresponding to a first temperature range, wherein the first temperature range is any of the temperature ranges, and the value of the first grayscale threshold coefficient is proportional to a predetermined temperature value included in the first temperature range; and determining the first grayscale threshold corresponding to the first temperature range based on the calibration sensitivity, a first correction function of the sensitivity of the temperature measuring device to the target temperature in the first temperature range, and the first grayscale threshold coefficient.
[0060] Optionally, in the low-temperature range, since temperature changes have a smaller impact on grayscale, the first grayscale threshold coefficient is lower, thus ensuring the accuracy of clustering. Conversely, in the high-temperature range, since temperature changes have a larger impact on grayscale, the first grayscale threshold coefficient is higher, avoiding mis-clustering caused by large grayscale variations in high-temperature environments. This method solves the problem of inaccurate clustering caused by fixed grayscale thresholds in traditional infrared temperature measurement equipment across different temperature ranges, improving the temperature measurement accuracy and clustering accuracy of the equipment.
[0061] In an exemplary embodiment, determining a first grayscale threshold corresponding to the first temperature range based on the above-mentioned calibration sensitivity, a first correction function for the sensitivity of the temperature measuring device to the target temperature within the first temperature range, and the first grayscale threshold coefficient includes: when the first temperature range is less than or equal to the first temperature threshold, determining the first grayscale threshold using the following formula: Where c1 is the first grayscale threshold coefficient, g(Th1,Th2,Th3) is the first correction function, and Th1,Th2,Th3 are multiple temperatures corresponding to the temperature measuring device within the first temperature range. Here, Ts is the aforementioned calibration sensitivity, Ts is the aforementioned target temperature, and Gs is the aforementioned grayscale value of the target point; when the aforementioned first temperature range is greater than the aforementioned first temperature threshold and less than the aforementioned second temperature threshold, the aforementioned first grayscale threshold is determined by the following formula: in, is the first grayscale threshold coefficient mentioned above, g(Th1,Th2,Th3) is the first correction function mentioned above, and Th1,Th2,Th3 are multiple temperatures corresponding to the temperature measuring device under the first temperature range mentioned above. To round up Here, Ts is the aforementioned calibrated sensitivity, Ts is the aforementioned target temperature, and Gs is the aforementioned grayscale value of the target point; when the aforementioned first temperature range is greater than or equal to the aforementioned second temperature threshold, the aforementioned first grayscale threshold is determined by the following formula: Where c3 is the first grayscale threshold coefficient, g(Th1,Th2,Th3) is the first correction function, and Th1,Th2,Th3 are multiple temperatures corresponding to the temperature measuring device within the first temperature range. The above-mentioned calibration sensitivity, Ts is the above-mentioned target temperature, and Gs is the above-mentioned gray level of the target point.
[0062] Optionally, in, This refers to the sensitivity of infrared thermometers to target temperature under normal temperature calibration conditions. Ts is the derivative of the function that converts the updated temperature value into a grayscale value, where Ts is the target temperature.
[0063] This embodiment distinguishes different temperature ranges (e.g., low, medium, and high temperatures) for the target temperature, allowing the temperature measuring device to employ the most suitable grayscale threshold calculation formula for that range. This ensures optimal temperature measurement accuracy across any temperature range. Furthermore, a correction function is introduced into the formula. This function adjusts based on the ambient temperature, internal cavity temperature, and infrared focal plane temperature of the temperature measuring device. Regardless of the environmental conditions, the grayscale threshold can be dynamically adjusted through the correction function, guaranteeing the accuracy of the clustering operation. Moreover, different grayscale threshold coefficients and the rounding up operation make the grayscale threshold setting more flexible. This flexibility not only allows the device to adapt to different temperature measurement needs but also increases the system's robustness, maintaining stability and accuracy even in environments with rapid temperature changes.
[0064] In one exemplary embodiment, determining a correction function for the sensitivity of the temperature measuring device to the target temperature under other temperature environments includes: determining the calibration temperature of the temperature measuring device under the ambient temperature calibration environment, wherein the calibration temperature includes a first external ambient temperature of the temperature measuring device, a first internal cavity temperature of the temperature measuring device, and a first infrared focal plane temperature of the temperature measuring device; determining other temperatures of the temperature measuring device under the other temperature environments, wherein the other temperatures include a second external ambient temperature of the temperature measuring device, a second internal cavity temperature of the temperature measuring device, and a second infrared focal plane temperature of the temperature measuring device; and determining the correction function based on the calibration temperature and the other temperatures.
[0065] In an exemplary embodiment, determining the correction function based on the calibration temperature and the other temperatures described above includes: determining the correction function g(Th1,Th2,Th3) using the following formula: g(Th1,Th2,Th3)=k1×(Th2-Th2c)×e |(Th3-Th3c)-(Th1-Th1c)| Wherein, k1 is the first coefficient used to indicate the sensitivity of the temperature measurement of the above-mentioned temperature measuring device, Th1c, Th2c, and Th3c are the first external ambient temperature, the first internal cavity temperature, and the first infrared focal plane temperature, respectively, and Th1, Th2, and Th3 are the second external ambient temperature, the second internal cavity temperature, and the second infrared focal plane temperature, respectively.
[0066] Alternatively, k1 can be obtained by fitting the temperature of the same target measured by the temperature measuring device at different ambient temperatures. For example, let (Th2-Th2c)×e |(Th3-Th3c)-(Th1-Th1c)|Let x be the variable. At an ambient temperature of 23℃, the internal cavity temperature is 25℃, the infrared focal plane temperature is 27℃, and the sensitivity of the temperature measuring device to a target at 45℃ is 25. Therefore, x is 0, and g(Th1,Th2,Th3) is (25-25) / 25 = 0. At an ambient temperature of 0℃, the internal cavity temperature is 1℃, the infrared focal plane temperature is 2℃, and the sensitivity of the temperature measuring device to a target at 45℃ is 30. Therefore, x is -185.482, and g(Th1,Th2,Th3) is (30-25) / 25 = 0.2. At an ambient temperature of -20℃, the internal cavity temperature is -19.5℃, and the infrared focal plane temperature is... At a temperature of 19℃, the sensitivity of the temperature measuring device to a target at 45℃ is 55, the variable x is -956.08, and g(Th1,Th2,Th3) is (55-25) / 25 = 1.2. At an ambient temperature of 50℃, the internal cavity temperature is 53℃, the infrared focal plane temperature is 56℃, and the sensitivity of the temperature measuring device to a target at 45℃ is 18, the variable x is 216.395, and g(Th1,Th2,Th3) is (18-25) / 25 = -0.28. By fitting the variables x and g(Th1,Th2,Th3), the sensitivity coefficient k1 can be obtained as -0.001251. Figure 4 As shown.
[0067] Optionally, when the first external ambient temperature, the first internal cavity temperature, and the first infrared focal plane temperature are 23℃, 25℃, and 27℃ respectively, the second external ambient temperature, the second internal cavity temperature, and the second infrared focal plane temperature are 35℃, 37℃, and 41℃ respectively, k1 is -0.001251, c1, c2, and c3 are 5, 0.9, and 10 respectively, and the first temperature threshold and the second temperature threshold are 60℃ and 100℃ respectively:
[0068] When the target temperature is 45℃, the sensitivity correction function is g = -0.001251*(37-25)*e |(41-27)-(35-23)| = -0.116, sensitivity is According to Table 1, at room temperature, 45℃ corresponds to a grayscale difference of 250 between 40℃ and 50℃. Therefore, the sensitivity at 45℃ is 250 / 10 = 25, and the target grayscale threshold at this time is 5×(1-0.116)×25 = 110.5.
[0069] When the target temperature is 85℃, the sensitivity is According to Table 1, at room temperature, 85℃ corresponds to a grayscale difference of 450 between 80℃ and 90℃. Therefore, the sensitivity at 85℃ is 450 / 10 = 45, and the target grayscale threshold at this time is 0.9×(1-0.116)×45×9 = 322.218.
[0070] When the target temperature is 115℃, the sensitivity is According to Table 1, at room temperature, 115℃ corresponds to a grayscale difference of 600 between 110℃ and 120℃. Therefore, the sensitivity of 115℃ at room temperature is 600 / 10 = 60, and the target grayscale threshold at this time is 10×(1-0.116)×60 = 530.4.
[0071] This embodiment takes into account the actual temperature of the temperature measuring device under different ambient temperatures (including external ambient temperature, internal cavity temperature, and infrared focal plane temperature) through a correction function. This allows for precise control of the sensitivity of the temperature measuring device under various ambient temperatures, thereby avoiding measurement errors caused by environmental factors.
[0072] In an exemplary embodiment, clustering the pixels in the target image corresponding to multiple points on the temperature measuring object includes: determining multiple target pixels from the pixels of the multiple points, and clustering the multiple target pixels into one class, wherein the absolute value of the difference between the gray level of the target pixel and the gray level of the target point is less than or equal to the target gray level threshold, and the target pixel and the pixel of the target point are in the same connected region; after clustering the pixels in the target image corresponding to multiple points on the temperature measuring object, the method further includes: calculating the sum of the pixel values of the target pixels and the pixel values of the target points to obtain the target pixel value of the target image.
[0073] This embodiment achieves accurate pixel clustering by determining the grayscale difference between target pixels and ensuring they are in the same connected region. For example, when the grayscale value of a target pixel is 100 and the target grayscale threshold is 10, all pixels with grayscale values between 90 and 110, and which are directly or indirectly connected, will be clustered as part of the target pixel. This method solves the problem that traditional infrared thermometry devices easily cluster regions with similar but discontinuous temperatures into the same target, improving the accuracy and reliability of clustering.
[0074] In an exemplary embodiment, determining multiple target pixels from the pixels of the aforementioned multiple points includes: using the pixels of the target points as the origin, searching to the left and right of the target points respectively to obtain a first pixel, wherein the absolute value of the difference between the gray level of the first pixel and the gray level of the target point is less than or equal to the target gray level threshold, and the first pixel and the pixels of the target points are in the same connected component; using the pixels of the first target points as the origin, searching to the left and right of the first target points respectively to obtain a second pixel, wherein the first target points are pixels above and below the target points, the absolute value of the difference between the gray level of the second pixel and the gray level of the target points is less than or equal to the target gray level threshold, and the second pixel and the pixels of the target points are in the same connected component; and determining the first pixel and the second pixel as the target pixels.
[0075] Optionally, infrared thermography target clustering can be completed by comparing the grayscale of the target point with the grayscale of any other point (x,y) to see if they meet the dynamic grayscale threshold judgment condition: the clustering condition is |gray(x,y)-tarGray|≤target grayscale threshold, and any other point (x,y) is in the same connected region as the target point, where tarGray is the grayscale of the target point, and gray(x,y) is the grayscale of the pixel with coordinates (x,y) in the infrared grayscale heat map. Figure 3 As shown, the specific steps include: First, using the target point (x0, y0) and the target grayscale threshold, clustering conditions are determined to the left and right of the target point, exploring multiple first pixel points that satisfy the clustering conditions, until the leftmost point x that satisfies the clustering conditions is found. Left (x L1 ,y L1 And the rightmost point x that satisfies the clustering condition. Right (x R1 ,y R1 ), through point x Left and point x Right Calculate the pixel value Line0_pix of the target point. Next, using the target point as the baseline, perform upward and downward clustering respectively. The methods for downward and upward clustering are the same. Taking upward clustering as an example: increment the y-coordinate y0 of the target point by 1 to obtain a new point: the first target point x. Up1 (x0, y0+1), perform clustering condition checks to the left and right of the first target point respectively, explore multiple second pixel points that satisfy the clustering condition, until the leftmost point x that satisfies the clustering condition is found. Left (x L1 ,y L1 And the rightmost point x that satisfies the clustering condition. Right (x R1 ,y R1), through point x Left and point x Right The first target point x is calculated. Up1 The line pixel value is LineUp1_pix1. Finally, the calculated line pixel values Line0_pix, LineUp1_pix1, ..., LineDownm1_pix, ... are added together to obtain the pixel value of the target being measured.
[0076] The present invention will now be described in conjunction with specific embodiments:
[0077] Figure 5 This is a flowchart of a clustering method for infrared target pixels according to a specific embodiment of this application, as shown below. Figure 5 As shown, it includes the following steps:
[0078] S502, determine the conversion relationship between temperature and grayscale temperature of the infrared thermometer, and the target grayscale value Gs.
[0079] Using pre-installed temperature sensors in infrared thermometers, the internal and external temperatures of the infrared thermometers are sensed. Two sets of temperatures (i.e., other temperatures and calibration temperatures of the thermometers) are measured under real-time temperature conditions and normal temperature calibration conditions, including but not limited to ambient temperature, internal cavity temperature, and infrared focal plane temperature. The other temperatures are represented by Tc1, Tc2, and Tc3, respectively, and the calibration temperatures are represented by Th1c, Th2c, and Th3c, respectively.
[0080] Infrared temperature measurement equipment is calibrated against multiple standard blackbody radiation sources under a fixed ambient temperature environment to determine the conversion relationship between measured grayscale and measured temperature.
[0081] Infrared thermometers are used to detect the thermal radiation energy emitted by the target. Based on the magnitude of the thermal radiation energy, the thermal radiation energy is quantified and output in grayscale form to obtain the grayscale of the target point.
[0082] S504, Determine the sensitivity of the infrared thermometer to the target temperature under normal temperature calibration conditions.
[0083] Under the same ambient temperature, infrared thermometers output different grayscale values for targets at different temperatures. Therefore, it is necessary to dynamically change the clustering threshold (i.e., grayscale threshold) according to the different temperatures of the target.
[0084] Based on the conversion relationship between the measured grayscale and the measured temperature obtained in S502, and the target grayscale value Gs, the target temperature Ts corresponding to the target grayscale value is calculated.
[0085] To dynamically adjust the clustering threshold based on the different temperatures of the target object, the key lies in the sensitivity of the infrared thermometer to the target temperature, i.e., the grayscale value required for each degree change in the target temperature, denoted as .
[0086] The specific calculation method is as follows: in, This refers to the sensitivity of infrared thermometers to target temperature under normal temperature calibration conditions. Ts is the derivative of the function that converts the updated temperature value into a grayscale value, where Ts is the target temperature.
[0087] S506, based on the temperature calculation of the infrared temperature measuring device, obtains the correction function of the infrared temperature measuring device's sensitivity to the target temperature under different ambient temperatures.
[0088] Because the response of infrared thermometers changes with the ambient temperature, even if the actual temperature of the target is the same under different ambient temperatures, the grayscale values output will be inconsistent. Therefore, it is necessary to dynamically change the clustering threshold according to different ambient temperatures.
[0089] Based on the temperatures (Tc1, Tc2, Tc3) and Th1c, Th2c, Th3c) of two sets of infrared thermometers measured under real-time temperature and normal temperature calibration conditions, the correction function g(Th1,Th2,Th3) for the sensitivity of the infrared thermometers to the target temperature Ts under different ambient temperatures was calculated as follows:
[0090] g(Th1,Th2,Th3)=k1×(Th2-Th2c)×e |(Th3-Th3c)-(Th1-Th1c)| ,That
[0091] In the equation, Th1, Th2, and Th3 represent the ambient temperature, internal cavity temperature, and infrared focal plane temperature of the infrared thermometer under real-time temperature conditions, respectively; Th1c, Th2c, and Th3c represent the ambient temperature, internal cavity temperature, and infrared focal plane temperature of the infrared thermometer under normal temperature calibration conditions, respectively; k1 is the sensitivity coefficient, obtained by comparing the sensitivity of the infrared thermometer to the same target temperature with the temperature of the infrared thermometer under multiple different ambient temperatures, with a value range of [-0.002, 0.0005]; e is the base of the natural logarithm; and g(Th1, Th2, Th3) is the ratio of the difference between the target temperature sensitivity under different ambient temperatures and the target temperature sensitivity under normal temperature calibration conditions to the target temperature sensitivity under normal temperature calibration conditions, with a value range of [-1, 1].
[0092] S508 dynamically calculates the grayscale threshold for region clustering based on the temperature of the infrared thermometer, the target temperature sensitivity, and the correction function.
[0093] The dynamic threshold rules are as follows:
[0094]
[0095] Gthreshold is the grayscale threshold, and Ts is the target temperature. Th1 is the target temperature sensitivity, and g(Th1,Th2,Th3) is the correction function for the target temperature sensitivity. To round up c1、 c3 is the grayscale threshold coefficient, which can be selected as 5, 0.9, or 10. Tc1 and Tc2 are preset boundary temperature values, which can be selected as 60℃ or 100℃.
[0096] Infrared thermography target clustering can be completed by comparing the grayscale of the target point with the grayscale of any other point (x,y) to see if they meet the dynamic grayscale threshold judgment condition: the clustering condition is |gray(x,y)-tarGray|≤target grayscale threshold, and any other point (x,y) is in the same connected region as the target point, where tarGray is the grayscale of the target point, and gray(x,y) is the grayscale of the pixel with coordinates (x,y) in the infrared grayscale heat map. Figure 3 As shown, the specific steps include: First, using the target point (x0, y0) and the target grayscale threshold, clustering conditions are determined to the left and right of the target point, respectively, exploring multiple first pixel points that satisfy the clustering conditions, until the leftmost left boundary point x0 that satisfies the clustering conditions is found. Left (x L1 ,y L1 ) and the rightmost boundary point x that satisfies the clustering condition Right (x R1 ,y R1 ), through point x Left and point x Right Calculate the pixel value Line0_pix of the target point. Next, using the target point as the baseline, perform upward and downward clustering respectively. The methods for downward and upward clustering are the same. Taking upward clustering as an example: increment the y-coordinate y0 of the target point by 1 to obtain a new point: the first target point x. Up1 (x0, y0+1), perform clustering condition checks to the left and right of the first target point respectively, explore multiple second pixel points that satisfy the clustering condition, until the leftmost point x that satisfies the clustering condition is found. Left (x L1 ,y L1 And the rightmost point x that satisfies the clustering condition. Right (x R1 ,y R1 ), through point x Left and point x Right The first target point x is calculated. Up1The pixel value of the line in question is LineUp1_pix1. Finally, the calculated pixel values of all lines, Line0_pix, LineUp1_pix1, ..., LineDownm1_pix, ... are added together to obtain the pixel value of the target being measured. For the same target being measured, the results of threshold clustering for points at different temperatures using traditional fixed threshold rules and dynamic threshold rules are as follows: Figure 6 As shown, threshold clustering using dynamic threshold rules can obviously obtain more accurate pixel values of the target being measured.
[0097] This embodiment not only solves the problem of reduced temperature measurement accuracy and clustering accuracy of infrared thermometers under different ambient and target temperatures, but also significantly improves the adaptability and measurement efficiency of the thermometers by dynamically adjusting the grayscale threshold and introducing a sensitivity correction mechanism. In practical applications, such as temperature control monitoring in waste incineration plants, insulator detection in substations, and temperature monitoring of soldering iron tips, this method can significantly improve the temperature measurement accuracy and clustering accuracy of the equipment.
[0098] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0099] This embodiment also provides a clustering device for infrared target pixels, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the system described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0100] Figure 7 This is a structural block diagram of an infrared target pixel clustering device according to an embodiment of this application, as shown below. Figure 7 As shown, the device includes:
[0101] The first determining module 702 is used to determine the target temperature of the measured target point, wherein the target point is located on the temperature measuring object, and the temperature measuring object is an object whose temperature is measured by a temperature measuring device;
[0102] The second determining module 704 is used to determine the target temperature range where the target temperature is located from a plurality of pre-divided temperature ranges, and to determine the target grayscale threshold corresponding to the target temperature range, wherein the grayscale thresholds corresponding to different temperature ranges are different.
[0103] The first clustering module 706 is used to cluster pixels in the target image that correspond to multiple points on the temperature measuring object based on the target grayscale threshold and the grayscale of the target point, wherein the multiple points include the target point, and the target image is an image of the temperature measuring object.
[0104] In one exemplary embodiment, the apparatus further includes: a third determining module, configured to determine the calibration sensitivity of the temperature measuring device to the target temperature under a normal temperature calibration environment before determining the target grayscale threshold corresponding to the target temperature range, wherein the calibration sensitivity is used to indicate the change of the grayscale of the target point with the target temperature; a fourth determining module, configured to determine a correction function for the sensitivity of the temperature measuring device to the target temperature under other temperature environments; and a fifth determining module, configured to determine the grayscale threshold corresponding to each of the temperature ranges based on the calibration sensitivity and the correction function.
[0105] In an exemplary embodiment, the fifth determining module includes: for any temperature range included in the plurality of temperature ranges, determining a grayscale threshold corresponding to any of the temperature ranges in the following manner: a first determining submodule is used to determine a first grayscale threshold coefficient corresponding to a first temperature range, wherein the first temperature range is any of the temperature ranges, and the value of the first grayscale threshold coefficient is proportional to a predetermined temperature value included in the first temperature range; a second determining submodule is used to determine a first grayscale threshold corresponding to the first temperature range based on the calibration sensitivity, a first correction function of the sensitivity of the temperature measuring device to the target temperature in the first temperature range, and the first grayscale threshold coefficient.
[0106] In an exemplary embodiment, the second determining submodule includes: a first determining unit, configured to determine the first grayscale threshold by means of the following formula when the first temperature range is less than or equal to a first temperature threshold: Where c1 is the first grayscale threshold coefficient, g(Th1,Th2,Th3) is the first correction function, and Th1,Th2,Th3 are multiple temperatures corresponding to the temperature measuring device within the first temperature range. The above-mentioned calibration sensitivity, Ts is the above-mentioned target temperature, and Gs is the gray level of the above-mentioned target point; the second determining unit is used to determine the above-mentioned first gray level threshold by the following formula when the above-mentioned first temperature range is greater than the above-mentioned first temperature threshold and less than the second temperature threshold: in, is the first grayscale threshold coefficient mentioned above, g(Th1,Th2,Th3) is the first correction function mentioned above, and Th1,Th2,Th3 are multiple temperatures corresponding to the temperature measuring device under the first temperature range mentioned above. To round up The above-mentioned calibration sensitivity, Ts is the above-mentioned target temperature, and Gs is the gray level of the above-mentioned target point; the third determining unit is used to determine the above-mentioned first gray level threshold by the following formula when the above-mentioned first temperature range is greater than or equal to the above-mentioned second temperature threshold: Where c3 is the first grayscale threshold coefficient, g(Th1,Th2,Th3) is the first correction function, and Th1,Th2,Th3 are multiple temperatures corresponding to the temperature measuring device within the first temperature range. The above-mentioned calibration sensitivity, Ts is the above-mentioned target temperature, and Gs is the above-mentioned gray level of the target point.
[0107] In one exemplary embodiment, the fourth determining module includes: a third determining submodule, configured to determine the calibration temperature of the temperature measuring device under the aforementioned room temperature calibration environment, wherein the calibration temperature includes the first external ambient temperature of the temperature measuring device, the first internal cavity temperature of the temperature measuring device, and the first infrared focal plane temperature of the temperature measuring device; a fourth determining submodule, configured to determine other temperatures of the temperature measuring device under the aforementioned other temperature environments, wherein the other temperatures include the second external ambient temperature of the temperature measuring device, the second internal cavity temperature of the temperature measuring device, and the second infrared focal plane temperature of the temperature measuring device; and a fifth determining submodule, configured to determine the correction function based on the aforementioned calibration temperature and the aforementioned other temperatures.
[0108] In an exemplary embodiment, the fifth determining submodule includes a fourth determining unit, configured to determine the correction function g(Th1,Th2,Th3) using the following formula: g(Th1,Th2,Th3)=k1×(Th2-Th2c)×e |(Th3-Th3c)-(Th1-Th1c)| Wherein, k1 is the first coefficient used to indicate the sensitivity of the temperature measurement of the above-mentioned temperature measuring device, Th1c, Th2c, and Th3c are the first external ambient temperature, the first internal cavity temperature, and the first infrared focal plane temperature, respectively, and Th1, Th2, and Th3 are the second external ambient temperature, the second internal cavity temperature, and the second infrared focal plane temperature, respectively.
[0109] In an exemplary embodiment, the first clustering module includes: a sixth determining submodule, configured to determine multiple target pixels from the pixels of the multiple points, and cluster the multiple target pixels into one class, wherein the absolute value of the difference between the gray level of the target pixel and the gray level of the target point is less than or equal to the target gray level threshold, and the target pixel and the pixel of the target point are in the same connected domain; the device further includes: a first calculation module, configured to cluster the pixels in the target image corresponding to the multiple points on the temperature measuring object, and then calculate the sum of the pixel values of the target pixels and the pixel values of the target points to obtain the target pixel value of the target image.
[0110] In an exemplary embodiment, the sixth determining submodule includes: a first search unit, configured to search to the left and right of the target point, using the pixel of the target point as the origin, to obtain a first pixel, wherein the absolute value of the difference between the grayscale of the first pixel and the grayscale of the target point is less than or equal to the target grayscale threshold, and the first pixel and the pixel of the target point are in the same connected region; a second search unit, configured to search to the left and right of the first target point, using the pixel of the first target point as the origin, to obtain a second pixel, wherein the first target point is a pixel above and below the target point, the absolute value of the difference between the grayscale of the second pixel and the grayscale of the target point is less than or equal to the target grayscale threshold, and the second pixel and the pixel of the target point are in the same connected region; and a fifth determining unit, configured to determine the first pixel and the second pixel as the target pixel.
[0111] Embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0112] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when run.
[0113] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0114] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0115] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0116] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0117] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0118] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any updates, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the scope of protection of this application.
Claims
1. A clustering method for infrared target pixels, characterized in that, include: Determine the target temperature of the measured target point, wherein the target point is located on the object being measured, and the object being measured is the object whose temperature is measured by the temperature measuring device; The target temperature range containing the target temperature is determined from a pre-divided multiple temperature ranges, and the target grayscale threshold corresponding to the target temperature range is determined, wherein the grayscale thresholds corresponding to different temperature ranges are different; Based on the target grayscale threshold and the grayscale of the target point, the pixels in the target image that correspond to multiple points on the temperature measuring object are clustered, wherein the multiple points include the target point, and the target image is an image of the temperature measuring object; The step of clustering the pixels in the target image corresponding to multiple points on the temperature measuring object includes: determining multiple target pixels from the pixels of the multiple points, and clustering the multiple target pixels into one class, wherein the absolute value of the difference between the gray level of the target pixel and the gray level of the target point is less than or equal to the target gray level threshold, and the target pixel and the pixel of the target point are in the same connected component; after clustering the pixels in the target image corresponding to multiple points on the temperature measuring object, the method further includes: calculating the sum of the pixel values of the target pixels and the pixel values of the target points to obtain the target pixel value of the target image; The step of determining multiple target pixels from the pixels of the multiple points includes: using the pixels of the target point as the origin, searching to the left and right of the target point to obtain a first pixel, wherein the absolute value of the difference between the gray level of the first pixel and the gray level of the target point is less than or equal to the target gray level threshold, and the first pixel and the pixels of the target point are in the same connected component; using the pixels of the first target point as the origin, searching to the left and right of the first target point to obtain a second pixel, wherein the first target point is the pixel above and below the target point, the absolute value of the difference between the gray level of the second pixel and the gray level of the target point is less than or equal to the target gray level threshold, and the second pixel and the pixels of the target point are in the same connected component; and determining the first pixel and the second pixel as the target pixel.
2. The method according to claim 1, characterized in that, Before determining the target grayscale threshold corresponding to the target temperature range, the method further includes: The calibration sensitivity of the temperature measuring device to the target temperature is determined under normal temperature calibration conditions, wherein the calibration sensitivity is used to indicate the change of the gray level of the target point with the target temperature; Determine the correction function for the sensitivity of the temperature measuring device to the target temperature under other temperature environments; The grayscale threshold corresponding to each temperature range is determined based on the calibrated sensitivity and the correction function.
3. The method according to claim 2, characterized in that, Determining the grayscale threshold corresponding to each temperature range based on the calibrated sensitivity and the correction function includes: For any temperature range included in the plurality of temperature ranges, the grayscale threshold corresponding to any one of the temperature ranges is determined in the following manner: A first grayscale threshold coefficient corresponding to a first temperature range is determined, wherein the first temperature range is any of the temperature ranges, and the value of the first grayscale threshold coefficient is proportional to the predetermined temperature value included in the first temperature range. Based on the calibrated sensitivity, the first correction function of the sensitivity of the temperature measuring device to the target temperature in the first temperature range, and the first grayscale threshold coefficient, a first grayscale threshold corresponding to the first temperature range is determined.
4. The method according to claim 3, characterized in that, Based on the calibrated sensitivity, a first correction function for the sensitivity of the temperature measuring device to the target temperature within the first temperature range, and the first grayscale threshold coefficient, a first grayscale threshold corresponding to the first temperature range is determined, including: When the first temperature range is less than or equal to the first temperature threshold, the first grayscale threshold is determined by the following formula: First grayscale threshold = ,in, It is the first grayscale threshold coefficient. It is the first correction function. These are multiple temperatures corresponding to the temperature measuring device within the first temperature range. This is the calibration sensitivity. It is the target temperature. It is the grayscale value of the target point; When the first temperature range is greater than the first temperature threshold and less than the second temperature threshold, the first grayscale threshold is determined by the following formula: First grayscale threshold = ,in, It is the first grayscale threshold coefficient. It is the first correction function. These are multiple temperatures corresponding to the temperature measuring device within the first temperature range. To round up , This is the calibration sensitivity. It is the target temperature. It is the grayscale value of the target point; When the first temperature range is greater than or equal to the second temperature threshold, the first grayscale threshold is determined by the following formula: First grayscale threshold = ,in, It is the first grayscale threshold coefficient. It is the first correction function. These are multiple temperatures corresponding to the temperature measuring device within the first temperature range. This is the calibration sensitivity. It is the target temperature. It is the grayscale value of the target point.
5. The method according to claim 2, characterized in that, Determine the correction function for the sensitivity of the temperature measuring device to the target temperature under other temperature environments, including: The calibration temperature of the temperature measuring device is determined under the ambient temperature calibration environment, wherein the calibration temperature includes the first external ambient temperature of the temperature measuring device, the first internal cavity temperature of the temperature measuring device, and the first infrared focal plane temperature of the temperature measuring device. Determine other temperatures of the temperature measuring device under the other temperature environment, wherein the other temperatures include the second external ambient temperature of the temperature measuring device, the second internal cavity temperature of the temperature measuring device, and the second infrared focal plane temperature of the temperature measuring device; The correction function is determined based on the calibration temperature and the other temperatures.
6. The method according to claim 5, characterized in that, Determining the correction function based on the calibration temperature and the other temperatures includes: The correction function is determined by the following formula. : ,in, It is the first coefficient, used to indicate the sensitivity of the temperature measurement of the temperature measuring device. , , These are the first external ambient temperature, the first internal cavity temperature, and the first infrared focal plane temperature, respectively. , , These are the second external ambient temperature, the second internal cavity temperature, and the second infrared focal plane temperature, respectively.
7. A clustering device for infrared target pixels, characterized in that, include: The first determining module is used to determine the target temperature of the measured target point, wherein the target point is located on the temperature measuring object, and the temperature measuring object is the object whose temperature is measured by the temperature measuring device; The second determining module is used to determine the target temperature range where the target temperature is located from a plurality of pre-divided temperature ranges, and to determine the target grayscale threshold corresponding to the target temperature range, wherein different temperature ranges correspond to different grayscale thresholds. The first clustering module is used to cluster pixels in the target image that correspond to multiple points on the temperature measuring object based on the target grayscale threshold and the grayscale of the target point, wherein the multiple points include the target point, and the target image is an image of the temperature measuring object; The first clustering module includes: a sixth determining submodule, configured to determine multiple target pixels from the pixels of the multiple points, and cluster the multiple target pixels into one class, wherein the absolute value of the difference between the gray level of the target pixel and the gray level of the target point is less than or equal to the target gray level threshold, and the target pixel and the pixel of the target point are in the same connected region; the device further includes: a first calculation module, configured to cluster the pixels in the target image corresponding to the multiple points on the temperature measuring object, and then calculate the sum of the pixel values of the target pixels and the pixel values of the target points to obtain the target pixel value of the target image; The sixth determining submodule includes: a first search unit, configured to search to the left and right of the target point, using the pixel of the target point as the origin, to obtain a first pixel, wherein the absolute value of the difference between the gray level of the first pixel and the gray level of the target point is less than or equal to the target gray level threshold, and the first pixel and the pixel of the target point are in the same connected component; a second search unit, configured to search to the left and right of the first target point, using the pixel of the first target point as the origin, to obtain a second pixel, wherein the first target point is the pixel above and below the target point, the absolute value of the difference between the gray level of the second pixel and the gray level of the target point is less than or equal to the target gray level threshold, and the second pixel and the pixel of the target point are in the same connected component; and a fifth determining unit, configured to determine the first pixel and the second pixel as the target pixel.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 6.
Citation Information
Patent Citations
Infrared thermal imaging temperature measurement method
CN112665727A
Infrared thermal imaging superpixel segmentation fusion method and system, medium and computer
CN115661017A