Infrared target pixel point clustering method and device and storage medium
By dividing the temperature intervals in the infrared temperature measurement equipment and dynamically adjusting the grayscale threshold, the problem of inaccurate clustering of infrared target pixels under ambient temperature fluctuations is solved, and accurate clustering and high-precision temperature measurement are achieved in different temperature environments.
Patent Information
- Application Number
- CN202511010305.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2025-09-23
AI Technical Summary
In the existing technology, infrared temperature measurement equipment cannot accurately cluster infrared target pixels under ambient temperature fluctuations, mainly because the fixed grayscale threshold cannot adapt to the uneven temperature distribution of the measured target, resulting in inaccurate clustering.
By pre-dividing the temperature intervals, determining the corresponding target grayscale threshold according to the target temperature, and dynamically adjusting the grayscale threshold using the calibration sensitivity and correction function, dynamic clustering of pixels in the target image can be achieved.
It achieves accurate clustering of infrared target pixels under different temperature environments, improves the temperature measurement accuracy and clustering accuracy of the temperature measurement equipment, and avoids measurement errors and information loss caused by ambient temperature fluctuations.
Smart Images

Figure CN120689642A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of infrared thermal imaging technology, and more specifically, to a clustering method and device for infrared target pixel points, and a storage medium. Background Art
[0002] Infrared temperature measurement equipment, due to its non-contact temperature measurement advantage, measures the temperature of the target object by capturing infrared radiation and converting it into a grayscale image. However, fluctuations in ambient temperature can cause changes in the response characteristics of the infrared detector. In order to ensure the temperature measurement accuracy of the infrared temperature measurement equipment, the temperature measurement value can be compensated accordingly based on the pixel value of the target being measured. When determining the pixel value of the target being measured through clustering operations, related technologies mostly use a fixed grayscale threshold for clustering. The grayscale threshold setting is not flexible enough. Since the temperature distribution of the target being measured is uneven, the corresponding grayscale values are also different. The use of a clustering method with a fixed grayscale threshold makes it impossible to accurately cluster the pixels. Summary of the Invention
[0003] The embodiments of the present application provide a method and device for clustering infrared target pixels, and a storage medium, to at least solve the problem in the related art that infrared target pixels cannot be accurately clustered.
[0004] According to one embodiment of the present application, a clustering method for infrared target pixel points is provided, including: determining a target temperature of a measured target point, wherein the target point is located on a temperature measurement object, and the temperature measurement object is an object whose temperature is measured by a temperature measurement device; determining a target temperature interval in which the target temperature is located from a plurality of pre-divided temperature intervals, and determining a target grayscale threshold corresponding to the target temperature interval, wherein different temperature intervals correspond to different grayscale thresholds; based on the target grayscale threshold and the grayscale of the target point, clustering pixel points included in a target image corresponding to a plurality of points on the temperature measurement object, wherein the plurality of points include the target point, and the target image is an image of the temperature measurement object.
[0005] In an exemplary embodiment, before determining the target grayscale threshold corresponding to the above-mentioned target temperature range, the above-mentioned method also includes: determining the calibration sensitivity of the above-mentioned temperature measuring device to the above-mentioned target temperature under a normal temperature calibration environment, wherein the above-mentioned calibration sensitivity is used to indicate the change of the grayscale of the above-mentioned target point with the above-mentioned target temperature; determining a correction function of the sensitivity of the above-mentioned temperature measuring device to the above-mentioned target temperature under other temperature environments; and determining the grayscale threshold corresponding to each of the above-mentioned temperature ranges based on the above-mentioned calibration sensitivity and the above-mentioned correction function.
[0006] In an exemplary embodiment, the grayscale threshold corresponding to each of the above-mentioned temperature intervals is determined based on the above-mentioned calibration sensitivity and the above-mentioned correction function, including: for any temperature interval included in the multiple temperature intervals, the grayscale threshold corresponding to any of the above-mentioned temperature intervals is determined in the following manner: determining a first grayscale threshold coefficient corresponding to the first temperature interval, wherein the above-mentioned first temperature interval is any of the above-mentioned temperature intervals, and the value of the above-mentioned first grayscale threshold coefficient is proportional to the predetermined temperature value included in the above-mentioned first temperature interval; determining the first grayscale threshold corresponding to the above-mentioned first temperature interval based on the above-mentioned calibration sensitivity, the first correction function of the sensitivity of the above-mentioned temperature measuring device to the above-mentioned target temperature in the above-mentioned first temperature interval, and the above-mentioned first grayscale threshold coefficient.
[0007] In an exemplary embodiment, determining a first grayscale threshold corresponding to the first temperature interval based on the calibrated sensitivity, a first correction function of the sensitivity of the temperature measuring device to the target temperature in the first temperature interval, and the first grayscale threshold coefficient includes: when the first temperature interval is less than or equal to the first temperature threshold, determining the first grayscale threshold by the following formula: Wherein, c1 is the first grayscale threshold coefficient, g(Th1, Th2, Th3) is the first correction function, Th1, Th2, Th3 are multiple temperatures corresponding to the temperature measuring device in the first temperature range, is the calibration sensitivity, Ts is the target temperature, and Gs is the grayscale of the target point. When the first temperature interval is greater than the first temperature threshold and less than the second temperature threshold, the first grayscale threshold is determined by the following formula: in, is the first grayscale threshold coefficient, g(Th1, Th2, Th3) is the first correction function, Th1, Th2, Th3 are multiple temperatures corresponding to the temperature measuring device in the first temperature range, To round up is the calibration sensitivity, Ts is the target temperature, and Gs is the grayscale of the target point. When the first temperature interval is greater than or equal to the second temperature threshold, the first grayscale threshold is determined by the following formula: Wherein, c3 is the first grayscale threshold coefficient, g(Th1, Th2, Th3) is the first correction function, Th1, Th2, Th3 are multiple temperatures corresponding to the temperature measuring device in the first temperature range, is the calibration sensitivity, Ts is the target temperature, and Gs is the grayscale of the target point.
[0008] In an 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 normal temperature calibration environment, wherein the calibration temperature includes the first external environment 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; determining other temperatures of the temperature measuring device under the other temperature environments, wherein the other temperatures include the second external environment 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 determining the correction function based on the calibration temperature and the other temperatures.
[0009] In an exemplary embodiment, based on the calibration temperature and the other temperatures, determining the correction function includes: determining the correction function g(Th1, Th2, Th3) by the following formula: g(Th1, Th2, Th3) = k1 × (Th2-Th2c) × e |(Th3-Th3c)-(Th1-Th1c)| , where 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 above-mentioned first external environment temperature, the above-mentioned first inner cavity temperature, and the above-mentioned first infrared focal plane temperature, respectively; Th1, Th2, and Th3 are the above-mentioned second external environment temperature, the above-mentioned second inner cavity temperature, and the above-mentioned second infrared focal plane temperature, respectively.
[0010] In an exemplary embodiment, the pixel points included in the target image and corresponding to the multiple points on the above-mentioned temperature measurement object are clustered, including: determining multiple target pixel points from the pixel points of the above-mentioned multiple points, and clustering the multiple target pixel points into one category, wherein the absolute value of the difference between the grayscale of the above-mentioned target pixel point and the grayscale of the above-mentioned target point is less than or equal to the above-mentioned target grayscale threshold, and the above-mentioned target pixel point and the pixel point of the above-mentioned target point are in the same connected domain; after clustering the pixel points included in the target image and corresponding to the multiple points on the above-mentioned temperature measurement object, the above-mentioned method further includes: calculating the sum of the pixel value of the above-mentioned target pixel point and the pixel value of the pixel point of the above-mentioned target point to obtain the target pixel value of the above-mentioned target image.
[0011] In an exemplary embodiment, multiple target pixel points are determined from the pixel points of the above-mentioned multiple points, including: taking the pixel point of the above-mentioned target point as the origin, searching to the left and right sides of the above-mentioned target point to obtain a first pixel point, wherein the absolute value of the difference between the grayscale of the above-mentioned first pixel point and the grayscale of the above-mentioned target point is less than or equal to the above-mentioned target grayscale threshold, and the first pixel point and the pixel point of the above-mentioned target point are in the same connected domain; taking the pixel point of the first target point as the origin, searching to the left and right sides of the above-mentioned first target point to obtain a second pixel point, wherein the above-mentioned first target point is the pixel point above and below the above-mentioned target point, the absolute value of the difference between the grayscale of the above-mentioned second pixel point and the grayscale of the above-mentioned target point is less than or equal to the above-mentioned target grayscale threshold, and the second pixel point and the pixel point of the above-mentioned target point are in the same connected domain; the above-mentioned first pixel point and the above-mentioned second pixel point are determined as the above-mentioned target pixel points.
[0012] According to another embodiment of the present application, a clustering device for infrared target pixel points is provided, including: a first determination module, used to determine the target temperature of a measured target point, wherein the target point is located on a temperature measurement object, and the temperature measurement object is an object whose temperature is measured by a temperature measurement device; a second determination module, used to determine the target temperature interval in which the target temperature is located 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; a first clustering module, used to cluster pixel points included in a target image corresponding to a plurality of points on the temperature measurement 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 measurement object.
[0013] In an exemplary embodiment, the above-mentioned device also includes: a third determination module, which is used to determine the calibration sensitivity of the above-mentioned temperature measuring device to the above-mentioned target temperature under a normal temperature calibration environment before determining the target grayscale threshold corresponding to the above-mentioned target temperature range, wherein the above-mentioned calibration sensitivity is used to indicate the change of the grayscale of the above-mentioned target point with the above-mentioned target temperature; a fourth determination module, which is used to determine the correction function of the sensitivity of the above-mentioned temperature measuring device to the above-mentioned target temperature under other temperature environments; and a fifth determination module, which is used to determine the grayscale threshold corresponding to each of the above-mentioned temperature ranges based on the above-mentioned calibration sensitivity and the above-mentioned correction function.
[0014] In an exemplary embodiment, the above-mentioned fifth determination module includes: for any temperature interval included in the multiple temperature intervals, the grayscale threshold corresponding to any of the above-mentioned temperature intervals is determined in the following manner: a first determination submodule, used to determine the first grayscale threshold coefficient corresponding to the first temperature interval, wherein the above-mentioned first temperature interval is any of the above-mentioned temperature intervals, and the value of the above-mentioned first grayscale threshold coefficient is proportional to the predetermined temperature value included in the above-mentioned first temperature interval; a second determination submodule, used to determine the first grayscale threshold corresponding to the above-mentioned first temperature interval based on the above-mentioned calibration sensitivity, the first correction function of the sensitivity of the above-mentioned temperature measuring device to the above-mentioned target temperature in the above-mentioned first temperature interval, and the above-mentioned first grayscale threshold coefficient.
[0015] In an exemplary embodiment, the second determination submodule includes: a first determination unit, configured to determine the first grayscale threshold by using the following formula when the first temperature range is less than or equal to the first temperature threshold: Wherein, c1 is the first grayscale threshold coefficient, g(Th1, Th2, Th3) is the first correction function, Th1, Th2, Th3 are multiple temperatures corresponding to the temperature measuring device in the first temperature range, is the calibration sensitivity, Ts is the target temperature, and Gs is the grayscale of the target point; a second determining unit is configured to determine the first grayscale threshold by the following formula when the first temperature interval is greater than the first temperature threshold and less than the second temperature threshold: in, is the first grayscale threshold coefficient, g(Th1, Th2, Th3) is the first correction function, Th1, Th2, Th3 are multiple temperatures corresponding to the temperature measuring device in the first temperature range, To round up is the calibration sensitivity, Ts is the target temperature, and Gs is the grayscale of the target point; a third determining unit is configured to determine the first grayscale threshold by the following formula when the first temperature interval is greater than or equal to the second temperature threshold: Wherein, c3 is the first grayscale threshold coefficient, g(Th1, Th2, Th3) is the first correction function, Th1, Th2, Th3 are multiple temperatures corresponding to the temperature measuring device in the first temperature range, is the calibration sensitivity, Ts is the target temperature, and Gs is the grayscale of the target point.
[0016] In an exemplary embodiment, the above-mentioned fourth determination module includes: a third determination submodule, used to determine the calibration temperature of the above-mentioned temperature measuring device under the above-mentioned normal temperature calibration environment, wherein the above-mentioned calibration temperature includes the first external environment temperature of the above-mentioned temperature measuring device, the first internal cavity temperature of the above-mentioned temperature measuring device, and the first infrared focal plane temperature of the above-mentioned temperature measuring device; a fourth determination submodule, used to determine other temperatures of the above-mentioned temperature measuring device under the above-mentioned other temperature environments, wherein the above-mentioned other temperatures include the second external environment temperature of the above-mentioned temperature measuring device, the second internal cavity temperature of the above-mentioned temperature measuring device, and the second infrared focal plane temperature of the above-mentioned temperature measuring device; a fifth determination submodule, used to determine the above-mentioned correction function based on the above-mentioned calibration temperature and the above-mentioned other temperatures.
[0017] In an exemplary embodiment, the fifth determination submodule includes: a fourth determination unit, configured to determine the correction function g(Th1, Th2, Th3) by the following formula: g(Th1, Th2, Th3) = k1×(Th2-Th2c)×e |(Th3-Th3c)-(Th1-Th1c)| , where 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 above-mentioned first external environment temperature, the above-mentioned first inner cavity temperature, and the above-mentioned first infrared focal plane temperature, respectively; Th1, Th2, and Th3 are the above-mentioned second external environment temperature, the above-mentioned second inner cavity temperature, and the above-mentioned second infrared focal plane temperature, respectively.
[0018] In an exemplary embodiment, the above-mentioned first clustering module includes: a sixth determination submodule, which is used to determine multiple target pixel points from the pixel points of the above-mentioned multiple points, and cluster the multiple target pixel points into one category, wherein the absolute value of the difference between the grayscale of the above-mentioned target pixel point and the grayscale of the above-mentioned target point is less than or equal to the above-mentioned target grayscale threshold, and the above-mentioned target pixel point and the pixel point of the above-mentioned target point are in the same connected domain; the above-mentioned device also includes: a first calculation module, which is used to cluster the pixel points included in the target image corresponding to the multiple points on the above-mentioned temperature measurement object, and then calculate the sum of the pixel value of the above-mentioned target pixel point and the pixel value of the pixel point of the above-mentioned target point to obtain the target pixel value of the above-mentioned target image.
[0019] In an exemplary embodiment, the sixth determination submodule includes: a first search unit, which is used to take the pixel point of the target point as the origin and search to the left and right sides of the target point to obtain a first pixel point, wherein the absolute value of the difference between the grayscale of the first pixel point and the grayscale of the target point is less than or equal to the target grayscale threshold, and the first pixel point and the pixel point of the target point are in the same connected domain; a second search unit, which is used to take the pixel point of the first target point as the origin and search to the left and right sides of the first target point to obtain a second pixel point, wherein the first target point is the pixel point above and below the target point, the absolute value of the difference between the grayscale of the second pixel point and the grayscale of the target point is less than or equal to the target grayscale threshold, and the second pixel point and the pixel point of the target point are in the same connected domain; a fifth determination unit, which is used to determine the first pixel point and the second pixel point as the target pixel point.
[0020] According to another embodiment of the present application, a computer program product is provided, including a computer program, where the computer program is configured to enable a processor to execute the steps of any of the above method embodiments.
[0021] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to enable a processor to execute the steps in any one of the above method embodiments.
[0022] According to another embodiment of the present application, an electronic device is also provided, including a memory, a processor, and a computer program stored on the above-mentioned memory and executable on the above-mentioned processor, wherein the above-mentioned processor is configured to execute the above-mentioned computer program to perform the steps in any one of the above-mentioned method embodiments.
[0023] Through this application, multiple temperature intervals are pre-divided, and based on the target temperature of the target point on the temperature measurement object, the target temperature interval in which the target temperature is located is determined, so that targeted processing is performed on different temperature intervals, and the target grayscale threshold corresponding to the target temperature interval is determined. Finally, based on the target grayscale threshold corresponding to the target temperature and the grayscale value of the target point, the pixel points in the target image are dynamically clustered, which solves the problem in related technologies that infrared target pixel points cannot be accurately clustered, and achieves the effect of accurately clustering infrared target pixel points. BRIEF DESCRIPTION OF THE DRAWINGS
[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 the present application;
[0025] Figure 2is a flow chart of a clustering method for infrared target pixels according to an embodiment of the present application;
[0026] Figure 3 is a schematic diagram of a clustering method for infrared target pixels according to an embodiment of the present application;
[0027] Figure 4 This is a schematic diagram of a clustering method for infrared target pixels in a specific embodiment of the present application. Figure 1 ;
[0028] Figure 5 This is a flow chart of a clustering method for infrared target pixels according to a specific embodiment of the present application;
[0029] Figure 6 This is a schematic diagram of a clustering method for infrared target pixels in a specific embodiment of the present application. Figure 2 ;
[0030] Figure 7 This is a structural block diagram of a device for clustering infrared target pixels according to an embodiment of the present application. DETAILED DESCRIPTION
[0031] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0032] It should be noted that the terms "first", "second", etc. in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0033] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a 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 clustering infrared target pixel points according to an embodiment of the present application. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0034] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the infrared target pixel clustering method in the embodiment of the present application. The processor 102 executes the computer program stored in the memory 104 to execute various functional applications and data processing, thereby implementing the above-mentioned 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 examples, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0035] The transmission device 106 is used to receive or send data via a network. A specific example of the aforementioned network may include a wireless network provided by the mobile terminal's communications provider. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0036] In this embodiment, a clustering method for infrared target pixels is provided. Figure 2 is a flow chart of a clustering method of infrared target pixels according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:
[0037] Step S202 , determining a target temperature of a measured target point, wherein the target point is located on a temperature measurement object, and the temperature measurement object is an object whose temperature is measured by a temperature measurement device.
[0038] Optionally, the temperature measurement object is the actual object or area where the infrared temperature measurement device measures the temperature. This can be any object that can emit infrared radiation, including but not limited to industrial equipment, buildings, human bodies, forests, etc. The temperature measurement object 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 temperature measuring gun, and an infrared temperature measuring system.
[0040] Optionally, the target point is one or more infrared temperature measurement feature target points located on the temperature measurement object, also known as points of interest, including but not limited to the global highest temperature point, the global lowest temperature point, the regional highest temperature point, the regional lowest temperature point, the line highest temperature point, the line lowest temperature point, and a 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 grayscale of the target point; and calculating the target temperature corresponding to the grayscale of the target point based on the conversion relationship between grayscale and temperature, wherein the conversion relationship between grayscale and temperature can be obtained by calibrating the infrared temperature measuring equipment under a fixed ambient temperature environment with respect to multiple standard blackbody radiation sources.
[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 of the target point; and calculating the target temperature corresponding to the target grayscale value through an infrared temperature measurement algorithm based on the ambient temperature Th1c, the inner cavity temperature Th2c, the infrared focal plane temperature Th3c, and the target grayscale value Gs of the infrared temperature measuring device under a normal temperature calibration environment. For example, at this time, the ambient temperature is 23°C, the inner cavity temperature is 25°C, the infrared focal plane temperature is 27°C, and the reference grayscale is 4096, where the reference grayscale is the standard for calculating the grayscale difference, which is related to the response and parameters of the infrared temperature measuring device. The narrower the temperature measurement range, the larger the reference grayscale, and the larger the temperature measurement range, the smaller the reference grayscale. As shown in Table 1, Table 1 is the temperature data collected by the infrared temperature measuring device:
[0043]
[0044]
[0045] Among them, taking the first row as an example: the temperature value 10°C is the temperature value measured by the infrared temperature measuring device, the grayscale value 3921 is the grayscale value corresponding to 10°C, 10°C-20°C is the temperature difference between 10°C and 20°C of the infrared temperature measuring device, and the grayscale difference value 100 is the grayscale difference between 10°C and 20°C of the infrared temperature measuring device when the ambient temperature is 24°C, that is, 4021-3921=100.
[0046] When the ambient temperature is 23°C, the inner cavity temperature is 25°C, the reference grayscale is 4096, and the target grayscale measured by the infrared temperature measuring device is 4360, the inner cavity temperature is between 20°C and 30°C. The target temperature is: 4360-4096=264>75, 264-75=189<200, 25+5+189 / 200*10=39.45°C.
[0047] Step S204 , determining a target temperature interval in which the target temperature is located from a plurality of pre-divided temperature intervals, and determining a target grayscale threshold corresponding to the target temperature interval, wherein different temperature intervals correspond to different grayscale thresholds.
[0048] Optionally, the temperature interval refers to a number of continuous or discontinuous temperature segments into which the temperature measurement range is divided according to a certain standard. By dividing the temperature intervals, target points of different temperatures can be associated with specific grayscale thresholds.
[0049] Optionally, the target grayscale threshold is the 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 grayscale thresholds corresponding to different temperature ranges. This dynamically adapts to the grayscale representation of the temperature measurement object in the target image under different temperature conditions. Setting the target grayscale threshold is crucial for accurate pixel identification and clustering, ensuring that only pixels that match the target temperature are classified as part of the temperature measurement object.
[0050] Step S206: Clustering the pixel points in the target image corresponding to the plurality of points on the temperature measurement 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 measurement object.
[0051] Optionally, the target image may be an infrared grayscale thermal image of the temperature measurement object.
[0052] In this embodiment, the execution subject of 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 from the terminal or server, but is not limited thereto.
[0053] Through the above steps, multiple temperature intervals are pre-divided, and based on the target temperature of the target point on the temperature measurement object, the target temperature interval in which the target temperature is located is determined, so that targeted processing is performed on different temperature intervals, and the target grayscale threshold corresponding to the target temperature interval is determined. Finally, based on the target grayscale threshold corresponding to the target temperature and the grayscale value of the target point, the pixel points in the target image are dynamically clustered, which solves the problem in related technologies that infrared target pixels cannot be accurately clustered, and achieves the effect of accurately clustering infrared target pixels.
[0054] In an exemplary embodiment, before determining the target grayscale threshold corresponding to the above-mentioned target temperature range, the above-mentioned method also includes: determining the calibration sensitivity of the above-mentioned temperature measuring device to the above-mentioned target temperature under a normal temperature calibration environment, wherein the above-mentioned calibration sensitivity is used to indicate the change of the grayscale of the above-mentioned target point with the above-mentioned target temperature; determining a correction function of the sensitivity of the above-mentioned temperature measuring device to the above-mentioned target temperature under other temperature environments; and determining the grayscale threshold corresponding to each of the above-mentioned temperature ranges based on the above-mentioned calibration sensitivity and the above-mentioned correction function.
[0055] Optionally, the calibrated sensitivity indicates the change in the grayscale value output by the temperature measurement device for each degree change in the target temperature. For example, in a waste incineration plant temperature monitoring system, the calibrated sensitivity of the infrared temperature measurement device at a constant temperature of 25°C is 25 grayscale units / °C. This means that in this environment, if the target temperature rises from 45°C to 46°C, the grayscale value at the target point will theoretically increase by 25 grayscale units. This calibrated sensitivity provides the basis for subsequent temperature measurement and compensation.
[0056] Optionally, a correction function is used to adjust the calibrated sensitivity to adapt to different ambient temperatures or changes in the state of the temperature measuring device. Due to factors such as ambient temperature and device thermal drift, the sensitivity obtained in the calibration environment may no longer be applicable to other temperature environments. The correction function dynamically adjusts the sensitivity by mathematically modeling these environmental changes to ensure the consistency and accuracy of measurement results under different conditions. For example, in the above-mentioned incineration plant scenario, if the ambient temperature drops to 5°C, the correction function may adjust the sensitivity to 30 grayscale units / °C. This is because in a low-temperature environment, the thermal radiation of the object changes, and the energy received by the infrared detector also changes accordingly. The correction function calculates the relationship between the ambient temperature change and the sensitivity, and adjusts the grayscale change to maintain the accuracy of the temperature measurement. Similarly, if the ambient temperature rises to 40°C, the correction function may adjust the sensitivity to 20 grayscale units / °C to account for the impact of high temperature on thermal radiation and detector response.
[0057] Optionally, other temperature environments are various environmental conditions other than the normal temperature calibration environment.
[0058] In this embodiment, the temperature measuring device can accurately quantify the impact of temperature changes on grayscale values through the calibration sensitivity determined in a normal temperature calibration environment. At the same time, the introduction of the correction function enables the temperature measuring device to adjust its temperature measurement sensitivity according to real-time ambient temperature changes. This dynamic adjustment capability enables the temperature measuring device to maintain high-precision temperature measurement in different environments, avoiding measurement errors caused by ambient temperature fluctuations. Furthermore, based on the calibration sensitivity and the grayscale threshold determined by the correction function, the pixels in the target image can be more accurately classified, and the pixels belonging to the same temperature target can be classified into one category, thereby achieving the purpose of avoiding the loss or misjudgment of target information due to improper threshold setting.
[0059] In an exemplary embodiment, the grayscale threshold corresponding to each of the above-mentioned temperature intervals is determined based on the above-mentioned calibration sensitivity and the above-mentioned correction function, including: for any temperature interval included in the multiple temperature intervals, the grayscale threshold corresponding to any of the above-mentioned temperature intervals is determined in the following manner: determining a first grayscale threshold coefficient corresponding to the first temperature interval, wherein the above-mentioned first temperature interval is any of the above-mentioned temperature intervals, and the value of the above-mentioned first grayscale threshold coefficient is proportional to the predetermined temperature value included in the above-mentioned first temperature interval; determining the first grayscale threshold corresponding to the above-mentioned first temperature interval based on the above-mentioned calibration sensitivity, the first correction function of the sensitivity of the above-mentioned temperature measuring device to the above-mentioned target temperature in the above-mentioned first temperature interval, and the above-mentioned first grayscale threshold coefficient.
[0060] Optionally, in low-temperature ranges, since temperature changes have a smaller impact on grayscale, the first grayscale threshold coefficient is lower, thus ensuring clustering accuracy. In contrast, in high-temperature ranges, since temperature changes have a greater impact on grayscale, the first grayscale threshold coefficient is higher, thus avoiding mis-clustering caused by large grayscale variations in high-temperature environments. This approach solves the problem of inaccurate clustering caused by the fixed grayscale threshold across different temperature ranges in traditional infrared temperature measurement equipment, thereby improving the device's temperature measurement accuracy and clustering accuracy.
[0061] In an exemplary embodiment, determining a first grayscale threshold corresponding to the first temperature interval based on the calibrated sensitivity, a first correction function of the sensitivity of the temperature measuring device to the target temperature in the first temperature interval, and the first grayscale threshold coefficient includes: when the first temperature interval is less than or equal to the first temperature threshold, determining the first grayscale threshold by the following formula: Wherein, c1 is the first grayscale threshold coefficient, g(Th1, Th2, Th3) is the first correction function, Th1, Th2, Th3 are multiple temperatures corresponding to the temperature measuring device in the first temperature range, is the calibration sensitivity, Ts is the target temperature, and Gs is the grayscale of the target point. When the first temperature interval is greater than the first temperature threshold and less than the second temperature threshold, the first grayscale threshold is determined by the following formula: in, is the first grayscale threshold coefficient, g(Th1, Th2, Th3) is the first correction function, Th1, Th2, Th3 are multiple temperatures corresponding to the temperature measuring device in the first temperature range, Round up is the calibration sensitivity, Ts is the target temperature, and Gs is the grayscale of the target point. When the first temperature interval is greater than or equal to the second temperature threshold, the first grayscale threshold is determined by the following formula: Wherein, c3 is the first grayscale threshold coefficient, g(Th1, Th2, Th3) is the first correction function, Th1, Th2, Th3 are multiple temperatures corresponding to the temperature measuring device in the first temperature range, is the calibration sensitivity, Ts is the target temperature, and Gs is the grayscale of the target point.
[0062] Optionally, in, It is the sensitivity of infrared temperature measuring equipment to target temperature under normal temperature calibration environment. The derivative of the grayscale value function is converted to the updated temperature value, and Ts is the target temperature.
[0063] This embodiment distinguishes different intervals of target temperature (such as low temperature, medium temperature and high temperature), and the temperature measuring device can adopt the grayscale threshold calculation formula that is most suitable for the interval, thereby ensuring that the temperature measuring device can maintain the best temperature measurement accuracy in any temperature range. At the same time, a correction function is introduced into the formula. The correction function can be adjusted according to the ambient temperature, inner cavity temperature and infrared focal plane temperature of the temperature measuring device. No matter what environmental conditions the device is in, the grayscale threshold can be dynamically adjusted through the correction function, thereby achieving the purpose of ensuring the accuracy of the clustering operation. Furthermore. Different grayscale threshold coefficients and rounding-up operations make the setting of grayscale thresholds more flexible. This flexibility not only allows the device to adapt to different temperature measurement requirements, but also increases the robustness of the system, and can maintain stability and accuracy even in an environment with rapidly changing temperatures.
[0064] In an 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 normal temperature calibration environment, wherein the calibration temperature includes the first external environment 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; determining other temperatures of the temperature measuring device under the other temperature environments, wherein the other temperatures include the second external environment 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 determining the correction function based on the calibration temperature and the other temperatures.
[0065] In an exemplary embodiment, based on the calibration temperature and the other temperatures, determining the correction function includes: determining the correction function g(Th1, Th2, Th3) by the following formula: g(Th1, Th2, Th3) = k1 × (Th2-Th2c) × e |(Th3-Th3c)-(Th1-Th1c)| , where 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 above-mentioned first external environment temperature, the above-mentioned first inner cavity temperature, and the above-mentioned first infrared focal plane temperature, respectively; Th1, Th2, and Th3 are the above-mentioned second external environment temperature, the above-mentioned second inner cavity temperature, and the above-mentioned second infrared focal plane temperature, respectively.
[0066] Optionally, k1 can be obtained by fitting the temperature measured by the temperature measuring device for the same target at different ambient temperatures. For example, let (Th2-Th2c)×e |(Th3-Th3c)-(Th1-Th1c)|For variable x, at an ambient temperature of 23°C, the inner cavity temperature is 25°C, the infrared focal plane temperature is 27°C, the sensitivity of the temperature measuring device to the target at 45°C is 25, the variable x is 0, g(Th1, Th2, Th3) is (25-25) / 25=0; at an ambient temperature of 0°C, the inner cavity temperature is 1°C, the infrared focal plane temperature is 2°C, the sensitivity of the temperature measuring device to the target at 45°C is 30, the variable x is -185.482, g(Th1, Th2, Th3) is (30-25) / 25=0.2; when the ambient temperature is -20°C, the inner cavity temperature is -19.5°C, the infrared focal plane temperature is The temperature is 19°C, the sensitivity of the temperature measuring device to the target at 45°C 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°C, the inner cavity temperature is 53°C, and the infrared focal plane temperature is 56°C. The sensitivity of the temperature measuring device to the target at 45°C is 18, the variable x is 216.395, and g(Th1, Th2, Th3) is (18-25) / 25=-0.28. By fitting the variable x and g(Th1, Th2, Th3), the sensitivity coefficient k1 can be obtained as -0.001251, as shown in the following example: Figure 4 shown.
[0067] Optionally, when the first external environment temperature, the first inner cavity temperature, and the first infrared focal plane temperature are 23°C, 25°C, and 27°C respectively, the second external environment temperature, the second inner cavity temperature, and the second infrared focal plane temperature are 35°C, 37°C, and 41°C 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°C and 100°C respectively:
[0068] When the target temperature is 45°C, the sensitivity correction function is g = -0.001251*(37-25)*e |(41-27)-(35-23)| =-0.116, the sensitivity is As shown in Table 1, under normal temperature conditions, 45°C is between 40°C and 50°C, and the corresponding grayscale difference is 250. Therefore, the sensitivity of 45°C 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 As shown in Table 1, under normal temperature conditions, 85°C is between 80°C and 90°C, and the corresponding grayscale difference is 450. Therefore, the sensitivity of 85°C 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 As shown in Table 1, under normal temperature environment, 115°C is between 110°C and 120°C, and the corresponding grayscale difference is 600. Therefore, the sensitivity of the normal temperature environment of 115°C 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, and can accurately control the sensitivity of the temperature measuring device under various ambient temperatures, thereby avoiding measurement errors caused by environmental factors.
[0072] In an exemplary embodiment, the pixel points included in the target image and corresponding to the multiple points on the above-mentioned temperature measurement object are clustered, including: determining multiple target pixel points from the pixel points of the above-mentioned multiple points, and clustering the multiple target pixel points into one category, wherein the absolute value of the difference between the grayscale of the above-mentioned target pixel point and the grayscale of the above-mentioned target point is less than or equal to the above-mentioned target grayscale threshold, and the above-mentioned target pixel point and the pixel point of the above-mentioned target point are in the same connected domain; after clustering the pixel points included in the target image and corresponding to the multiple points on the above-mentioned temperature measurement object, the above-mentioned method further includes: calculating the sum of the pixel value of the above-mentioned target pixel point and the pixel value of the pixel point of the above-mentioned target point to obtain the target pixel value of the above-mentioned target image.
[0073] This embodiment achieves precise pixel clustering by determining the grayscale difference between target pixels and target points and ensuring they are in the same connected domain. For example, if the target point has a grayscale value of 100 and the target grayscale threshold is 10, all pixels with grayscale values between 90 and 110, directly or indirectly connected to each other, will be clustered as part of the target point. This method solves the problem of traditional infrared temperature measurement equipment easily misclassifying discontinuous areas with similar temperatures as the same target during clustering, thereby improving the accuracy and reliability of clustering.
[0074] In an exemplary embodiment, multiple target pixel points are determined from the pixel points of the above-mentioned multiple points, including: taking the pixel point of the above-mentioned target point as the origin, searching to the left and right sides of the above-mentioned target point to obtain a first pixel point, wherein the absolute value of the difference between the grayscale of the above-mentioned first pixel point and the grayscale of the above-mentioned target point is less than or equal to the above-mentioned target grayscale threshold, and the first pixel point and the pixel point of the above-mentioned target point are in the same connected domain; taking the pixel point of the first target point as the origin, searching to the left and right sides of the above-mentioned first target point to obtain a second pixel point, wherein the above-mentioned first target point is the pixel point above and below the above-mentioned target point, the absolute value of the difference between the grayscale of the above-mentioned second pixel point and the grayscale of the above-mentioned target point is less than or equal to the above-mentioned target grayscale threshold, and the second pixel point and the pixel point of the above-mentioned target point are in the same connected domain; the above-mentioned first pixel point and the above-mentioned second pixel point are determined as the above-mentioned target pixel points.
[0075] Optionally, infrared temperature measurement 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 it meets the dynamic grayscale threshold judgment condition: the clustering condition is |gray(x, y)-tarGray|≤target grayscale threshold, and any other point (x, y) and the target point are in the same connected domain, 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, through the target point (x0, y0) and the target grayscale threshold, clustering conditions are judged to the left and right of the target point respectively, and multiple first pixel points that meet the clustering conditions are explored until the leftmost point x that meets the clustering conditions is found. Left (x L1 ,y L1 ) and the rightmost point x that meets the clustering conditions Right (x R1 ,y R1 ), through the point x Left and point x Right Calculate the pixel value Line0_pix of the line where the target point is located. Secondly, cluster upward and downward respectively based on the target point. The downward clustering and upward clustering methods are the same. Take upward clustering as an example: add 1 to the vertical coordinate y0 of the target point to obtain a new point: the first target point x Up1 (x0, y0+1), respectively, to the left and right of the first target point to judge the clustering conditions, explore multiple second pixel points that meet the clustering conditions, until the leftmost point x that meets the clustering conditions is found Left (x L1 ,y L1 ) and the rightmost point x that meets the clustering conditions Right (x R1 ,y R1), through the point x Left and point x Right Calculate the first target point x Up1 Finally, all the calculated line pixel values Line0_pix, LineUp1_pix1, ..., LineDowm1_pix, ... are added together to calculate the pixel value of the measured target.
[0076] The present invention will be described below in conjunction with specific embodiments:
[0077] Figure 5 This is a flow chart of a clustering method of infrared target pixels according to a specific embodiment of the present application. Figure 5 As shown, the following steps are included:
[0078] S502, determining the conversion relationship between the temperature of the infrared temperature measuring device, the grayscale temperature, and the target grayscale value Gs.
[0079] The temperature sensor device pre-installed on the infrared temperature measuring device is used to sense the temperature inside and outside the infrared temperature measuring device. Two sets of temperatures of the infrared temperature measuring device (i.e., other temperatures and calibration temperatures of the temperature measuring device) are measured under real-time temperature environment and normal temperature calibration environment, respectively. These temperatures include but are not limited to ambient temperature, inner cavity temperature, and infrared focal plane temperature. Among them, other temperatures are represented by Tc1, Tc2, and Tc3, respectively, and calibration temperatures are represented by Th1 c, Th2c, and Th3c, respectively.
[0080] Infrared temperature measurement equipment is calibrated against multiple standard blackbody radiation sources in a fixed ambient temperature environment to determine the conversion relationship between the measured grayscale and the measured temperature.
[0081] The infrared temperature measuring equipment is used to detect the thermal radiation energy radiated by the measured target. According to the size of the thermal radiation energy, the thermal radiation energy is quantified and output in the form of grayscale to obtain the grayscale of the target point of the measured target.
[0082] S504, determining the sensitivity of the infrared temperature measuring device to the target temperature under a normal temperature calibration environment.
[0083] Under the same ambient temperature, the infrared temperature measuring device outputs different grayscale values for the measured targets with different temperatures. Therefore, the clustering threshold (i.e., grayscale threshold) needs to be dynamically changed according to the different temperatures of the measured targets.
[0084] According to 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] The key to dynamically changing the clustering threshold according to the different temperatures of the measured target lies in the sensitivity of the infrared temperature measuring device to the target temperature, that is, the grayscale value required for each degree change in the target temperature, which is recorded as
[0086] The specific calculation method is: in, It is the sensitivity of infrared temperature measuring equipment to target temperature under normal temperature calibration environment. The derivative of the grayscale value function is converted to the updated temperature value, and Ts is the target temperature.
[0087] S506 , obtaining a correction function of the sensitivity of the infrared temperature measuring device to the target temperature under different ambient temperatures based on the temperature calculation of the infrared temperature measuring device.
[0088] Because the response of the infrared temperature measuring device changes with the change of the ambient temperature, the grayscale value output by it will be inconsistent even if the actual temperature of the measured target is the same under different ambient temperatures. Therefore, the clustering threshold needs to be dynamically changed according to different ambient temperatures.
[0089] According to the infrared temperature measuring equipment in the real-time temperature environment and the normal temperature calibration environment, the temperatures of the two groups of infrared temperature measuring equipment are measured: Tc1, Tc2, Tc3, Th1c, Th2c, Th3c. The correction function g(Th1, Th2, Th3) of the sensitivity of the infrared temperature measuring equipment to the target temperature Ts under different ambient temperatures is calculated as follows:
[0090] g(Th1,Th2,Th3)=k1×(Th2-Th2c)×e |(Th3-Th3c)-(Th1-Th1c)| ,That
[0091] Where Th1, Th2, and Th3 are the ambient temperature, inner cavity temperature, and infrared focal plane temperature of the infrared temperature measuring device under the real-time temperature environment, respectively; Th1c, Th2c, and Th3c are the ambient temperature, inner cavity temperature, and infrared focal plane temperature of the infrared temperature measuring device under the normal temperature calibration environment, respectively; k1 is the sensitivity coefficient, which is obtained by comparing the sensitivity of the infrared temperature measuring device to the same target temperature under multiple different ambient temperatures with the temperature of the infrared temperature measuring device, and its value range is [-0.002, 0.0005]. e is the base of the natural logarithm. 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 the normal temperature calibration environment to the target temperature sensitivity under the normal temperature calibration environment, and its value range is [-1, 1].
[0092] S508 , dynamically calculating a grayscale threshold for regional clustering based on the temperature of the infrared temperature measuring device, the target temperature sensitivity, and the correction function.
[0093] The dynamic threshold rules are as follows:
[0094]
[0095] Gthreshold is the grayscale threshold, Ts is the target temperature, is the target temperature sensitivity, g(Th1,Th2,Th3) is the correction function of 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 the preset boundary temperature values, which can be selected as 60°C or 100°C.
[0096] By comparing the grayscale of the target point with the grayscale of any other point (x, y) to see if it meets the dynamic grayscale threshold judgment condition, the infrared temperature measurement target clustering can be completed: the clustering condition is |gray(x, y)-tarGray|≤target grayscale threshold, and any other point (x, y) and the target point are in the same connected domain, 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 in the figure, the specific steps include: first, through the target point (x0, y0) and the target grayscale threshold, clustering conditions are judged to the left and right of the target point respectively, and multiple first pixel points that meet the clustering conditions are explored until the leftmost left boundary point x that meets the clustering conditions is found. Left (x L1 ,y L1 ) and the right boundary point x on the far right that meets the clustering conditions Right (x R1 ,y R1 ), through the point x Left and point x Right Calculate the pixel value Line0_pix of the line where the target point is located. Secondly, cluster upward and downward respectively based on the target point. The downward clustering and upward clustering methods are the same. Take upward clustering as an example: add 1 to the vertical coordinate y0 of the target point to obtain a new point: the first target point x Up1 (x0, y0+1), respectively, to the left and right of the first target point to judge the clustering conditions, explore multiple second pixel points that meet the clustering conditions, until the leftmost point x that meets the clustering conditions is found Left (x L1 ,y L1 ) and the rightmost point x that meets the clustering conditions Right (x R1 ,y R1 ), through the point x Left and point x Right Calculate the first target point x Up1Finally, add all the calculated line pixel values Line0_pix, LineUp1_pix1, ..., LineDowm1_pix, ... to get the pixel value of the measured target. For the same measured target, using the traditional fixed threshold rule and the dynamic threshold rule, the effect of threshold clustering on the points of different temperatures in the measured target is as follows: Figure 6 As shown in the figure, it is obvious that the dynamic threshold rule for threshold clustering can obtain more accurate pixel values of the measured target.
[0097] This embodiment not only addresses the issue of reduced temperature measurement accuracy and clustering accuracy in infrared temperature measurement equipment at varying ambient and target temperatures, but also significantly improves the adaptability and efficiency of the temperature measurement equipment by dynamically adjusting the grayscale threshold and introducing a sensitivity correction mechanism. In practical applications such as temperature control monitoring in waste incineration plants, substation insulator inspection, and soldering iron tip temperature monitoring, this method can significantly improve the temperature measurement accuracy and clustering accuracy of equipment.
[0098] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it 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 the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0099] This embodiment also provides a device for clustering infrared target pixels, which is used to implement the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the systems described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0100] Figure 7 This is a structural block diagram of a device for clustering infrared target pixels according to an embodiment of the present application. Figure 7 As shown, the device includes:
[0101] A first determining module 702 is configured to determine a target temperature of a measured target point, wherein the target point is located on a temperature measurement object, and the temperature measurement object is an object whose temperature is measured by a temperature measurement device;
[0102] A second determining module 704 is configured to determine a target temperature interval in which the target temperature is located 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;
[0103] The first clustering module 706 is used to cluster pixel points corresponding to multiple points on the temperature measurement object included in the target image 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 measurement object.
[0104] In an exemplary embodiment, the above-mentioned device also includes: a third determination module, which is used to determine the calibration sensitivity of the above-mentioned temperature measuring device to the above-mentioned target temperature under a normal temperature calibration environment before determining the target grayscale threshold corresponding to the above-mentioned target temperature range, wherein the above-mentioned calibration sensitivity is used to indicate the change of the grayscale of the above-mentioned target point with the above-mentioned target temperature; a fourth determination module, which is used to determine the correction function of the sensitivity of the above-mentioned temperature measuring device to the above-mentioned target temperature under other temperature environments; and a fifth determination module, which is used to determine the grayscale threshold corresponding to each of the above-mentioned temperature ranges based on the above-mentioned calibration sensitivity and the above-mentioned correction function.
[0105] In an exemplary embodiment, the above-mentioned fifth determination module includes: for any temperature interval included in the multiple temperature intervals, the grayscale threshold corresponding to any of the above-mentioned temperature intervals is determined in the following manner: a first determination submodule, used to determine the first grayscale threshold coefficient corresponding to the first temperature interval, wherein the above-mentioned first temperature interval is any of the above-mentioned temperature intervals, and the value of the above-mentioned first grayscale threshold coefficient is proportional to the predetermined temperature value included in the above-mentioned first temperature interval; a second determination submodule, used to determine the first grayscale threshold corresponding to the above-mentioned first temperature interval based on the above-mentioned calibration sensitivity, the first correction function of the sensitivity of the above-mentioned temperature measuring device to the above-mentioned target temperature in the above-mentioned first temperature interval, and the above-mentioned first grayscale threshold coefficient.
[0106] In an exemplary embodiment, the second determination submodule includes: a first determination unit, configured to determine the first grayscale threshold by using the following formula when the first temperature range is less than or equal to the first temperature threshold: Wherein, c1 is the first grayscale threshold coefficient, g(Th1, Th2, Th3) is the first correction function, Th1, Th2, Th3 are multiple temperatures corresponding to the temperature measuring device in the first temperature range, is the calibration sensitivity, Ts is the target temperature, and Gs is the grayscale of the target point; a second determining unit is configured to determine the first grayscale threshold by the following formula when the first temperature interval is greater than the first temperature threshold and less than the second temperature threshold: in, is the first grayscale threshold coefficient, g(Th1, Th2, Th3) is the first correction function, Th1, Th2, Th3 are multiple temperatures corresponding to the temperature measuring device in the first temperature range, Round up is the calibration sensitivity, Ts is the target temperature, and Gs is the grayscale of the target point; a third determining unit is configured to determine the first grayscale threshold by the following formula when the first temperature interval is greater than or equal to the second temperature threshold: Wherein, c3 is the first grayscale threshold coefficient, g(Th1, Th2, Th3) is the first correction function, Th1, Th2, Th3 are multiple temperatures corresponding to the temperature measuring device in the first temperature range, is the calibration sensitivity, Ts is the target temperature, and Gs is the grayscale of the target point.
[0107] In an exemplary embodiment, the above-mentioned fourth determination module includes: a third determination submodule, used to determine the calibration temperature of the above-mentioned temperature measuring device under the above-mentioned normal temperature calibration environment, wherein the above-mentioned calibration temperature includes the first external environment temperature of the above-mentioned temperature measuring device, the first internal cavity temperature of the above-mentioned temperature measuring device, and the first infrared focal plane temperature of the above-mentioned temperature measuring device; a fourth determination submodule, used to determine other temperatures of the above-mentioned temperature measuring device under the above-mentioned other temperature environments, wherein the above-mentioned other temperatures include the second external environment temperature of the above-mentioned temperature measuring device, the second internal cavity temperature of the above-mentioned temperature measuring device, and the second infrared focal plane temperature of the above-mentioned temperature measuring device; a fifth determination submodule, used to determine the above-mentioned correction function based on the above-mentioned calibration temperature and the above-mentioned other temperatures.
[0108] In an exemplary embodiment, the fifth determination submodule includes: a fourth determination unit, configured to determine the correction function g(Th1, Th2, Th3) by the following formula: g(Th1, Th2, Th3) = k1×(Th2-Th2c)×e |(Th3-Th3c)-(Th1-Th1c)| , where 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 above-mentioned first external environment temperature, the above-mentioned first inner cavity temperature, and the above-mentioned first infrared focal plane temperature, respectively; Th1, Th2, and Th3 are the above-mentioned second external environment temperature, the above-mentioned second inner cavity temperature, and the above-mentioned second infrared focal plane temperature, respectively.
[0109] In an exemplary embodiment, the above-mentioned first clustering module includes: a sixth determination submodule, which is used to determine multiple target pixel points from the pixel points of the above-mentioned multiple points, and cluster the multiple target pixel points into one category, wherein the absolute value of the difference between the grayscale of the above-mentioned target pixel point and the grayscale of the above-mentioned target point is less than or equal to the above-mentioned target grayscale threshold, and the above-mentioned target pixel point and the pixel point of the above-mentioned target point are in the same connected domain; the above-mentioned device also includes: a first calculation module, which is used to cluster the pixel points included in the target image corresponding to the multiple points on the above-mentioned temperature measurement object, and then calculate the sum of the pixel value of the above-mentioned target pixel point and the pixel value of the pixel point of the above-mentioned target point to obtain the target pixel value of the above-mentioned target image.
[0110] In an exemplary embodiment, the sixth determination submodule includes: a first search unit, which is used to take the pixel point of the target point as the origin and search to the left and right sides of the target point to obtain a first pixel point, wherein the absolute value of the difference between the grayscale of the first pixel point and the grayscale of the target point is less than or equal to the target grayscale threshold, and the first pixel point and the pixel point of the target point are in the same connected domain; a second search unit, which is used to take the pixel point of the first target point as the origin and search to the left and right sides of the first target point to obtain a second pixel point, wherein the first target point is the pixel point above and below the target point, the absolute value of the difference between the grayscale of the second pixel point and the grayscale of the target point is less than or equal to the target grayscale threshold, and the second pixel point and the pixel point of the target point are in the same connected domain; a fifth determination unit, which is used to determine the first pixel point and the second pixel point as the target pixel point.
[0111] An embodiment of the present application provides a computer program product, including a computer program, which implements the steps of any of the above method embodiments when executed by a processor.
[0112] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above method embodiments when run.
[0113] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0114] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0115] In an 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] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail here.
[0117] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices, they can be implemented using program code executable by the computing device, and thus, they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be performed in a different order than herein, or they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0118] The above are merely preferred embodiments of the present application and are not intended to limit the present application. Persons skilled in the art will readily appreciate that various modifications and variations are possible. Any updates, equivalent replacements, improvements, and the like made within the principles of the present application shall be included within the scope of protection of the present application.
Claims
1. A clustering method for infrared target pixels, characterized in that: include: Determining a target temperature of a measured target point, wherein the target point is located on a temperature measurement object, and the temperature measurement object is an object whose temperature is measured by a temperature measurement device; Determining a target temperature interval in which the target temperature is located from a plurality of pre-divided temperature intervals, and determining a target grayscale threshold corresponding to the target temperature interval, wherein different temperature intervals correspond to different grayscale thresholds; Based on the target grayscale threshold and the grayscale of the target point, pixel points included in the target image and corresponding to multiple points on the temperature measurement object are clustered, wherein the multiple points include the target point, and the target image is an image of the temperature measurement object.
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: 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 how the grayscale of the target point changes with the target temperature; Determining a correction function for the sensitivity of the temperature measuring device to the target temperature under other temperature environments; A grayscale threshold corresponding to each of the temperature intervals is determined based on the calibration sensitivity and the correction function.
3. The method according to claim 2, characterized in that Determining a grayscale threshold corresponding to each of the temperature intervals based on the calibration sensitivity and the correction function includes: For any temperature interval included in the multiple temperature intervals, the grayscale threshold corresponding to any temperature interval is determined in the following manner: Determining a first grayscale threshold coefficient corresponding to a first temperature interval, wherein the first temperature interval is any one of the temperature intervals, and a value of the first grayscale threshold coefficient is proportional to a predetermined temperature value included in the first temperature interval; A first grayscale threshold corresponding to the first temperature interval is determined based on the calibrated sensitivity, a first correction function of the sensitivity of the temperature measuring device to the target temperature in the first temperature interval, and the first grayscale threshold coefficient.
4. The method according to claim 3, characterized in that Determining a first grayscale threshold corresponding to the first temperature interval based on the calibrated sensitivity, a first correction function of the sensitivity of the temperature measuring device to the target temperature in the first temperature interval, and the first grayscale threshold coefficient includes: When the first temperature interval is less than or equal to the first temperature threshold, the first grayscale threshold is determined by the following formula: Wherein, c1 is the first grayscale threshold coefficient, g(Th1, Th2, Th3) is the first correction function, Th1, Th2, Th3 are multiple temperatures corresponding to the temperature measuring device in the first temperature range, is the calibration sensitivity, Ts is the target temperature, and Gs is the grayscale of the target point; When the first temperature interval is greater than the first temperature threshold and less than the second temperature threshold, the first grayscale threshold is determined by the following formula: in, is the first grayscale threshold coefficient, g(Th1, Th2, Th3) is the first correction function, Th1, Th2, Th3 are multiple temperatures corresponding to the temperature measuring device in the first temperature range, Round up is the calibration sensitivity, Ts is the target temperature, and Gs is the grayscale of the target point; When the first temperature interval is greater than or equal to the second temperature threshold, the first grayscale threshold is determined by the following formula: Wherein, c3 is the first grayscale threshold coefficient, g(Th1, Th2, Th3) is the first correction function, Th1, Th2, Th3 are multiple temperatures corresponding to the temperature measuring device in the first temperature range, is the calibration sensitivity, Ts is the target temperature, and Gs is the grayscale of the target point.
5. The method according to claim 2, characterized in that Determining a correction function for the sensitivity of the temperature measuring device to the target temperature under other temperature environments includes: Determining a calibration temperature of the temperature measuring device under the normal temperature calibration environment, wherein the calibration temperature includes a first external environment temperature of the temperature measuring device, a first inner 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 environment, wherein the other temperatures include a second external environment temperature of the temperature measuring device, a second inner cavity temperature of the temperature measuring device, and a second infrared focal plane temperature of the temperature measuring device; The correction function is determined based on the calibration temperature and the other temperature.
6. The method according to claim 5, characterized in that Determining the correction function based on the calibration temperature and the other temperature includes: The correction function g(Th1, Th2, Th3) is determined by the following formula: g(Th1,Th2,Th3)=k1×(Th2-Th2c)×e |(Th3-Th3c)-(Th1-Th1c)| , Among them, k1 is the first coefficient used to indicate the sensitivity of the temperature measurement of the temperature measuring device, Th1c, Th2c, and Th3c are the first external environment temperature, the first inner cavity temperature, and the first infrared focal plane temperature, respectively; Th1, Th2, and Th3 are the second external environment temperature, the second inner cavity temperature, and the second infrared focal plane temperature, respectively.
7. The method according to claim 1, characterized in that Clustering pixel points included in the target image and corresponding to a plurality of points on the temperature measurement object, comprising: determining a plurality of target pixel points from the pixel points of the plurality of points, and clustering the plurality of target pixel points into one class, wherein an absolute value of a difference between a grayscale of the target pixel point and a grayscale of the target point is less than or equal to a target grayscale threshold, and the target pixel point and the pixel points of the target point are in the same connected domain; After clustering the pixel points included in the target image corresponding to multiple points on the temperature measurement object, the method further includes: calculating the sum of the pixel value of the target pixel point and the pixel value of the pixel point of the target point to obtain the target pixel value of the target image.
8. The method according to claim 7, characterized in that Determining a plurality of target pixel points from the plurality of pixel points includes: Taking the pixel point of the target point as the origin, searching to the left and right of the target point to obtain a first pixel point, wherein the absolute value of the difference between the grayscale of the first pixel point and the grayscale of the target point is less than or equal to the target grayscale threshold, and the first pixel point and the pixel point of the target point are in the same connected domain; Taking the pixel point of the first target point as the origin, searching to the left and right of the first target point respectively to obtain a second pixel point, wherein the first target point is a pixel point above and below the target point, the absolute value of the difference between the grayscale of the second pixel point and the grayscale of the target point is less than or equal to the target grayscale threshold, and the second pixel point and the pixel point of the target point are in the same connected domain; The first pixel point and the second pixel point are determined as the target pixel points.
9. A clustering device for infrared target pixels, characterized in that: include: A first determining module is configured to determine a target temperature of a measured target point, wherein the target point is located on a temperature measurement object, and the temperature measurement object is an object whose temperature is measured by a temperature measurement device; a second determining module, configured to determine a target temperature interval in which the target temperature is located 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; The first clustering module is used to cluster pixel points included in the target image and corresponding to multiple points on the temperature measurement 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 measurement object.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method according to any one of claims 1 to 8 when executed by a processor.
Citation Information
Patent Citations
Infrared thermal imaging temperature measurement method
CN112665727A
Infrared thermal imaging superpixel segmentation fusion method and system, medium and computer
CN115661017A
Machine room maintenance monitoring method and system based on infrared image
CN116645643A